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:
@@ -43,9 +43,13 @@ steps:
|
|||||||
- test -s secrets/REGISTRY_USER && test -s secrets/REGISTRY_PASS
|
- test -s secrets/REGISTRY_USER && test -s secrets/REGISTRY_PASS
|
||||||
- CREDS="$(cat secrets/REGISTRY_USER):$(cat secrets/REGISTRY_PASS)"
|
- CREDS="$(cat secrets/REGISTRY_USER):$(cat secrets/REGISTRY_PASS)"
|
||||||
# mirror multi-arch image into registry under app version tag
|
# 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 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')"
|
- DIGEST="$(printf '%s' "$INSPECT" | tr -d '\n' | sed -n 's/.*"Digest"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p')"
|
||||||
- test -n "$DIGEST"
|
- test -n "$DIGEST"
|
||||||
# store lock both for local deploy metadata and rsync to server
|
# store lock both for local deploy metadata and rsync to server
|
||||||
|
|||||||
Reference in New Issue
Block a user