ci: fix kdl commit fetch
authorEric Engestrom <eric@igalia.com>
Sat, 18 Nov 2023 16:12:17 +0000 (16:12 +0000)
committerEric Engestrom <eric@engestrom.ch>
Tue, 12 Dec 2023 12:18:48 +0000 (12:18 +0000)
Doing a `clone --depth 1` of the default branch then checking out
a commit that might not be the latest of that branch cannot work.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26270>
(cherry picked from commit 5efa4d56e2b7f2440d263ffb794ab3247d70d529)

.gitlab-ci/container/build-kdl.sh
.pick_status.json

index 5f00cfc..e45127b 100755 (executable)
@@ -5,12 +5,12 @@ set -ex
 
 KDL_REVISION="5056f71b100a68b72b285c6fc845a66a2ed25985"
 
-git clone \
-    https://gitlab.freedesktop.org/gfx-ci/ci-kdl.git \
-    --depth 1 \
-    ci-kdl.git
+mkdir ci-kdl.git
 pushd ci-kdl.git
-git checkout ${KDL_REVISION}
+git init
+git remote add origin https://gitlab.freedesktop.org/gfx-ci/ci-kdl.git
+git fetch --depth 1 origin ${KDL_REVISION}
+git checkout FETCH_HEAD
 popd
 
 python3 -m venv ci-kdl.venv
index fcfd455..1886593 100644 (file)
         "description": "ci: fix kdl commit fetch",
         "nominated": false,
         "nomination_type": 3,
-        "resolution": 4,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null,
         "notes": null