Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish flux redeploy slack notification #992

Merged
merged 3 commits into from
Jan 16, 2024

Conversation

goastler
Copy link
Member

No description provided.

Copy link

Pull Request Report

Hey there! 👋 Here's a report on the changes, suggestions, bugs, improvements, and rating for the pull request.

Changes

  1. Added a step to redeploy the flux docker js_server.
    • File: .github/workflows/publish.yml
    • Lines added: 431-444

Suggestions

  • None at the moment.

Bugs

  • None at the moment.

Improvements

  • Found a place where the redeployment of flux docker js_server is handled. It can be refactored for better readability. Here's the code snippet:
- name:
  if: always()
  env:
      PROSOPO_ZELCORE_PRIVATE_KEY: ${{ secrets.PROSOPO_ZELCORE_PRIVATE_KEY }}
      PROSOPO_ZELCORE_PUBLIC_KEY: ${{ secrets.PROSOPO_ZELCORE_PUBLIC_KEY }}
  run: |
      if [[ "${{ steps.redeploy_flux_docker_js_server.outcome }}" == 'success' ]]; then
        echo "Redeployed flux docker js_server."
        curl -X POST -H 'Content-type: application/json' --data "{\"text\":\":check-passed: Flux docker js_server redeploy <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|v${{ steps.next_version.outputs.version }}> has been requested.\"}"  ${{ secrets.SLACKBOT_DEVOPS }}
      elif [[ "${{ steps.redeploy_flux_docker_js_server.outcome }}" == 'failure' ]]; then
        echo "Redeploying flux docker js_server failed."
        curl -X POST -H 'Content-type: application/json' --data "{\"text\":\":check-failed: Flux docker js_server redeploy <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|v${{ steps.next_version.outputs.version }}> failed.\"}"  ${{ secrets.SLACKBOT_DEVOPS }}
      else
        echo "Redeploying flux docker js_server skipped / cancelled."
      fi

Rating

I would rate the code as follows:

  • Readability: 8/10
  • Performance: 9/10
  • Security: 9/10

That's it for the report! Let me know if you need anything else. 😄

Copy link
Member

@forgetso forgetso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great idea

@prosoponator prosoponator merged commit 4fb6d5b into main Jan 16, 2024
4 checks passed
@prosoponator prosoponator deleted the publish_flux_redeploy_slack_notification branch January 16, 2024 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants