Skip to content

Commit 60aefcc

Browse files
committed
Preserve image copy retry exit status
1 parent c45e3ac commit 60aefcc

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

.github/workflows/cpflow-promote-staging-to-production.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,9 +355,10 @@ jobs:
355355
if cpflow copy-image-from-upstream -a "${PRODUCTION_APP_NAME}" --org "${CPLN_ORG_PRODUCTION}" --image "${STAGING_IMAGE}"; then
356356
copy_status=0
357357
break
358+
else
359+
copy_status=$?
358360
fi
359361
360-
copy_status=$?
361362
if [[ "${attempt}" -lt "${COPY_IMAGE_RETRIES}" ]]; then
362363
echo "::warning::Image copy attempt ${attempt}/${COPY_IMAGE_RETRIES} failed with exit ${copy_status}; retrying in ${COPY_IMAGE_RETRY_INTERVAL}s."
363364
sleep "${COPY_IMAGE_RETRY_INTERVAL}"

0 commit comments

Comments
 (0)