elastic / cloudbeat

Analyzing Cloud Security Posture
Other
39 stars 43 forks source link

fix bump workflow git errors #2234

Closed orouz closed 4 months ago

orouz commented 4 months ago

Summary of your changes

the version bump workflow does the following:

  1. cloudbeat

    • PR to update ARM templates, version.go, mergify (to main)
    • PR to update hermit (to main)
    • PR to update ARM templates (to release-branch)
    • upload CF templates
  2. integrations

    • PR to bump version and update template URLs versions (arm, CF, cloudshell)

in the previous release, only the 1st cloudbeat PR was opened successfully, because the 2nd step - updating hermit, failed when the script tried to commit the changes to hermit but there were none, as it was already updated manually, and since the script has set -e it exited and didn't run any other step.

the changes in this PR avoid committing if there are no changes, and by that avoid exiting due to errors and failing to complete the other steps. there's also some minor formatting changes.

Related Issues

mergify[bot] commented 4 months ago

This pull request does not have a backport label. Could you fix it @orouz? 🙏 To fixup this pull request, you need to add the backport labels for the needed branches, such as:

github-actions[bot] commented 4 months ago

:bar_chart: Allure Report - :green_heart: No failures were reported.

Result Count
🟥 Failed 0
🟩 Passed 359
⬜ Skipped 33
orouz commented 4 months ago

I have to say, so docstring around the functions would be helpful here, it's not a small script anymore and we would like others to easily maintain it in the future

anything in specific that is not clear that could use a comment with info that isn't reflected in the function name?