Allow CI_APPLICATION_REPOSITORY and CI_APPLICATION_TAG to be custom defined
I'm trying to integrate Auto DevOps into my existing CI pipelines. The Docker image naming strategy in Auto DevOps is defined via the CI_APPLICATION_REPOSITORY
and CI_APPLICATION_TAG
variables near the start of the auto_devops before_script. The format differs from the way I name and tag images, but the inline export statements make it difficult to customize since the script itself has to be modified.
export CI_APPLICATION_REPOSITORY=$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG
export CI_APPLICATION_TAG=$CI_COMMIT_SHA
It would be more convenient if CI_APPLICATION_REPOSITORY
and CI_APPLICATION_TAG
were declared as YAML-defined global variables. That way, they can be easily customized, or even overridden by higher priority variables.
Auto DevOps:
variables:
CI_APPLICATION_REPOSITORY: $CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG
CI_APPLICATION_TAG: $CI_COMMIT_SHA
My Override:
variables:
CI_APPLICATION_REPOSITORY: $CI_REGISTRY_IMAGE
CI_APPLICATION_TAG: $CI_COMMIT_REF_SLUG
This relates a little bit to #36, and influences the effectiveness of !136 (closed).
Edited by King Chung Huang