Search code examples
continuous-integrationteamcitybamboocontinuous-deploymentoctopus-deploy

Release Branch and Continuous Delivery


Requirements

  • We have got 2 environments. -- Test and Prod
  • We want to do Continuous Deployment.
  • We are using Git Flow.

With git-flow we are supposed to deploy the release (or master) branch in production. ( two different pipelines,one for continuous integration (branch develop) and one for continuous delivery (branch master).

How should I use my release branch ?

What I have in mind is if the tests pass in develop. I would make the CI server create a release branch commit. And deploy the updated release branch points to my productions staging slot. After business approval one of the release points would get deployed to production.

This means I am letting CI server automatically create a release-branch and re-run all the tests on staging slots of production environment. If it fails, it will report and delete the release branch, otherwise it will create the release point,trigger network swap and merge it to master.

What is the pros and cons to this approach ? What is the best practice ?

Do we really need the release branch especially where we are not using feature toggles to separate releases ? ( there are multiple people working on the same project )

enter image description here enter image description here][2

Reference


Solution

  • Typically I would create/cut a release branch when you think the code is close enough to stable. Then you need to refine that branch until it's release-ready. You would do extensive regression testing after this and then finally tag it and release it.

    If you're doing true continuous releases then you might be skipping a lot of that testing so there isn't really a big point in even having a release branch. It's a lot riskier but you can do it if it fits your model.