Skip to content

Commit

Permalink
Release: Build continous-test image during release (#7842) (#7845)
Browse files Browse the repository at this point in the history
* build continous-test image correctly

* Update .github/workflows/scripts/build-images.sh

Co-authored-by: Oleg Zaytsev <[email protected]>

---------

Co-authored-by: Oleg Zaytsev <[email protected]>
(cherry picked from commit b1d5f2f)

Co-authored-by: Ying WANG <[email protected]>
  • Loading branch information
grafanabot and ying-jeanne authored Apr 8, 2024
1 parent 8b88e55 commit 52d1df3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/scripts/build-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,10 @@ for target in $@
do
DIRNAME="$(dirname "$target")"
NAME="$(basename "$DIRNAME")"
make BUILD_IN_CONTAINER=false PUSH_MULTIARCH_TARGET="type=oci,dest=$OUTPUT/$NAME.oci" PUSH_MULTIARCH_TARGET_DISTROLESS="type=oci,dest=$OUTPUT/$NAME\-distroless.oci" push-multiarch-$target
make \
BUILD_IN_CONTAINER=false \
PUSH_MULTIARCH_TARGET="type=oci,dest=$OUTPUT/$NAME.oci" \
PUSH_MULTIARCH_TARGET_DISTROLESS="type=oci,dest=$OUTPUT/$NAME\-distroless.oci" \
PUSH_MULTIARCH_TARGET_CONTINUOUS_TEST="type=oci,dest=$OUTPUT/$NAME\-continuous\-test.oci" \
push-multiarch-$target
done
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ SED ?= $(shell which gsed 2>/dev/null || which sed)
# CI workflow uses PUSH_MULTIARCH_TARGET="type=oci,dest=file.oci" to store images locally for next steps in the pipeline.
PUSH_MULTIARCH_TARGET ?= type=registry
PUSH_MULTIARCH_TARGET_DISTROLESS ?= type=registry
PUSH_MULTIARCH_TARGET_CONTINUOUS_TEST ?= type=registry

# This target compiles mimir for linux/amd64 and linux/arm64 and then builds and pushes a multiarch image to the target repository.
# We don't do separate building of single-platform and multiplatform images here (as we do for push-multiarch-build-image), as
Expand All @@ -168,7 +169,7 @@ push-multiarch-%/$(UPTODATE):
# Build Dockerfile.continuous-test
if [ -f $(DIR)/Dockerfile.continuous-test ]; then \
$(SUDO) docker buildx build -f $(DIR)/Dockerfile.continuous-test \
-o $(PUSH_MULTIARCH_TARGET) \
-o $(PUSH_MULTIARCH_TARGET_CONTINUOUS_TEST) \
--platform linux/amd64,linux/arm64 \
--build-arg=revision=$(GIT_REVISION) \
--build-arg=goproxyValue=$(GOPROXY_VALUE) \
Expand Down

0 comments on commit 52d1df3

Please sign in to comment.