Skip to content

Instantly share code, notes, and snippets.

@gabrieljoelc
Last active February 9, 2018 22:13
Show Gist options
  • Select an option

  • Save gabrieljoelc/1b7ba5b8805860e53889096ea7d0aa98 to your computer and use it in GitHub Desktop.

Select an option

Save gabrieljoelc/1b7ba5b8805860e53889096ea7d0aa98 to your computer and use it in GitHub Desktop.

Git flow deployment

Prerequesites

  1. gitflow
  2. Initialize git flow in your repo
git flow init

Steps

  1. Create and push release branch
git checkout master && git pull
git flow start release $PREVIOUS_RELEASE_NUMBER_PLUS_ONE
git push -u origin release/$PREVIOUS_RELEASE_NUMBER_PLUS_ONE
  1. Push release branch to a QA environment
  2. Create pull request against production
  3. QA release branch
  4. Add last minute fixes to to release branch (optional) a. If there are release fixes, create a pull requests against master as well
  5. When CI is green and QA is green:
git flow release finish $PREVIOUS_RELEASE_NUMBER_PLUS_ONE
  1. Push ags
git push --tags
  1. Merge release PR into production a. merge release PR into master if there were fixes

Appendix

@gabrieljoelc
Copy link
Author

I'm not sure we can do the last step 6. (When CI is green and QA is green) because we have GitHub protected branch set on the production branch. We might have to just use pull requests.

If this is the case, the git flow tool doesn't get us much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment