Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pkg/types/on-demand.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ copyImageFromRegistry() {
exit 1
fi
done
echo "Mirroring the source image '${SOURCE_REGISTRY}/${REPOSITORY}@${DIGEST}' to target registry '${TARGET_ACR}'."
ACR_DOMAIN_SUFFIX="$(az cloud show --query "suffixes.acrLoginServerEndpoint" --output tsv)"
if [[ "${SOURCE_REGISTRY}" == "${TARGET_ACR}${ACR_DOMAIN_SUFFIX}" ]]; then
echo "Source and target registry are the same. No mirroring needed."
Expand Down Expand Up @@ -70,7 +71,7 @@ copyImageFromRegistry() {
# it is crucial though, that the tagged image is not used in favor of the @sha256:digest one
# as the tag is NOT guaranteed to be immutable
TARGET_IMAGE="${TARGET_ACR_LOGIN_SERVER}/${REPOSITORY}:${DIGEST_NO_PREFIX}"
echo "Mirroring image ${SRC_IMAGE} to ${TARGET_IMAGE}."
echo "Executing Mirroring of image ${SRC_IMAGE} to ${TARGET_IMAGE}."
echo "The image will still be available under it's original digest ${DIGEST} in the target registry."
oras cp "${SRC_IMAGE}" "${TARGET_IMAGE}" --from-registry-config "${AUTH_JSON}" --to-registry-config "${AUTH_JSON}"
}
Expand Down
Loading