Skip to content

Commit

Permalink
fixup! Build multi-arch index, bundle and digest bundles
Browse files Browse the repository at this point in the history
  • Loading branch information
AObuchow committed Dec 6, 2023
1 parent 8b80138 commit cb30572
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
7 changes: 4 additions & 3 deletions build/scripts/build_digests_bundle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ Arguments:
--push <IMAGE> : Push processed digests bundle to <IMAGE> (required). Pushing the bundle image to a
repository is required because opm render works from a remote repository.
--container-tool <TOOL> : Use specific container tool for building/pushing images (default: use podman).
--multi-arch : Create images for the following architectures: $ARCHITECTURES
--multi-arch : Create images for the following architectures: $ARCHITECTURES. Note: Docker buildx will be
used for building and pushing the images, instead of the container tool selected with --container-tool.
--debug, -d : Print debug information.
--help, -h : Show this message.
EOF
Expand Down Expand Up @@ -146,9 +147,9 @@ fi

if [ "$MULTI_ARCH" == "true" ]; then
info "Building and pushing bundle $PUSH_IMAGE"
docker buildx build -t "$PUSH_IMAGE" -f "${PROCESSED_DIR}/bundle.Dockerfile" "$PROCESSED_DIR" \
docker buildx build -t "$PUSH_IMAGE" -f "${PROCESSED_DIR}/bundle.Dockerfile" "$PROCESSED_DIR" \
--platform "$ARCHITECTURES" \
--push | sed 's|^| |g'
--push 2>&1 | sed 's|^| |g'
else
info "Building bundle $PUSH_IMAGE"
$PODMAN build -t "$PUSH_IMAGE" -f "${PROCESSED_DIR}/bundle.Dockerfile" "$PROCESSED_DIR" | sed 's|^| |g'
Expand Down
8 changes: 5 additions & 3 deletions build/scripts/build_index_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ Arguments:
--container-tool <TOOL> : Use specific container tool for building/pushing images (default: use podman)
--force : Do not prompt for confirmation if pushing to default repos. Intended for
use in CI.
--multi-arch : Create images for the following architectures: $ARCHITECTURES
--multi-arch : Create images for the following architectures: $ARCHITECTURES. Note: Docker
buildx will be used for building and pushing the images, instead of
the container tool selected with --container-tool.
--debug : Don't do any normal cleanup on exit, leaving repo in dirty state
Examples:
Expand Down Expand Up @@ -137,7 +139,7 @@ make generate_olm_bundle_yaml

echo "Building bundle image $BUNDLE_IMAGE"
if [ "$MULTI_ARCH" == "true" ]; then
docker buildx build . -t "$BUNDLE_IMAGE" -f build/bundle.Dockerfile \
docker buildx build . -t "$BUNDLE_IMAGE" -f build/bundle.Dockerfile \
--platform "$ARCHITECTURES" \
--push
else
Expand Down Expand Up @@ -203,7 +205,7 @@ opm validate "$OUTDIR"
# Build index container
echo "Building index image $INDEX_IMAGE"
if [ "$MULTI_ARCH" == "true" ]; then
docker buildx build . -t "$INDEX_IMAGE" -f "$DOCKERFILE" \
docker buildx build . -t "$INDEX_IMAGE" -f "$DOCKERFILE" \
--platform "$ARCHITECTURES" \
--push
else
Expand Down

0 comments on commit cb30572

Please sign in to comment.