Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[0.11 backport] hack/test: allow ALPINE_VERSION to be set from env #4542

Merged
merged 3 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ ARG AZURITE_VERSION=3.18.0

ARG GO_VERSION=1.19
ARG ALPINE_VERSION=3.17
ARG XX_VERSION=1.3.0

# minio for s3 integration tests
FROM minio/minio:${MINIO_VERSION} AS minio
Expand All @@ -33,7 +34,7 @@ FROM alpine:edge@sha256:c223f84e05c23c0571ce8decefef818864869187e1a3ea47719412e2
FROM alpine-$TARGETARCH AS alpinebase

# xx is a helper for cross-compilation
FROM --platform=$BUILDPLATFORM tonistiigi/xx:1.2.1 AS xx
FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx

# go base image
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS golatest
Expand Down
6 changes: 3 additions & 3 deletions hack/images
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ PUSH=$3
. $(dirname $0)/util
set -eu -o pipefail

: ${RELEASE=false}
: ${PLATFORMS=}
: ${TARGET=}
: "${RELEASE=false}"
: "${PLATFORMS=}"
: "${TARGET=}"

versionTag=$(git describe --always --tags --match "v[0-9]*")

Expand Down
24 changes: 13 additions & 11 deletions hack/test
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@
. $(dirname $0)/util
set -eu -o pipefail

: ${GO_VERSION=}
: ${TEST_INTEGRATION=}
: ${TEST_GATEWAY=}
: ${TEST_DOCKERFILE=}
: ${TEST_DOCKERD=}
: ${TEST_DOCKERD_BINARY=$(which dockerd)}
: ${TEST_COVERAGE=}
: ${TEST_KEEP_CACHE=}
: ${DOCKERFILE_RELEASES=}
: ${BUILDKIT_WORKER_RANDOM=}
: ${BUILDKITD_TAGS=}
: "${ALPINE_VERSION=}"
: "${GO_VERSION=}"
: "${TEST_INTEGRATION=}"
: "${TEST_GATEWAY=}"
: "${TEST_DOCKERFILE=}"
: "${TEST_DOCKERD=}"
: "${TEST_DOCKERD_BINARY=$(which dockerd)}"
: "${TEST_COVERAGE=}"
: "${TEST_KEEP_CACHE=}"
: "${DOCKERFILE_RELEASES=}"
: "${BUILDKIT_WORKER_RANDOM=}"
: "${BUILDKITD_TAGS=}"

if [ "$TEST_DOCKERD" == "1" ]; then
if [ ! -f "$TEST_DOCKERD_BINARY" ]; then
Expand Down Expand Up @@ -62,6 +63,7 @@ if [ "$TEST_COVERAGE" = "1" ]; then
fi

buildxCmd build $cacheFromFlags \
--build-arg ALPINE_VERSION \
--build-arg GO_VERSION \
--build-arg "BUILDKITD_TAGS=$BUILDKITD_TAGS" \
--target "integration-tests" \
Expand Down