Skip to content

Add hash of branch head to MR pipeline variables

For merged result pipelines, CI_COMMIT_SHA points to a merge commit. If the target branch moved (and the MR merge commit got recalculated) until the merge job runs, it is not possible to fetch CI_COMMIT_SHA from the repo, even though the feature branch head might not have changed. This makes it impossible to validate that the feature branch side of that merge commit used for pipeline triggering actually corresponds to refs/merge-requests/123/head.

Workaround that problem by also passing the head of the feature branch explicitly in the case of merged result pipelines.

Signed-off-by: Michael Hofmann mhofmann@redhat.com

Edited by Michael Hofmann

Merge request reports