Use TOP_UPSTREAM_SOURCE_SHA as QA_IMAGE_TAG for gitlab project
What does this MR do and why?
If someone creates a branch with an underscore rather than a hyphen the docker image cannot be found.
e.g. https://gitlab.com/gitlab-org/gitlab-qa-mirror/-/jobs/2401675970
However, if you lookup the docker image with a name that replaces all '_' with '-' we can find the image.
We have also had a number of cases where people have created branch names longer than 63 characters long and encountered errors.
See Internal link for details
Given that the docker image is generated using CI_COMMIT_REF_SLUG
https://docs.gitlab.com/ee/ci/variables/predefined_variables.html it's clear that there are other potential failing cases that may occur as well if special chars are present in a branch name.
With that in mind this change updates QA_IMAGE_TAG
variable to use the TOP_UPSTREAM_SOURCE_SHA
to avoid any issues caused by people using branches with complex names.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.