Skip to content

Commit 3d232b7

Browse files
authored
fix: add retry and caching to cert-manager manifest download in e2e-nightly (#324)
Align the nightly workflow's cert-manager install with the composite action's pattern: download with curl -fsSL (3-attempt retry), cache the manifest across runs, and apply from the local file. A transient GitHub CDN failure (504, rate limit) during the download would otherwise kill the E2E job. Closes #322 Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
1 parent b5f5eff commit 3d232b7

1 file changed

Lines changed: 22 additions & 1 deletion

File tree

.github/workflows/e2e-nightly.yaml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ jobs:
131131
/tmp/cert-manager-controller.tar
132132
/tmp/cert-manager-webhook.tar
133133
/tmp/cert-manager-cainjector.tar
134+
/tmp/cert-manager.yaml
134135
/tmp/prometheus.tar
135136
/tmp/stress-ng.tar
136137
/tmp/busybox.tar
@@ -317,10 +318,30 @@ jobs:
317318
/tmp/cert-manager-cainjector.tar \
318319
-c "$CLUSTER_NAME"
319320
321+
- name: Download cert-manager manifest
322+
shell: bash -Eeuo pipefail -x {0}
323+
run: |
324+
if [[ -f /tmp/cert-manager.yaml ]]; then
325+
echo "Cached: /tmp/cert-manager.yaml"
326+
else
327+
for attempt in 1 2 3; do
328+
if curl -fsSL -o /tmp/cert-manager.yaml \
329+
"https://github.com/cert-manager/cert-manager/releases/download/${{ env.CERT_MANAGER_VERSION }}/cert-manager.yaml"; then
330+
break
331+
fi
332+
echo "::warning::cert-manager.yaml download attempt $attempt failed, retrying in 10s..."
333+
sleep 10
334+
if (( attempt == 3 )); then
335+
echo "::error::Failed to download cert-manager.yaml after 3 attempts"
336+
exit 1
337+
fi
338+
done
339+
fi
340+
320341
- name: Install cert-manager
321342
shell: bash -Eeuo pipefail -x {0}
322343
run: |
323-
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/${{ env.CERT_MANAGER_VERSION }}/cert-manager.yaml
344+
kubectl apply -f /tmp/cert-manager.yaml
324345
kubectl wait --for=condition=Available deployment/cert-manager -n cert-manager --timeout=120s
325346
kubectl wait --for=condition=Available deployment/cert-manager-webhook -n cert-manager --timeout=120s
326347
kubectl wait --for=condition=Available deployment/cert-manager-cainjector -n cert-manager --timeout=120s

0 commit comments

Comments
 (0)