1

We are using Vincent Driessen's git flow branching model, which is working well.

All projects build through CI (jenkins) and auto-deploy from develop branch to test servers (web applications, java applications, and so on).

Now, we want to set up deploy to a QA environment, and we have experimented with creating a qa branch for some of the applications, and corresponding jenkins builds which build off qa branch and deploy to QA servers.

Now, is this an acceptable approach, to set it up like this and merge or rebase into qa branch to trigger auto deploy?

Since in the past I have only used branches for features, releases and hotfixes (not "environments" like test, qa, stage) and scripts to deploy, e.g. deploy_to_qa.sh myapp 1.2.3.

Going forward we also want to deploy to Stage and Prod environments, and implement continuous delivery.

CodeWizard
  • 128,036
  • 21
  • 144
  • 167
vikingsteve
  • 38,481
  • 23
  • 112
  • 156
  • I'd like to close this question as "primarily opinion based". What you describe here seems to be in use in multiple different forms. In general git branches can be used for multiple things, **including** stages of development. That said, there already is something *like* a Prod branch, depending on your workflow. That'd be `master` then again to each theirs, ... – Vogel612 Nov 23 '15 at 16:37
  • You're right, `master` branch reflects software ready to go into production, but my question is quite specific about `qa` branch - which is not specifically explained by Vincent Driessen. I hope the question is specific enough to attract specific answer on this point rather than opinions about branching models in general. – vikingsteve Nov 23 '15 at 19:25
  • The problem I see with this question (as formulated now) is that *any* branching model is to some extent subjective. This includes whether a qa branch makes sense or not. As such I think (personally) that the question is very likely to attract opinions instead of answers based on "evidence" (whatever that is in this context) .... – Vogel612 Nov 23 '15 at 19:27
  • Perhaps I should specify better that it boils down in essence to "is it acceptable to use a branch as a technical mechanism to trigger a deployment?". Since in my mind, branches are used for development flow, not for deployment mechanisms, but I might be misunderstanding something here (thus the question) – vikingsteve Nov 24 '15 at 07:51

1 Answers1

1

Looking at, using, and developing, the model I would interpret it as follows:

QA can be done from the release branch. If QA find things wrong you can develop on the release branch and when QA gives the OK for a release you finish the release and it gets merged into develop.

QA can also be done from a hotfix branch.

Again, that's just my interpretation of the model.

Full disclosure: I'm the maintainer of git-flow (AVH Edition)

Peter van der Does
  • 14,018
  • 4
  • 38
  • 42
  • Thanks for that, appreciate it. We reached the same conclusion ourselves but also wanted to hear if others could verify the approach. I am going to replace the "rebase to QA branch, build and deploy from QA branch" with a simple script: look in artifactory `libs-release-local` for artifact in question, consult `maven-metadata.xml` for "latest" build version, do a simple `wget` on `artifact-name-$version.[jar|war]` and file copy to QA server. – vikingsteve Nov 26 '15 at 09:58