Wrapped the skopeo copy and skopeo inspect commands in folded scalars so the literal docker://… strings no longer confuse the YAML parser

This commit is contained in:
Stephan D
2025-11-07 01:07:53 +01:00
parent b8287802cd
commit 24bd7c82eb

View File

@@ -43,9 +43,13 @@ steps:
- test -s secrets/REGISTRY_USER && test -s secrets/REGISTRY_PASS
- CREDS="$(cat secrets/REGISTRY_USER):$(cat secrets/REGISTRY_PASS)"
# mirror multi-arch image into registry under app version tag
- skopeo copy --all docker://docker.io/library/mongo:${MONGO_VERSION} docker://${REGISTRY_URL}/mirror/mongo:${APP_V} --dest-creds "$CREDS"
- >-
skopeo copy --all docker://docker.io/library/mongo:${MONGO_VERSION}
docker://${REGISTRY_URL}/mirror/mongo:${APP_V} --dest-creds "$CREDS"
# inspect the mirrored image to capture immutable digest
- INSPECT=$(skopeo inspect docker://${REGISTRY_URL}/mirror/mongo:${APP_V} --creds "$CREDS")
- >-
INSPECT=$(skopeo inspect docker://${REGISTRY_URL}/mirror/mongo:${APP_V}
--creds "$CREDS")
- DIGEST="$(printf '%s' "$INSPECT" | tr -d '\n' | sed -n 's/.*"Digest"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p')"
- test -n "$DIGEST"
# store lock both for local deploy metadata and rsync to server