Git Flow best practice for quarantine snapshot to staging environments (dev, test, prod)?

  softwareengineering

I have a CI pipeline that creates snapshot artefacts with constant version numbers after each commit to the development branch. Then the snapshots are deployed to the stages (dev, test) sequentially by hand. After successful testing, we merge everything into master and build a final release version for prod.

Deploying snapshots to test doesn’t really make sense, because after a successful test by QA, someone could commit a change with a new bug and the whole test is obsolete.

So I need a way to quarantine the snapshot version being tested.

Approaches I found by googling around:

a) Separate branches for each environment. Good quarantine, but could cause chaos when merging all branches.

b) Create a release artifact and bump the patch number for each deployment to the testing stage: Great that commits after release are ignored. But seems a bit overkill, we need to keep track of version numbers for 20 microservices somehow.

c) Git tags are good for keeping track of which commit is in which environment. But googling “git tags staging” gives the impression that this is not the way to go.

d) Let CI write the commit hash into the version number. Seems to be the simplest solution so far.

What is the best practice strategy for quarantining snapshot artifacts and their commits before release?

New contributor

Theo5423324 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

LEAVE A COMMENT