@@ -27,12 +27,12 @@ steps:
2727 wait_for_completion() {
2828 echo "##[debug] Waiting for all background import tasks to complete..."
2929 # Nameref to the array name passed as $1 (requires Bash 4.3+)
30- local -n arr=$1
30+ local -n arr=$1
3131 local exit_code=0
3232 for pid in "${arr[@]}"; do
3333 # Wait for each process and check its exit code
34- wait "${pid}" || {
35- echo "##[error] Import task with PID ${pid} failed. The pipeline will fail."
34+ wait "${pid}" || {
35+ echo "##[error] Import task with PID ${pid} failed. The pipeline will fail."
3636 exit_code=1
3737 }
3838 done
6565
6666 echo "##[debug] Authenticating with Destination Registry ${DEST_REGISTRY}..."
6767 az acr login --name "${DEST_REGISTRY}"
68-
68+
6969 # Reset subscription back to Source to get the list of repositories.
7070 echo "##[debug] Resetting subscription to Source (${SRC_REGISTRY}) to list repositories."
7171 az account set -s "${SRC_HUB_SUB_ID}"
@@ -88,10 +88,10 @@ steps:
8888 # 5. Perform the parallel import/tagging loop
8989 echo "##[section] Starting Parallel Import/Tagging"
9090 for repo in ${repos}; do
91-
91+
9292 # Set subscription to SOURCE for the tag existence check
9393 az account set -s "${SRC_HUB_SUB_ID}"
94-
94+
9595 # Check if the specific tag exists for the repository
9696 tag_exists=$(az acr repository show-tags \
9797 --name "${SRC_REGISTRY}" \
@@ -104,11 +104,11 @@ steps:
104104 az account set -s "${DEST_HUB_SUB_ID}"
105105
106106 if [[ -n "$tag_exists" ]]; then
107- # If cross-registry, src_reg_prefix is empty (path: repo:tag).
107+ # If cross-registry, src_reg_prefix is empty (path: repo:tag).
108108 # If same-registry, src_reg_prefix is FQDN (path: acr.azurecr.io/repo:tag).
109109 SOURCE_IMAGE_PATH="${src_reg_prefix}${repo}:${SELECT_IMAGE_TAG}"
110110 DEST_IMAGE_PATH="${repo}:${ADD_IMAGE_TAG}"
111-
111+
112112 echo "##[debug] Importing ${SOURCE_IMAGE_PATH} to ${DEST_REGISTRY}/${DEST_IMAGE_PATH}..."
113113
114114 # az acr import runs against the currently selected subscription (DEST_HUB_SUB_ID).
0 commit comments