You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if ! CPLN_TOKEN="${CPLN_TOKEN_STAGING}" cpln image get "${STAGING_IMAGE}" --org "${CPLN_ORG_STAGING}" -o json >/dev/null; then
366
+
echo "::error::Staging image '${STAGING_IMAGE}' was not found in org '${CPLN_ORG_STAGING}'; aborting promotion."
367
+
exit 1
368
+
fi
352
369
353
370
copy_status=1
354
-
for attempt in $(seq 1 "${COPY_IMAGE_RETRIES}"); do
371
+
for attempt in $(seq 1 "${copy_image_attempts}"); do
355
372
if cpflow copy-image-from-upstream -a "${PRODUCTION_APP_NAME}" --org "${CPLN_ORG_PRODUCTION}" --image "${STAGING_IMAGE}"; then
356
373
copy_status=0
357
374
break
358
375
else
359
376
copy_status=$?
360
377
fi
361
378
362
-
if [[ "${attempt}" -lt "${COPY_IMAGE_RETRIES}" ]]; then
363
-
echo "::warning::Image copy attempt ${attempt}/${COPY_IMAGE_RETRIES} failed with exit ${copy_status}; retrying in ${COPY_IMAGE_RETRY_INTERVAL}s."
364
-
sleep "${COPY_IMAGE_RETRY_INTERVAL}"
379
+
if [[ "${attempt}" -lt "${copy_image_attempts}" ]]; then
380
+
echo "::warning::Image copy attempt ${attempt}/${copy_image_attempts} failed with exit ${copy_status}; retrying in ${copy_image_retry_interval}s."
381
+
sleep "${copy_image_retry_interval}"
382
+
else
383
+
echo "::warning::Image copy attempt ${attempt}/${copy_image_attempts} failed with exit ${copy_status}; no attempts remain."
365
384
fi
366
385
done
367
386
368
387
if [[ "${copy_status}" -ne 0 ]]; then
369
-
echo "::error::Could not copy staging image '${STAGING_IMAGE}' from '${CPLN_ORG_STAGING}' to '${CPLN_ORG_PRODUCTION}' after ${COPY_IMAGE_RETRIES} attempt(s)."
388
+
echo "::error::Could not copy staging image '${STAGING_IMAGE}' from '${CPLN_ORG_STAGING}' to '${CPLN_ORG_PRODUCTION}' after ${copy_image_attempts} attempt(s)."
0 commit comments