mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-08 21:14:56 +09:00
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 <noreply@anthropic.com> Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
This commit is contained in:
1 file changed
+4
-3
@@ -12,10 +12,11 @@ image: image-matchbox image-talos
|
||||
|
||||
image-talos:
|
||||
test -f ../../../_out/assets/installer-amd64.tar || make talos-installer
|
||||
set -e; \
|
||||
SRC=docker-archive:../../../_out/assets/installer-amd64.tar; \
|
||||
skopeo copy $$SRC docker://$(REGISTRY)/talos:$(IMAGE_TAG); \
|
||||
if [ "$(PUBLISH_VERSIONED)" = "1" ]; then skopeo copy $$SRC docker://$(REGISTRY)/talos:$(TALOS_VERSION); fi; \
|
||||
if [ "$(PUBLISH_FLOATING)" = "1" ]; then skopeo copy $$SRC docker://$(REGISTRY)/talos:latest; fi
|
||||
skopeo copy "$$SRC" docker://$(REGISTRY)/talos:$(IMAGE_TAG); \
|
||||
if [ "$(PUBLISH_VERSIONED)" = "1" ]; then skopeo copy "$$SRC" docker://$(REGISTRY)/talos:$(TALOS_VERSION); fi; \
|
||||
if [ "$(PUBLISH_FLOATING)" = "1" ]; then skopeo copy "$$SRC" docker://$(REGISTRY)/talos:latest; fi
|
||||
|
||||
image-matchbox:
|
||||
test -f ../../../_out/assets/kernel-amd64 || make talos-kernel
|
||||
|
||||
Reference in new issue
Block a user