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

CICD: Release PR Creation Workflow and Slack Messaging #497

Merged
merged 103 commits into from
Jun 6, 2023

Conversation

algobarb
Copy link
Contributor

@algobarb algobarb commented Jun 1, 2023

Summary

  • Adds a Release PR Creation github workflow
  • Add Slack Messaging after a release branch completes CircleCI tests
  • Add a script/bump_version.py to handle bumping version in setup.py
  • Support Hot-Fixes

Testing

@algobarb
Copy link
Contributor Author

algobarb commented Jun 5, 2023

Closing to test adding pre-release steps. Will re-open PR afterwards.

@algobarb algobarb closed this Jun 5, 2023
@algobarb algobarb reopened this Jun 6, 2023
@algobarb
Copy link
Contributor Author

algobarb commented Jun 6, 2023

Thanks @excalq for the pointers!

I added the recommended changes as well as a few more changes in the rest of the yml file to remove the input parameters: release_branch_exists and source_ref:

  • I added fetch-option: 0 to the checkout step so it will fetch all of the branches rather than just one commit, so we can check if the release branch exists on remote.
  • I also added a condition that if the release branch exists, it will error if we aren't running the workflow from the release branch. It could indicate that someone may not have realized the release branch was already created.
  • I removed source_ref parameter and instead will use the "workflow_ref", i.e. the ref used to run the workflow.

if ! git show-ref --verify --quiet "refs/remotes/origin/$RELEASE_BRANCH"; then
git checkout -b $RELEASE_BRANCH
git push --set-upstream origin $RELEASE_BRANCH
elif [[ $(git rev-parse --abbrev-ref HEAD) != "$RELEASE_BRANCH" ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

That's a good validation check.

Copy link
Contributor

@excalq excalq left a comment

Choose a reason for hiding this comment

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

Awesomesauce. :shipit:

@algobarb algobarb merged commit 9d378c8 into develop Jun 6, 2023
12 checks passed
@algobarb algobarb deleted the algobarb/relase_pr_workflow branch June 6, 2023 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants