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
echo "Updating ${DEFAULT_IMAGES_FILE} for release branch ${BRANCH_NAME}..."
423
+
# Update specific images to use the release branch tag
424
+
if ! sed -i -E "s|(quay\.io/openstack-k8s-operators/openstack-ansibleee-runner):latest|\1:${BRANCH_NAME}-latest|g" "${DEFAULT_IMAGES_FILE}"; then
425
+
handle_repo_error "${repo_name}" "Failed to update openstack-ansibleee-runner in ${DEFAULT_IMAGES_FILE}" "$TEMP_DIR"
426
+
fi
427
+
if ! sed -i -E "s|(quay\.io/openstack-k8s-operators/openstack-baremetal-operator-agent):latest|\1:${BRANCH_NAME}-latest|g" "${DEFAULT_IMAGES_FILE}"; then
428
+
handle_repo_error "${repo_name}" "Failed to update openstack-baremetal-operator-agent in ${DEFAULT_IMAGES_FILE}" "$TEMP_DIR"
429
+
fi
430
+
if ! sed -i -E "s|(quay\.io/openstack-k8s-operators/openstack-must-gather):latest|\1:${BRANCH_NAME}-latest|g" "${DEFAULT_IMAGES_FILE}"; then
431
+
handle_repo_error "${repo_name}" "Failed to update openstack-must-gather in ${DEFAULT_IMAGES_FILE}" "$TEMP_DIR"
432
+
fi
433
+
434
+
# Check if there are changes to commit and push
435
+
if ! git diff --quiet -- "${DEFAULT_IMAGES_FILE}"; then
436
+
echo "Changes detected in ${DEFAULT_IMAGES_FILE}"
437
+
# FAIL if commit and push fails
438
+
if ! commit_and_push "[${BRANCH_NAME}] Update default images for ${BRANCH_NAME}" "${DEFAULT_IMAGES_FILE}" "${BRANCH_NAME}"; then
439
+
handle_repo_error "${repo_name}" "Failed to commit and push ${DEFAULT_IMAGES_FILE} changes" "$TEMP_DIR"
440
+
fi
441
+
BRANCH_PUSHED=true
442
+
else
443
+
echo "No changes detected in ${DEFAULT_IMAGES_FILE}."
444
+
fi
445
+
else
446
+
echo "No ${DEFAULT_IMAGES_FILE} found in ${repo_name}."
447
+
fi
448
+
fi
449
+
418
450
# Push the branch if it wasn't already pushed via commit_and_push
419
451
if [ "$BRANCH_PUSHED" = "false" ]; then
420
452
echo "Pushing branch ${BRANCH_NAME} without Makefile changes."
0 commit comments