Skip to content

Commit 1d023a7

Browse files
authored
fix(ci): make kernel pin work from CLI (#2495)
If you specified --kernel-pin from cli it will now correctly verify and donwload the right version (instead of the newest one), if it's specified in the Justfile and CLI then CLI wins. The pin that is always set to an empty string would override it.
1 parent a51222d commit 1d023a7

1 file changed

Lines changed: 26 additions & 25 deletions

File tree

Justfile

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -148,31 +148,32 @@ build $image="aurora" $tag="latest" $flavor="main" $rechunk="false" $ghcr="false
148148
# skopeo list-tags docker://ghcr.io/ublue-os/akmods | jq -r '.Tags | map(select(contains("coreos-stable-44")))'
149149
150150
ARCH=$(arch)
151-
152-
case "${tag}" in
153-
stable)
154-
if [[ "${ARCH}" == "x86_64" ]]; then
155-
# <Here is a link why we have it pinned>
156-
kernel_pin=""
157-
elif [[ "${ARCH}" == "aarch64" ]]; then
158-
kernel_pin=""
159-
fi
160-
;;
161-
latest)
162-
if [[ "${ARCH}" == "x86_64" ]]; then
163-
kernel_pin=""
164-
elif [[ "${ARCH}" == "aarch64" ]]; then
165-
kernel_pin=""
166-
fi
167-
;;
168-
testing)
169-
if [[ "${ARCH}" == "x86_64" ]]; then
170-
kernel_pin=""
171-
elif [[ "${ARCH}" == "aarch64" ]]; then
172-
kernel_pin=""
173-
fi
174-
;;
175-
esac
151+
if [[ -z "${kernel_pin:-}" ]]; then
152+
case "${tag}" in
153+
stable)
154+
if [[ "${ARCH}" == "x86_64" ]]; then
155+
# <Here is a link why we have it pinned>
156+
kernel_pin=""
157+
elif [[ "${ARCH}" == "aarch64" ]]; then
158+
kernel_pin=""
159+
fi
160+
;;
161+
latest)
162+
if [[ "${ARCH}" == "x86_64" ]]; then
163+
kernel_pin=""
164+
elif [[ "${ARCH}" == "aarch64" ]]; then
165+
kernel_pin=""
166+
fi
167+
;;
168+
testing)
169+
if [[ "${ARCH}" == "x86_64" ]]; then
170+
kernel_pin=""
171+
elif [[ "${ARCH}" == "aarch64" ]]; then
172+
kernel_pin=""
173+
fi
174+
;;
175+
esac
176+
fi
176177
177178
if [[ -z "${kernel_pin:-}" ]]; then
178179
kernel_release=$(skopeo inspect --retry-times 3 docker://ghcr.io/ublue-os/akmods:"${akmods_flavor}"-"${fedora_version}" | jq -r '.Labels["ostree.linux"]')

0 commit comments

Comments
 (0)