Skip to content

Commit

Permalink
Use bundle digest in build script for offline compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
abays authored and openshift-cherrypick-robot committed Mar 28, 2024
1 parent 83c5d31 commit 1b019f4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/build_and_push_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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}
Expand Down

0 comments on commit 1b019f4

Please sign in to comment.