Zarathustra
Zarathustra

Reputation: 2943

Git with daily production deployment

There is a requirement by the customer to have daily production deployments with features that were scheduled a day ago. I wanna introduce code reviews but I am not sure were to start.

They use Git as SCM.

Currently there are 3 branches:

If there should be a change (doesn't matter what, feature, change, bugfix ...) the "workflow" is the following:

Assuming that happens in parallel and with at least 2 features in parallel development that can cause a lot of pain.

So my question is: What could be a good branching structure where daily production deployments of specific feature(s) is possible?

Currently it's easy to see: it's a pure mess. You don't have to name it. :D

By the way, they merge, they do never rebase a change.

If it is relevant we use GitLab Community Edition and deploy via a Jenkins job.

Upvotes: 1

Views: 161

Answers (1)

Gerold Broser
Gerold Broser

Reputation: 14762

Re "no reproduceable builds": If you tag your commits, builds based on those tags are reproducible.

Tags also help to avoid multiple branches:

           P1                                          P2     P3
master ----o-------------------------------------------o------o
            \                                         /      /
          A  +------o-----------o----------o---------o      /
              \ A-QA1(bug)  A-QA2(OK)  A-C1(bug)  A-C2(OK) /
               \                                          /
             B  +-------o-----------o----------o---------o
                    B-QA1(bug)  B-QA2(OK)  B-C1(bug)  B-C2(OK)

Tags:

P1 .... latest production deployment, new (feature-)branch from production
QA1 ... develop tests, internal QA notices a bug
QA2 ... new commit in <branch>, QA says it's okay
C1 .... customer says it's not OK
C2 .... customer says it's okay
P2..n .... new production deployment(s)

Re "on every stage is a different state": There's just one state that's the point of reference at any given point in time and it's on master.

Re "merge conflicts in prod": There is no merge conflict from P1 to P2. Merge conflicts are not prevented from P2 to P3, of course, but not spread across multiple branches, at least.

Upvotes: 1

Related Questions