Use the (merge) commit sha when building CNG components
- The assets cache image is built against the merge commit (aka `$CI_COMMIT_SHA`): https://gitlab.com/gitlab-org/gitlab/-/blob/db839bf23e216b43e8b920265d7dc814a9365cc9/.gitlab/ci/frontend.gitlab-ci.yml#L58-63 - The CNG images are built against the branch: https://gitlab.com/gitlab-org/gitlab/-/blob/db839bf23e216b43e8b920265d7dc814a9365cc9/scripts/trigger-build#L181 - The problem is that the branch `HEAD` commit isn't the same as the merge commit, thus assets in the assets image have a high chance of having a different hash than the actual assets that would be generated from the branch `HEAD`. - The correct assets are the ones generated from the merge commit, so we're changing the CNG trigger variables to pass `GITLAB_VERSION=$CI_COMMIT_SHA` instead of `GITLAB_VERSION=$CI_COMMIT_REF_NAME` so that the components are built from the same commit as the assets image. Signed-off-by: Rémy Coutable <remy@rymai.me>
Showing
Please register or sign in to comment