Docker Builds are not able to provide a tag version
Issue
Current Docker build pipelines ( bb-ci, cypress, terraform and atlantis ) are not able to update their tag version. The tag version always matches what is in the master pipeline template:
Description
Since the variable is defined in the pipeline template and the pipeline is controlled on project settings to always look at the master
branch pipleine, changing this value has no effect on the tag version until after it's merged to master. So currently this will only work after the MR once the master
branch builds.
We need an option to build the tag version with a value that can be incremented.
Options
- Add a
LABEL
inside the dockerfile that the pipeline can parse and use as the variable.- Pros: Easy Implementation. Enforces Labels.
- Cons: Requires each of the 4 docker version to make a code change and requires a standard going forward.
- Use Environment Scoped Variables: We can move these variables in the pipeline to the project CI/CD Variables settings. We can define multiple variables environments.
- Pros: No changes required.
- Cons: Requires Anchores to made a change on each version change. requires synchronizing the env var for master to be changed just before merging the MR.
- Create a Manifest file similar to IronBank. The Manifest will have the Tag or Tags.
- Pros: Great flexibility. Supports future configurations. Follows IB standards.
- Cons: Requires each of the 4 docker version to make a code change and requires a standard going forward.
Recommendation is Option 3.