Skip to content

Commit

Permalink
dbg
Browse files Browse the repository at this point in the history
Signed-off-by: Ram Lavi <ralavi@redhat.com>
  • Loading branch information
RamLavi committed Dec 16, 2024
1 parent 4f33dbf commit 18e5fd9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,16 @@ container: manager
docker-push:
$(OCI_BIN) push ${TLS_SETTING} ${REGISTRY}/${IMG}:${IMAGE_TAG}
@if [[ "${REGISTRY}" == localhost* || "${REGISTRY}" == 127.0.0.1* ]]; then \
echo "Local registry detected (${REGISTRY}). Skipping IMAGE_GIT_TAG handling."; \
echo "DEBUG: Local registry detected (${REGISTRY}). Skipping IMAGE_GIT_TAG handling."; \
else \
if skopeo inspect docker://${REGISTRY}/${IMG}:${IMAGE_GIT_TAG} >/dev/null 2>&1; then \
echo "Tag '${IMAGE_GIT_TAG}' already exists. Skipping tagging and push."; \
echo "DEBUG: Tag '${IMAGE_GIT_TAG}' already exists. Skipping tagging and push."; \
elif skopeo inspect docker://${REGISTRY}/${IMG}:${IMAGE_GIT_TAG} 2>&1 | grep -q "manifest unknown"; then \
echo "DEBUG: Tag '${IMAGE_GIT_TAG}' does not exist. Tagging and pushing..."; \
$(OCI_BIN) tag ${REGISTRY}/${IMG}:${IMAGE_TAG} ${REGISTRY}/${IMG}:${IMAGE_GIT_TAG}; \
$(OCI_BIN) push ${TLS_SETTING} ${REGISTRY}/${IMG}:${IMAGE_GIT_TAG}; \
else \
echo "Error checking for tag '${IMAGE_GIT_TAG}'. Aborting to avoid potential overwrite."; \
echo "DEBUG: Error occurred while checking for tag '${IMAGE_GIT_TAG}'. Aborting to avoid potential overwrite."; \
exit 1; \
fi; \
fi
Expand Down

0 comments on commit 18e5fd9

Please sign in to comment.