Fix commit sha being used instead of tag for tagged pipelines
The change introduced in https://gitlab.com/gitlab-org/gitlab/-/merge_requests/74627 started setting the CI_APPLICATION_TAG in the Auto DevOps template so that it could be used in the CS_DEFAULT_BRANCH_IMAGE value while still being overridden by the calling template. This unintentionally introduced a breaking change for tagged pipelines using the Build template, because the default value for CI_APPLICATION_TAG is the CI_COMMIT_TAG (if it exists) rather then the CI_COMMIT_SHA. This change fixes the issue by referencing CI_COMMIT_SHA in the CS_DEFAULT_BRANCH_IMAGE, and no longer setting the CI_APPLICATION_TAG value in the Auto DevOps template. It is fine if this does not match the CI_APPLICATION_TAG value, because the image tag is currently ignored when CS_DEFAULT_BRANCH_IMAGE is processed by the security report parser. Changelog: fixed
Showing
Please register or sign in to comment