Skip to content

Commit 4f90dfb

Browse files
committed
ci(workflows): pin flux version in build toolchain steps
The "Set up build toolchain" steps installed flux with a bare `curl https://fluxcd.io/install.sh | sudo bash`, letting the installer resolve its floating "latest". latest had advanced to v2.9.5, and a matrix job on PR #4429 failed when that release's checksums transiently 4xx'd during install. Pin FLUX_VERSION to 2.8.6 and guard on the installed client version, the same shape the "Set up promotion toolchain" steps already use, so the flux CLI is fixed and reproducible across CI instead of following latest. This does not remove the checksum host's transient errors; it removes the uncontrolled version bump. Related to the yq floating-latest pin in #3640. Assisted-by: LLM Signed-off-by: IvanHunters <[email protected]>
1 parent 5f5d8e9 commit 4f90dfb

4 files changed

Lines changed: 32 additions & 10 deletions

File tree

‎.github/workflows/build-main.yaml‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,15 @@ jobs:
6363
# Ephemeral runners lack the flux CLI the installer's image-packages step
6464
# shells out to; install if absent (idempotent).
6565
- name: Set up build toolchain
66+
env:
67+
FLUX_VERSION: "2.8.6"
6668
run: |
67-
command -v flux >/dev/null \
68-
|| curl -fsSL https://fluxcd.io/install.sh | sudo bash
69+
if ! flux version --client 2>/dev/null | grep -qx "flux: v${FLUX_VERSION}"; then
70+
install_script="$(mktemp)"
71+
curl -fsSL https://fluxcd.io/install.sh -o "$install_script"
72+
sudo env "FLUX_VERSION=$FLUX_VERSION" bash "$install_script"
73+
rm -f "$install_script"
74+
fi
6975
7076
- name: Set up Docker config
7177
run: |

‎.github/workflows/build-release.yaml‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,15 @@ jobs:
109109
# Ephemeral runners lack the flux CLI the installer's image-packages step
110110
# shells out to; install if absent (idempotent).
111111
- name: Set up build toolchain
112+
env:
113+
FLUX_VERSION: "2.8.6"
112114
run: |
113-
command -v flux >/dev/null \
114-
|| curl -fsSL https://fluxcd.io/install.sh | sudo bash
115+
if ! flux version --client 2>/dev/null | grep -qx "flux: v${FLUX_VERSION}"; then
116+
install_script="$(mktemp)"
117+
curl -fsSL https://fluxcd.io/install.sh -o "$install_script"
118+
sudo env "FLUX_VERSION=$FLUX_VERSION" bash "$install_script"
119+
rm -f "$install_script"
120+
fi
115121
116122
- name: Set up Docker config
117123
run: |

‎.github/workflows/pull-requests.yaml‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -355,11 +355,13 @@ jobs:
355355
# installer is built in finalize, but some package image targets shell out
356356
# to flux; install it if absent (idempotent, cheap).
357357
- name: Set up build toolchain
358+
env:
359+
FLUX_VERSION: "2.8.6"
358360
run: |
359-
if ! command -v flux >/dev/null; then
361+
if ! flux version --client 2>/dev/null | grep -qx "flux: v${FLUX_VERSION}"; then
360362
install_script="$(mktemp)"
361363
curl -fsSL https://fluxcd.io/install.sh -o "$install_script"
362-
sudo bash "$install_script"
364+
sudo env "FLUX_VERSION=$FLUX_VERSION" bash "$install_script"
363365
rm -f "$install_script"
364366
fi
365367
- name: Set up Docker config
@@ -574,11 +576,13 @@ jobs:
574576
fetch-depth: 0
575577
fetch-tags: true
576578
- name: Set up build toolchain
579+
env:
580+
FLUX_VERSION: "2.8.6"
577581
run: |
578-
if ! command -v flux >/dev/null; then
582+
if ! flux version --client 2>/dev/null | grep -qx "flux: v${FLUX_VERSION}"; then
579583
install_script="$(mktemp)"
580584
curl -fsSL https://fluxcd.io/install.sh -o "$install_script"
581-
sudo bash "$install_script"
585+
sudo env "FLUX_VERSION=$FLUX_VERSION" bash "$install_script"
582586
rm -f "$install_script"
583587
fi
584588
- name: Download patch fragments

‎.github/workflows/tags.yaml‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,15 @@ jobs:
144144
# shells out to; install if absent (idempotent).
145145
- name: Set up build toolchain
146146
if: steps.check_release.outputs.release_exists == 'false'
147+
env:
148+
FLUX_VERSION: "2.8.6"
147149
run: |
148-
command -v flux >/dev/null \
149-
|| curl -fsSL https://fluxcd.io/install.sh | sudo bash
150+
if ! flux version --client 2>/dev/null | grep -qx "flux: v${FLUX_VERSION}"; then
151+
install_script="$(mktemp)"
152+
curl -fsSL https://fluxcd.io/install.sh -o "$install_script"
153+
sudo env "FLUX_VERSION=$FLUX_VERSION" bash "$install_script"
154+
rm -f "$install_script"
155+
fi
150156
151157
- name: Login to GHCR
152158
if: steps.check_release.outputs.release_exists == 'false'

0 commit comments

Comments
 (0)