diff --git a/includes/job-templates.yml b/includes/job-templates.yml index 2218f0453711b82446dd1ff06933d72dfbb5fb2d..cf13d7742f8e0ef158471ae78add1a67a1431565 100644 --- a/includes/job-templates.yml +++ b/includes/job-templates.yml @@ -8,7 +8,8 @@ before_script: - | if [[ "$IVAS_CODEC_CI_REF" == "" ]]; then echo "Error: IVAS_CODEC_CI_REF not set" && exit 1; fi - - git clone "$CI_SERVER_URL"/ivas-codec-pc/ivas-codec-ci.git --depth 1 --branch "$IVAS_CODEC_CI_REF" + # note: git clone -b does not work with SHA refs, hence using the safe way of a full clone and git switch + - git clone "$CI_SERVER_URL"/ivas-codec-pc/ivas-codec-ci.git && pushd ivas-codec-ci && git switch --detach "$IVAS_CODEC_CI_REF" && popd .job-windows: tags: @@ -16,7 +17,9 @@ before_script: - | if (-not $env:IVAS_CODEC_CI_REF) { echo "Error: IVAS_CODEC_CI_REF not set" ; exit 1 } - - git clone $env:CI_SERVER_URL/ivas-codec-pc/ivas-codec-ci.git --depth 1 --branch $env:IVAS_CODEC_CI_REF + # note: git clone -b does not work with SHA refs, hence using the safe way of a full clone and git switch + # also, we cannot use && with powershell < 7 unfortunately, hence we cannot reliably detect if the snippet fails + - git clone $env:CI_SERVER_URL/ivas-codec-pc/ivas-codec-ci.git; pushd ivas-codec-ci ; git switch --detach $env:IVAS_CODEC_CI_REF ; popd .build-job-linux: stage: build