With a Git branch workflow, when do you update the master branch?

I am new to git and Jenkins. We want to use Jenkins and are following the feature-branch-workflow concept , which I think is similar to a GitHub stream .

I know that the master branch should always be what is currently being deployed in production, but then when should the master branch be updated? There seem to be two options:

  • BEFORE deploying to production: a request to get approved and a successful merge with the master triggers a build, an environment deployment, QA testing, and then someone clicks a button to deploy to production
  • AFTER deploying to production: something (like a pull request) triggers a build, testing, etc. and the code is successfully released for production - THEN the master is updated

But in case of going with option (1), if the tests fail and the updated master is not released to production, you just reset the master before heading home for the day

+3


source to share


1 answer


if the tests fail and the updated master is not released to production,

You can first upgrade the ephemeral QA / Integration branch, run the test and upgrade wizard if those tests pass (and cause a release to production)



"ephemeral" means: you create / reset the QA branch only to integrate the feature branches designated as for the next release.
You can see an example of ephemeral branches in the git workflow .

+2


source







All Articles