Skip to content

Commit 104d043

Browse files
Alex Couture-Beilalexcb
authored andcommitted
rename BUILDFLAGS to GOBUILDFLAGS
Signed-off-by: Alex Couture-Beil <[email protected]>
1 parent 6695ae0 commit 104d043

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ TESTPKGS=./client TESTFLAGS="--run //worker=containerd -v" ./hack/test integrati
158158
DOCKERFILE_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

164164
Set `TEST_KEEP_CACHE=1` for the test framework to keep external dependant images in a docker volume

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,13 @@ FROM buildkit-base AS buildkitd
9494
# BUILDKITD_TAGS defines additional Go build tags for compiling buildkitd
9595
ARG BUILDKITD_TAGS
9696
ARG TARGETPLATFORM
97-
ARG BUILDFLAGS
97+
ARG GOBUILDFLAGS
9898
ARG VERIFYFLAGS="--static"
9999
ARG CGO_ENABLED=0
100100
RUN --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

106106
FROM scratch AS binaries-linux

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ test:
3636

3737
.PHONY: test-race
3838
test-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
4242
lint:

hack/test

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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"
6363
gotestsumArgs="--format=standard-verbose --jsonfile=/testreports/go-test-report$TEST_REPORT_SUFFIX.json --junitfile=/testreports/junit-report$TEST_REPORT_SUFFIX.xml"
6464
gotestArgs="-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" \

0 commit comments

Comments
 (0)