Skip to content

Commit 6c8a67d

Browse files
fix(talos): fail fast on skopeo copy errors in image-talos
The image-talos recipe chains skopeo copy with `;` in a single shell. Without `set -e`, the recipe's exit status is the last command's, so a failed copy in the middle of the chain can be masked by a later successful command — or worse, by a false-branch `if`/`fi` (which exits 0 and would silently hide a push failure on PR builds where both PUBLISH_* flags are 0). Prepend `set -e;` to abort the recipe on the first failure. Also quote "$SRC" defensively. Assisted-By: Claude <[email protected]> Signed-off-by: Myasnikov Daniil <[email protected]>
1 parent ed0297e commit 6c8a67d

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎packages/core/talos/Makefile‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ image: image-matchbox image-talos
1212

1313
image-talos:
1414
test -f ../../../_out/assets/installer-amd64.tar || make talos-installer
15+
set -e; \
1516
SRC=docker-archive:../../../_out/assets/installer-amd64.tar; \
16-
skopeo copy $$SRC docker://$(REGISTRY)/talos:$(IMAGE_TAG); \
17-
if [ "$(PUBLISH_VERSIONED)" = "1" ]; then skopeo copy $$SRC docker://$(REGISTRY)/talos:$(TALOS_VERSION); fi; \
18-
if [ "$(PUBLISH_FLOATING)" = "1" ]; then skopeo copy $$SRC docker://$(REGISTRY)/talos:latest; fi
17+
skopeo copy "$$SRC" docker://$(REGISTRY)/talos:$(IMAGE_TAG); \
18+
if [ "$(PUBLISH_VERSIONED)" = "1" ]; then skopeo copy "$$SRC" docker://$(REGISTRY)/talos:$(TALOS_VERSION); fi; \
19+
if [ "$(PUBLISH_FLOATING)" = "1" ]; then skopeo copy "$$SRC" docker://$(REGISTRY)/talos:latest; fi
1920

2021
image-matchbox:
2122
test -f ../../../_out/assets/kernel-amd64 || make talos-kernel

0 commit comments

Comments
 (0)