Repository navigation
Commit 65889b6
committed
fix(e2e): capture ghcr-mirror probe inside if so dash errexit does not abort
The chainsaw kubernetes suites run this helper under `sh -c` with `set -eu`,
and dash inherits errexit into command substitutions. A bare
`out=$(kubectl get deploy ...); rc=$?` therefore aborts the whole script the
moment kubectl exits non-zero (NotFound or a transient error), so neither
fallback branch runs and the suite hard-fails at tenant CR creation instead of
pulling ghcr.io directly, inverting the helper's 'can only help, never make CI
worse' contract. bash does not inherit errexit into $(), which is why it
survived local (bash) runs. Capture inside `if out=$(...); then rc=0; else
rc=$?; fi` (the form talos-image-cache.sh already uses).
Refs #3513
Signed-off-by: IvanHunters <[email protected]>1 parent 2692c49 commit 65889b6
1 file changed
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
57 | 67 | | |
58 | 68 | | |
59 | 69 | | |
| |||
0 commit comments