File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ TESTPKGS=./client TESTFLAGS="--run //worker=containerd -v" ./hack/test integrati
158158DOCKERFILE_RELEASES=labs TESTFLAGS=" --run /TestRunGlobalNetwork/worker=oci$/ -v" ./hack/test dockerfile
159159
160160# enabling go data race detector
161- CGO_ENABLED=1 BUILDFLAGS =" -race" ./hack/test integration
161+ CGO_ENABLED=1 GOBUILDFLAGS =" -race" ./hack/test integration
162162```
163163
164164Set ` TEST_KEEP_CACHE=1 ` for the test framework to keep external dependant images in a docker volume
Original file line number Diff line number Diff line change @@ -94,13 +94,13 @@ FROM buildkit-base AS buildkitd
9494# BUILDKITD_TAGS defines additional Go build tags for compiling buildkitd
9595ARG BUILDKITD_TAGS
9696ARG TARGETPLATFORM
97- ARG BUILDFLAGS
97+ ARG GOBUILDFLAGS
9898ARG VERIFYFLAGS="--static"
9999ARG CGO_ENABLED=0
100100RUN --mount=target=. --mount=target=/root/.cache,type=cache \
101101 --mount=target=/go/pkg/mod,type=cache \
102102 --mount=source=/tmp/.ldflags,target=/tmp/.ldflags,from=buildkit-version \
103- xx-go build ${BUILDFLAGS } -ldflags "$(cat /tmp/.ldflags) -extldflags '-static'" -tags "osusergo netgo static_build seccomp ${BUILDKITD_TAGS}" -o /usr/bin/buildkitd ./cmd/buildkitd && \
103+ xx-go build ${GOBUILDFLAGS } -ldflags "$(cat /tmp/.ldflags) -extldflags '-static'" -tags "osusergo netgo static_build seccomp ${BUILDKITD_TAGS}" -o /usr/bin/buildkitd ./cmd/buildkitd && \
104104 xx-verify ${VERIFYFLAGS} /usr/bin/buildkitd
105105
106106FROM scratch AS binaries-linux
Original file line number Diff line number Diff line change 3636
3737.PHONY : test-race
3838test-race :
39- CGO_ENABLED=1 BUILDFLAGS =" -race" ./hack/test integration gateway dockerfile
39+ CGO_ENABLED=1 GOBUILDFLAGS =" -race" ./hack/test integration gateway dockerfile
4040
4141.PHONY : lint
4242lint :
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ set -eu -o pipefail
1313: ${TEST_DOCKERD_BINARY=$(which dockerd)}
1414: ${TEST_REPORT_SUFFIX=}
1515: ${TEST_KEEP_CACHE=}
16- : ${BUILDFLAGS =}
16+ : ${GOBUILDFLAGS =}
1717: ${VERIFYFLAGS=}
1818: ${CGO_ENABLED=}
1919: ${DOCKERFILE_RELEASES=}
@@ -63,7 +63,7 @@ testReportsVol="-v $testReportsDir:/testreports"
6363gotestsumArgs=" --format=standard-verbose --jsonfile=/testreports/go-test-report$TEST_REPORT_SUFFIX .json --junitfile=/testreports/junit-report$TEST_REPORT_SUFFIX .xml"
6464gotestArgs=" -mod=vendor -coverprofile=/testreports/coverage-report$TEST_REPORT_SUFFIX .txt -covermode=atomic"
6565
66- if [[ " $BUILDFLAGS " == * " -race" * ]]; then
66+ if [[ " $GOBUILDFLAGS " == * " -race" * ]]; then
6767 if [ " $CGO_ENABLED " != " 1" ]; then
6868 echo>&2 " go race detector requires CGO_ENABLED=1"
6969 exit 1
@@ -78,7 +78,7 @@ buildxCmd build $cacheFromFlags \
7878 --build-arg HTTP_PROXY \
7979 --build-arg HTTPS_PROXY \
8080 --build-arg NO_PROXY \
81- --build-arg BUILDFLAGS \
81+ --build-arg GOBUILDFLAGS \
8282 --build-arg VERIFYFLAGS \
8383 --build-arg CGO_ENABLED \
8484 --target " integration-tests" \
You can’t perform that action at this time.
0 commit comments