PO Git Tagging Strategy

CI Pipeline Tagging

The CI pipeline will now create two git tags on a successful build of a new version of a service:

  • vX.Y.Z

  • vX.Y.Z-conf01

vX.Y.Z Tag Management

You never need to move the vX.Y.Z tag unless you had Ryan L delete the image version and you rebuilt it. This should almost never be the case.

Configuration Changes

When you are making config changes now, you must create a git tag of vX.Y.Z-conf##. That is what tracks the configuration data that you want applied at deploy time. The ## should be an incrementing number for each configuration change related to that specific vX.Y.Z version.

For example:

  • Initial release: v1.0.0, v1.0.0-conf01 (created by CI)

  • First config change: v1.0.0-conf02 (created by you)

  • Second config change: v1.0.0-conf03 (created by you)

Deployment Process

When deploying, you can use the following formats. The pipeline will behave as follows:

Using X.Y.Z or vX.Y.Z

If you type in X.Y.Z (e.g., 1.2.3) or vX.Y.Z (e.g., v1.2.3):

  1. The pipeline will first try to find a git tag that matches vX.Y.Z-conf and pick the tag with the highest number.

    Example: If v1.2.3-conf01 and v1.2.3-conf02 exist, it will choose v1.2.3-conf02.

  2. If it can’t find a -conf tag (e.g., vX.Y.Z-conf##), it will try to find the git tag vX.Y.Z.

  3. If that also can’t be found, it will default to the latest commit on the Release branch.

The same logic will be applied if vX.Y.Z (with the 'v' prefix) is the value typed in.

Using Specific Configuration Tags on Deploy Only Jobs

  • If you type in vX.Y.Z-conf## (e.g., v1.0.1-conf01), it will use that exact tag as provided.

  • If you type in X.Y.Z-conf## (e.g., 1.0.1-conf01 or any number for the conf part), it will try to checkout the git tag vX.Y.Z-conf## (e.g., it will attempt to use v1.0.1-conf01).

Rollback Instructions in Deploy Tickets

Now when you put in a deploy ticket and provide instructions for rollback, you need to provide the specific git tag reference.

If you are deploying v1.0.1-conf05, with the previous version being v1.0.1-conf04, you need to provide the value v1.0.1-conf04 for MACM to type into the version field in Jenkins for rollback.