The gitflow fits our needs and the giversion seems to be fitting the gitflow. But there is one thing which I don't fully understand. Let me explain what bothers me.
How to achieve build once, deploy many here? According to all the rules, we need to promote 1.3.0-unstable.x to the prod env, cause exactly this package was tested in dev and test, but the version looks a bit strange for prod, isn't it? When 1.3.0 which came from master branch was never deployed anywhere.
Question is similar to this: In the git flow model should I build from the merge commit in master to release?
The answer is not really satisfying:
Gitflow can be used for projects that have a scheduled release cycle and for the DevOps best practice of continuous delivery. This workflow doesn't add any new concepts or commands beyond what's required for the Feature Branch Workflow.
Git flow and CI/CD Any development team will inevitably use a delivery pipeline to integrate, build and deploy their code. More often than not, this tool will be referred to as a “CI/CD pipeline”.
Let me answer this question myself. We came up to the point where we realised that supporting several versions/several environments using the gitflow is a huge burden. Hence we were looking for something simpler, which is github flow. Of course it didn't completely solve the original issue(build once - deploy many) for us, but this is how we partly solved it.
Our pipeline changed
from: dev -> test -> uat -> prod
to: dev -> test and then uat -> prod
So like I said before, we are using the github flow. Whenever we are working on the new feature, first - we create a branch featurename from latest master. Every build from this branch is versioned like this 1.3.0-featurename.1, 1.3.0-featurename.2 and so on.
Once developer finishes his implementation and does all the dev checks, these exact binaries go to the test environment for QA. After QA guys sign off this version, we are happy to push this through our second pipeline uat -> prod. We merge the pull request for the featurename branch and the build version we get afterwards, lets say: 1.3.1 goes to the uat environment. Once it's signed off there, we push exactly the same binaries to the prod environment.
If there were several feature branches being developed at the same time, the next version we push to the test environment supposed to be rebased on top of the latest master and again through the pipeline.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With