CI_COMMIT_SHA does not allow for `package-and-qa` to run
Summary
package-and-qa
passes down CI_COMMIT_SHA
which is dynamically generated with after #200037 (closed)
Steps to reproduce
- Create a merge request in
gitlab-org/gitlab
- Run
package-and-qa
- See error like
The following shell command exited with status 128:
$ git -c core.autocrlf=false checkout 6d7224ebf5f9e52f0354f38ce8dcf8fb685bdb97 -f -q
Output:
(nothing)
Error:
fatal: reference is not a tree: 6d7224ebf5f9e52f0354f38ce8dcf8fb685bdb97
where 6d7224eb is the SHA generated with the pipeline
Potential Fix
Pass down CI_MERGE_REQUEST_SOURCE_BRANCH_SHA
instead of CI_COMMIT_SHA
for trigger_build