Commit df140fb2 authored by Jan Kiene's avatar Jan Kiene
Browse files

use checkout instead of switch --detach

parent 485aa1f1
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -7,9 +7,10 @@
    - ivas-linux
  before_script:
    - |
      if [[ "$IVAS_CODEC_CI_REF" == "" ]]; then echo "Error: IVAS_CODEC_CI_REF not set" && exit 1; fi
      if [[ "$IVAS_CODEC_CI_REF" == "" ]]; then echo "Error: IVAS_CODEC_CI_REF not set" && exit 1; else echo "IVAS_CODEC_CI_REF set to: $IVAS_CODEC_CI_REF"; fi
    # 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
    # NOTE: set CUSTOM_CI_REPO_CLONE_URL in your gitlab setup
    - git clone "$CUSTOM_CI_REPO_CLONE_URL" ivas-codec-ci && pushd ivas-codec-ci && git checkout "$IVAS_CODEC_CI_REF" && popd

.job-windows:
  tags:
@@ -19,7 +20,8 @@
      if (-not $env:IVAS_CODEC_CI_REF) { echo "Error: IVAS_CODEC_CI_REF not set" ; exit 1 }
    # 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
    # NOTE: set CUSTOM_CI_REPO_CLONE_URL in your gitlab setup
    - git clone $env:CUSTOM_CI_REPO_CLONE_URL ivas-codec-ci; pushd ivas-codec-ci ; git switch --detach $env:IVAS_CODEC_CI_REF ; popd

.build-job-linux:
  stage: build