Skip to content

Commit

Permalink
Move container registry logins around
Browse files Browse the repository at this point in the history
It looks like docker login might be getting overridden so move the
logins around so that login to infrawatch repo happens, followed by
appropriate actions, and then login to infrawatch-operators prior to the
bundle and index image operations.
  • Loading branch information
leifmadsen committed Oct 12, 2023
1 parent c4117e6 commit 9881ffd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions releaser.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ ARTIFACT_IMAGES=${ARTIFACT_IMAGES:-"sg-core sg-bridge prometheus-webhook-snmp se
echo "SGO result dir: ${SGO_BUNDLE_RESULT_DIR}"
echo "STO result dir: ${STO_BUNDLE_RESULT_DIR}"

# login to quay.io registry so we can push bundles to infrawatch-operators organization
echo "${QUAY_INFRAWATCH_OPERATORS_PASSWORD}" | docker login -u="${QUAY_INFRAWATCH_OPERATORS_USERNAME}" --password-stdin quay.io || exit

# login to quay.io registry so we can push bundles to infrawatch organization
echo "${QUAY_INFRAWATCH_PASSWORD}" | docker login -u="${QUAY_INFRAWATCH_USERNAME}" --password-stdin quay.io || exit

Expand All @@ -29,6 +26,9 @@ for IMAGE in ${ARTIFACT_IMAGES}; do
skopeo copy "docker://quay.io/infrawatch/${IMAGE}:${IMAGE_TAG}" "docker://quay.io/infrawatch/${IMAGE}:${INSPECTION_TAG}"
done

# login to quay.io registry so we can push bundles to infrawatch-operators organization
echo "${QUAY_INFRAWATCH_OPERATORS_PASSWORD}" | docker login -u="${QUAY_INFRAWATCH_OPERATORS_USERNAME}" --password-stdin quay.io || exit

# Smart Gateway Operator bundle creation

# -- Get hashes for images so they can be replaced in the bundle manifest for relatedImages
Expand All @@ -42,7 +42,7 @@ echo "## sg-core image hash: ${SG_CORE_IMAGE_HASH}"

echo "-- Get sg-bridge image hash"
SG_BRIDGE_IMAGE_HASH=$(skopeo inspect docker://quay.io/infrawatch/sg-bridge:"${INSPECTION_TAG}" | jq -c '.Digest' | sed -e 's/^"//' -e 's/"$//' -)
echo "## sg-bridge image hhash: ${SG_BRIDGE_IMAGE_HASH}"
echo "## sg-bridge image hash: ${SG_BRIDGE_IMAGE_HASH}"

echo "-- Create Smart Gateway Operator bundle"
pushd "${GITHUB_WORKSPACE}/smart-gateway-operator/" || exit
Expand Down

0 comments on commit 9881ffd

Please sign in to comment.