ImageStreamTag per Git commit

9/26/2019

We are running OpenShift 3.11, building container images and pushing them to the latest tag, overwriting the previous latest tag.

We do not wish to use imperative versioning such as v.1.2.3, but rather tag the image with the Git commit SHA, e.g. project-name/app-name:9ff84740dd2. That means one one new ImageStreamTag will be created for every built image on the CI server.

This however does not scale very nicely. Say you get close to 100 new changes (100 new commits). Then you will have 100 ImageStreamTags for that particular application.

The background is that we want to be able to deploy potentially different images of the same app, referencing the Git commit SHA for the particular change/commit.

Is there any operator or similar stand-alone system for Kubernetes/OpenShift that solves this? I do not wish to use GitLab, although GitLab provides this functionality (see image).

gitlab-example

-- whirlwin
continuous-integration
kubernetes
openshift

0 Answers