Skip to contentSkip to conversation

ci: Don't do any kernel checkouts for userland jobs

PATCH In review Jan Kiszka 1 participant 2 messages Aug 7, 2024

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 ci: Don't do any kernel checkouts for userland jobs

From: Jan Kiszka <[email protected]>

Testing for PIPELINE_KERNEL being non-zero used to work but became broken with 2e92c3ae2e22.

This also fixes sporadic failures of userland jobs over the evaluations for setting REV.

---
 .gitlab-ci.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
.gitlab-ci.yml +2 -2
index 09702af904..975c4e573d 100644
@@ -41,9 +41,9 @@ variables:
     - apt update
     - ARCH_PACKAGES="PACKAGES_${ARCH}"
     - apt install -y ${PACKAGES} ${!ARCH_PACKAGES}
-    - REV=$(git ls-remote --tags --head --refs ${PIPELINE_KERNEL} | sed -e "s/.*[[:space:]]refs\/\(tags\|heads\)\///" | grep "${PIPELINE_REV}" | sort -r -n -k 1.4 | head -1)
+    - test -n "${PIPELINE_REV} && REV=$(git ls-remote --tags --head --refs ${PIPELINE_KERNEL} | sed -e "s/.*[[:space:]]refs\/\(tags\|heads\)\///" | grep "${PIPELINE_REV}" | sort -r -n -k 1.4 | head -1)
     - test -n "${REV}" || REV="${PIPELINE_REV}"
-    - test -n "${PIPELINE_KERNEL}" && echo "Checking out ${REV}..." && git clone --depth 1 --branch ${REV} ${PIPELINE_KERNEL} ${KDIR}
+    - test -n "${REV}" && echo "Checking out ${REV}..." && git clone --depth 1 --branch ${REV} ${PIPELINE_KERNEL} ${KDIR}
     - case "${ARCH}" in
       "arm64")
       export CROSS_COMPILE=aarch64-linux-gnu-;
Signature · 1 line
2.43.0
author
#1 lore raw
Quoted 18 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

Testing for PIPELINE_KERNEL being non-zero used to work but became broken with 2e92c3ae2e22.

This also fixes sporadic failures of userland jobs over the evaluations for setting REV.

---
 .gitlab-ci.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
.gitlab-ci.yml +0 -0
index 09702af904..975c4e573d 100644

.gitlab-ci.yml variables: · line 44

Quoted 5 lines
.gitlab-ci.yml +1 -1
@@ -41,9 +41,9 @@ variables:
     - apt update
     - ARCH_PACKAGES="PACKAGES_${ARCH}"
     - apt install -y ${PACKAGES} ${!ARCH_PACKAGES}
-    - REV=$(git ls-remote --tags --head --refs ${PIPELINE_KERNEL} | sed -e "s/.*[[:space:]]refs\/\(tags\|heads\)\///" | grep "${PIPELINE_REV}" | sort -r -n -k 1.4 | head -1)
+    - test -n "${PIPELINE_REV} && REV=$(git ls-remote --tags --head --refs ${PIPELINE_KERNEL} | sed -e "s/.*[[:space:]]refs\/\(tags\|heads\)\///" | grep "${PIPELINE_REV}" | sort -r -n -k 1.4 | head -1)

Missing closing '"' - in next is now the version that has it.

Jan

Quoted 6 lines
.gitlab-ci.yml +1 -1
     - test -n "${REV}" || REV="${PIPELINE_REV}"
-    - test -n "${PIPELINE_KERNEL}" && echo "Checking out ${REV}..." && git clone --depth 1 --branch ${REV} ${PIPELINE_KERNEL} ${KDIR}
+    - test -n "${REV}" && echo "Checking out ${REV}..." && git clone --depth 1 --branch ${REV} ${PIPELINE_KERNEL} ${KDIR}
     - case "${ARCH}" in
       "arm64")
       export CROSS_COMPILE=aarch64-linux-gnu-;
Signature · 2 lines
Siemens AG, Technology
Linux Expert Center