Skip to content

Commit

Permalink
CNJR-5954: Skip latest tag for this patch
Browse files Browse the repository at this point in the history
  • Loading branch information
szh committed Sep 13, 2024
1 parent 16c4505 commit ce637ed
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -1173,9 +1173,9 @@ pipeline {
script {
release(INFRAPOOL_EXECUTORV2_AGENT_0) { billOfMaterialsDirectory, assetDirectory ->
// Publish docker images
INFRAPOOL_EXECUTORV2_AGENT_0.agentSh './publish-images.sh --edge --dockerhub'
INFRAPOOL_EXECUTORV2ARM_AGENT_0.agentSh './publish-images.sh --edge --arch=arm64'
INFRAPOOL_EXECUTORV2_AGENT_0.agentSh './publish-manifest.sh --edge'
// INFRAPOOL_EXECUTORV2_AGENT_0.agentSh './publish-images.sh --edge --dockerhub'
// INFRAPOOL_EXECUTORV2ARM_AGENT_0.agentSh './publish-images.sh --edge --arch=arm64'
// INFRAPOOL_EXECUTORV2_AGENT_0.agentSh './publish-manifest.sh --edge'

// Create deb and rpm packages (ARM64)
INFRAPOOL_EXECUTORV2ARM_AGENT_0.agentSh 'echo "CONJUR_VERSION=5" >> debify.env'
Expand Down
6 changes: 3 additions & 3 deletions publish-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ if [[ "${PROMOTE}" = true ]]; then
# Push latest, 1.x.y, 1.x, and 1 images
readarray -t prefix_versions < <(gen_versions "${VERSION}")

for version in latest "${prefix_versions[@]}"; do
for version in "${prefix_versions[@]}"; do
echo "Pushing images for tag: $version-${ARCH}"

tag_and_push "${version}-${ARCH}" "registry.tld/${IMAGE_NAME}:${LOCAL_TAG}-${ARCH}" "registry.tld/${IMAGE_NAME}"
Expand All @@ -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 "${RH_LOCAL_IMAGE}-${ARCH}" "${REDHAT_REMOTE_IMAGE}"
else
echo 'Failed to log in to quay.io'
exit 1
Expand Down
2 changes: 1 addition & 1 deletion publish-manifest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ if [[ "${PROMOTE}" = true ]]; then
# Push latest, 1.x.y, 1.x, and 1 manifests
readarray -t prefix_versions < <(gen_versions "${VERSION}")

for version in latest "${prefix_versions[@]}"; do
for version in "${prefix_versions[@]}"; do
echo "Preparing manifests for tag: $version"

prepare_manifest "registry.tld/${IMAGE_NAME}" "${version}"
Expand Down

0 comments on commit ce637ed

Please sign in to comment.