Skip to content

Commit

Permalink
Updated test to build only linux/amd64.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSkrypnyk committed Dec 2, 2024
1 parent d14ca1a commit 4acfded
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions tests/bats/_helper.bash
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,13 @@ setup() {
fi
# LCOV_EXCL_END

if [ "$(uname -m)" = "arm64" ]; then
export DOCKER_DEFAULT_PLATFORM=linux/amd64
fi

if [ -n "${DOCKER_DEFAULT_PLATFORM-}" ]; then
step "Using ${DOCKER_DEFAULT_PLATFORM} platform architecture."
fi
export DOCKER_DEFAULT_PLATFORM="${DOCKER_DEFAULT_PLATFORM:-linux/amd64}"
step "Using ${DOCKER_DEFAULT_PLATFORM} platform architecture."

# Due to a limitation in buildx, we are building for a single platform for these tests.
# Due to a limitation in buildx driver to build multi-platform images in some
# OSes (like MacOS), we are building for a single platform by default.
export BUILDX_PLATFORMS="${DOCKER_DEFAULT_PLATFORM:-linux/amd64}"
step "Building for ${BUILDX_PLATFORMS} platforms."
export DOCKER_BUILDKIT=1

export TEST_DOCKER_TAG_PREFIX="bats-test-"
Expand Down

0 comments on commit 4acfded

Please sign in to comment.