Push new latest tag on container build on a per branch and arch level
Following use-case: in a rather complex pipeline we optimized container builds by using gitlabs "run job only if files change" feature so we don't build containers on every commit to save some time. Obviously we then can't use the commit-sha as a reference to the image a pipeline should use but rather use a latest tag for the branch-arch combo. This made it necessary to not only tag built images with branch-commitsha-arch
but additionally with branch-latest-arch
.
@sheogorath I'd like to discuss with you if the build-job template should also always push such an additional "latest" tag or if it should be an optional feature and how you'd like to approach this. Or maybe you deem this kind of approach "incorrect" per-se?