Skip to content

Commit

Permalink
Merge pull request #4542 from thaJeztah/0.11_alpine_version_buildarg
Browse files Browse the repository at this point in the history
[0.11 backport] hack/test: allow ALPINE_VERSION to be set from env
  • Loading branch information
crazy-max authored Jan 10, 2024
2 parents d3e6c13 + df0923f commit d080776
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
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

0 comments on commit d080776

Please sign in to comment.