0
votes

I am implementing a gitflow workflow with master and development branches, and I have 3 environments: DEV, UAT, PROD.

Using Azure DevOps, when the PR completes and the feature branch is merged into development, I trigger the release to DEV environment.

I am unsure on how to deploy to UAT after that. My first approach was to automate the deployment to UAT after the deployment to DEV succeeded (sequentially, DEV and then UAT), but it doesn't feel right to automate the deployment to UAT.

Should I create another branch for UAT deployments, and automate the deployment to UAT when development merges into that branch?

1

1 Answers

3
votes

It's not need to have a branch for each environment. You should promote the artifact, not the source code. A specific branch should be integrated with the CI process, and its artifact should be promoted through each stage until production. The Continuous Delivery pipeline should reflect the environment stages, not the branch model.

A useful blog for your reference:

https://medium.com/@grazibonizi/understading-the-connection-between-branching-models-and-delivery-pipeline-c9cb12e30516