From e2d372a224c1a0f0c76992d9b5600543dae75515 Mon Sep 17 00:00:00 2001 From: Andrew Bays Date: Mon, 18 Mar 2024 13:38:31 +0000 Subject: [PATCH] Use bundle digest in build script for offline compatibility --- scripts/build_and_push_images.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/build_and_push_images.sh b/scripts/build_and_push_images.sh index 36bfe2bd..08d71a15 100755 --- a/scripts/build_and_push_images.sh +++ b/scripts/build_and_push_images.sh @@ -20,7 +20,7 @@ IMG="$REPO/$OP_NAME":$VERSION IMAGE_TAG_BASE="$REPO/$OP_NAME" -AGENT_IMAGE="$OP_NAME-agent" +AGENT_IMAGE="osp-director-agent" AGENT_IMG_BASE="$REPO/$AGENT_IMAGE" AGENT_IMG="$AGENT_IMG_BASE:$VERSION" @@ -95,6 +95,11 @@ for OSP_RELEASE in ${OSP_RELEASES}; do VERSION=${VERSION_RELEASE} IMAGE_TAG_BASE=${IMAGE_TAG_BASE} make bundle-push #opm alpha bundle validate --tag ${BUNDLE_IMG} -b podman + # Get bundle digest and update BUNDLE_IMG to use that instead of a tag, so that + # offline/air gapped environments will work properly + bundle_digest_image=$(skopeo inspect docker://$BUNDLE_IMG | jq '.Digest' -r) + BUNDLE_IMG="$REPO/$OP_NAME-bundle@$bundle_digest_image" + # Index image opm index add --bundles ${BUNDLE_IMG} --tag ${INDEX_IMG} -u podman --pull-tool podman podman push ${INDEX_IMG}