HiveBrain v1.2.0
Get Started
← Back to all entries
patterngitMinor

Pros and cons of different deploy strategies

Submitted by: @import:stackexchange-devops··
0
Viewed 0 times
deployprosdifferentandstrategiescons

Problem

I am not sure about the best way to deploy my program.

Lets assume i have two relevant branches release(tested and ready to deploy code) and master.

I have two options

1.Merge the release to master and deploy master to production.

2.Deploy release to production and then merge to master.

Which strategy you use and why.

Solution

Assuming there are no changes in Master that are not in your release branch and you don't rebuild after you merge the code then you could deploy first and then merge to master. If either of those are not true, then merging first would be more common.

The process depends on how you handle your branching strategy. If other things could be merged into master that are not part of the release branch then you need to merge first and rerun the pipeline of tests. If master represents production and all new work is now in the release branch then yes, you can deploy then push, or do them as a step in the pipeline assuming the deploy is successful then do the merge.

Context

StackExchange DevOps Q#4092, answer score: 4

Revisions (0)

No revisions yet.