versioningrelease-managementgitversion

Versioning Approach In Custom Git Strategy


Overview: Here is the git strategy I have:

Do you know the name of this git strategy? Maybe it already exists.

Purpose: This strategy tries to cover cases when we have many features develop simultaneously and don't know the order of deployment. It's possible that two independent features will be release together or one by one.

For each deployment, we create a docker image with tag that corresponds to version of the app. There should be a possibility to do rollback between each deployments, so version should be unique.

Concerns: Could you suggest possible ways for versioning?

I tried to set up git version to perform versioning for releases branch be like: Major.Minor.Patch-branchName-revisionNm. Example: 1.2.0.-release/jiraTiketNb-2. Not sure it's ok? For QA environment actually, it doesn't matter. But for prod it could look strange. I thought to create another docker image for prod after QA and deploy it to prod with updated version to be like 1.2.0, but it will be not tested docker image, so I'm not sure it's correct.


Solution

  • In this case, the main branch probably reflects the release versions. the release branches sound like RC versions, that could become releases, and would bump a version.

    The develop branch seems like it would be development on top of that version, and the feature branches, further on top of the last time they were cut from develop.

    I would perhaps version like this: