Skip to content

Commit

Permalink
Merge pull request #460 from Conjur-Enterprise/add-bash-prints
Browse files Browse the repository at this point in the history
CNJR-6315: Add bash prints for promotion debugging
  • Loading branch information
ismarc authored and GitHub Enterprise committed Aug 29, 2024
2 parents cf2c7eb + 4d4cfce commit 783fb8d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function tag_and_push() {

for image in "$@"; do
local target=$image:$tag
echo "Tagging and pushing $target..."
echo "Tagging $source as $target and pushing..."
docker tag "$source" "$target"
docker push "$target"
done
Expand Down
6 changes: 6 additions & 0 deletions publish-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ if [[ "${PUBLISH_EDGE}" = true ]]; then

# Publish release specific and edge tags to dockerhub
if [[ "${DOCKERHUB}" = true ]]; then
echo "Pushing to DockerHub"

tag_and_push "${VERSION}" "${LOCAL_IMAGE}" "${IMAGE_NAME}"
tag_and_push "edge" "${LOCAL_IMAGE}" "${IMAGE_NAME}"
fi
Expand All @@ -130,10 +132,14 @@ if [[ "${PROMOTE}" = true ]]; then
readarray -t prefix_versions < <(gen_versions "${VERSION}")

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

tag_and_push "${version}-${ARCH}" "registry.tld/${IMAGE_NAME}:${LOCAL_TAG}-${ARCH}" "registry.tld/${IMAGE_NAME}"
tag_and_push "${version}-${ARCH}" "registry.tld/conjur-ubi:${LOCAL_TAG}-${ARCH}" "registry.tld/conjur-ubi"

if [[ "${DOCKERHUB}" ]]; then
echo "Pushing to DockerHub"

tag_and_push "${version}" "${LOCAL_IMAGE}" "${IMAGE_NAME}"
fi
done
Expand Down
2 changes: 2 additions & 0 deletions publish-manifest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ if [[ "${PROMOTE}" = true ]]; then
readarray -t prefix_versions < <(gen_versions "${VERSION}")

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

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

0 comments on commit 783fb8d

Please sign in to comment.