In the post about versioned artifacts, I was using a custom text file named image-tag.txt
to share the image tag between build configurations. The commit stage evaluates the image tag and produces the image-tag.txt
artifact, which just contains the version e.g. 1.3.0
.
After the post about the versioning script, the build number of the commit stage and the image tag where identical and they were following semantic versioning.
In a more recent post, I’ve configured a build chain in TeamCity, in which all build configurations share the build number of the Commit Stage. This means that all build configurations have the correct image tag information implicitly, as their build number. This makes the image-tag.txt
artifact obsolete.
I have therefore removed the image-tag.txt
artifact and I’m using the implicit configuration parameter %build.number%
wherever I need it.