From c40c5d533ef1d9092b8d8e495a3ee87ccb31c5dc Mon Sep 17 00:00:00 2001 From: Shlomo Heigh Date: Fri, 13 Sep 2024 10:03:07 -0400 Subject: [PATCH] CNJR-5954: Push unified manifest to DockerHub --- Jenkinsfile | 2 +- publish-images.sh | 4 ++-- publish-manifest.sh | 20 ++++++++++++++++++++ 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3a897befab..c127595ba6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -130,7 +130,7 @@ if (params.MODE == "PROMOTE") { summon -f ./secrets.yml ./publish-images.sh --promote --base-version=${sourceVersion} --version=${targetVersion} --arch=arm64 # Promote manifest that links above images - summon -f ./secrets.yml ./publish-manifest.sh --promote --base-version=${sourceVersion} --version=${targetVersion} + summon -f ./secrets.yml ./publish-manifest.sh --promote --dockerhub --base-version=${sourceVersion} --version=${targetVersion} """ // TODO: In talking to Neil King, this likely won't work until conjurops is migrated over diff --git a/publish-images.sh b/publish-images.sh index 93c56014e1..a3fabf257b 100755 --- a/publish-images.sh +++ b/publish-images.sh @@ -150,13 +150,13 @@ if [[ "${REDHAT}" = true ]]; then # Publish only the tag version to the Redhat container registry if docker login "${REDHAT_REGISTRY}" -u "${REDHAT_USER}" -p "${REDHAT_API_KEY}"; then # push image to red hat - tag_and_push "${VERSION}" "${RH_LOCAL_IMAGE}" "${REDHAT_REMOTE_IMAGE}" + tag_and_push "${VERSION}" "${RH_LOCAL_IMAGE}-${ARCH}" "${REDHAT_REMOTE_IMAGE}" # scan image with preflight tool scan_redhat_image "${REDHAT_REMOTE_IMAGE}:${VERSION}" "${REDHAT_CERT_PID}" # push latest tag to RH - tag_and_push "latest" "${RH_LOCAL_IMAGE}" "${REDHAT_REMOTE_IMAGE}" + tag_and_push "latest" "${RH_LOCAL_IMAGE}-${ARCH}" "${REDHAT_REMOTE_IMAGE}" else echo 'Failed to log in to quay.io' exit 1 diff --git a/publish-manifest.sh b/publish-manifest.sh index e0c75a9676..4863e0b1d2 100755 --- a/publish-manifest.sh +++ b/publish-manifest.sh @@ -22,6 +22,7 @@ function print_help() { PUBLISH_EDGE=false PUBLISH_INTERNAL=false PROMOTE=false +DOCKERHUB=false VERSION=$(