diff options
Diffstat (limited to 'scripts/checkout-mr-source-sha')
-rwxr-xr-x | scripts/checkout-mr-source-sha | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/checkout-mr-source-sha b/scripts/checkout-mr-source-sha new file mode 100755 index 00000000000..962e3f1348d --- /dev/null +++ b/scripts/checkout-mr-source-sha @@ -0,0 +1,7 @@ +#!/bin/sh + +if [ -n "$CI_MERGE_REQUEST_SOURCE_BRANCH_SHA" ]; then + echo "Checking out \$CI_MERGE_REQUEST_SOURCE_BRANCH_SHA ($CI_MERGE_REQUEST_SOURCE_BRANCH_SHA) instead of \$CI_COMMIT_SHA (merge result commit $CI_COMMIT_SHA) so that code is in sync with gitlab images built upstream." + echo "See https://docs.gitlab.com/ee/development/testing_guide/end_to_end/index.html#with-pipeline-for-merged-results for more details." + git checkout -f ${CI_MERGE_REQUEST_SOURCE_BRANCH_SHA} +fi |