Feat/kaniko custom image name and tag
What does this MR do and why?
This MR enable the user to set a custom IMAGE_TAG to tag his containers.
Some projects/organizations does not adhere to the default tagging convention $CI_REGISTRY_IMAGE:$VERSION
used here.
If the user set the IMAGE_TAG
variable in the variables section of the .gitlab-ci.yml
, the resulting image will be tagged by it. Else it will be tagged by the default tagging convention $CI_REGISTRY_IMAGE:$VERSION
.
How to set up and validate locally
1- To validate the default behavior, no IMAGE_TAG was provided
- Launch a build without providing the variable
IMAGE_TAG
in the.gitlab-ci.yml
2- To validate the custom tag behavior
-
Set the
IMAGE_TAG
to a custom value such as$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG:$CI_COMMIT_SHA
-
Run the Job