Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump actionpack from 6.1.7.8 to 6.1.7.9 #3004

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
CNJR-5954: Push unified manifest to DockerHub
szh committed Sep 13, 2024
commit c40c5d533ef1d9092b8d8e495a3ee87ccb31c5dc
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions publish-images.sh
Original file line number Diff line number Diff line change
@@ -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
20 changes: 20 additions & 0 deletions publish-manifest.sh
Original file line number Diff line number Diff line change
@@ -22,6 +22,7 @@ function print_help() {
PUBLISH_EDGE=false
PUBLISH_INTERNAL=false
PROMOTE=false
DOCKERHUB=false
VERSION=$(<VERSION)

LOCAL_TAG="$(version_tag)"
@@ -40,6 +41,10 @@ for arg in "$@"; do
PROMOTE=true
shift
;;
--dockerhub )
DOCKERHUB=true
shift
;;
--version=* )
VERSION="${arg#*=}"
shift
@@ -86,6 +91,14 @@ if [[ "${PUBLISH_EDGE}" = true ]]; then
# Push manifest to internal registry
prepare_manifest "registry.tld/${IMAGE_NAME}" "edge"
prepare_manifest "registry.tld/conjur-ubi" "edge"

# Publish manifests to dockerhub
if [[ "${DOCKERHUB}" = true ]]; then
echo "Pushing to DockerHub"

prepare_manifest "${IMAGE_NAME}" "${VERSION}"
prepare_manifest "${IMAGE_NAME}" "edge"
fi
fi

if [[ "${PROMOTE}" = true ]]; then
@@ -99,5 +112,12 @@ if [[ "${PROMOTE}" = true ]]; then

prepare_manifest "registry.tld/${IMAGE_NAME}" "${version}"
prepare_manifest "registry.tld/conjur-ubi" "${version}"

# Publish manifests to dockerhub
if [[ "${DOCKERHUB}" = true ]]; then
echo "Pushing to DockerHub"

prepare_manifest "${IMAGE_NAME}" "${version}"
fi
done
fi