Skip to content

Commit 509e5e0

Browse files
committed
test: add proxy build args when existed
Signed-off-by: Wei Zhang <[email protected]>
1 parent f72b31f commit 509e5e0

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.github/CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ DOCKERFILE_RELEASES=labs TESTFLAGS="--run /TestRunGlobalNetwork/worker=oci$/ -v"
9797
Set `TEST_KEEP_CACHE=1` for the test framework to keep external dependant images in a docker volume
9898
if you are repeatedly calling `./hack/test` script. This helps to avoid rate limiting on the remote registry side.
9999

100+
If you are working behind a proxy, you can set some of or all
101+
`HTTP_PROXY=http://ip:port`, `HTTPS_PROXY=http://ip:port`, `NO_PROXY=http://ip:port` for the test framework
102+
to specify the proxy build args.
103+
100104
Updating vendored dependencies:
101105

102106
```bash

hack/test

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
. $(dirname $0)/util
44
set -eu -o pipefail
55

6+
: ${HTTP_PROXY=}
7+
: ${HTTPS_PROXY=}
8+
: ${NO_PROXY=}
69
: ${TEST_INTEGRATION=}
710
: ${TEST_GATEWAY=}
811
: ${TEST_DOCKERFILE=}
@@ -61,7 +64,10 @@ if [ "$TEST_COVERAGE" = "1" ]; then
6164
fi
6265

6366
buildxCmd build $cacheFromFlags \
64-
--build-arg "BUILDKITD_TAGS=$BUILDKITD_TAGS" \
67+
--build-arg BUILDKITD_TAGS \
68+
--build-arg HTTP_PROXY \
69+
--build-arg HTTPS_PROXY \
70+
--build-arg NO_PROXY \
6571
--target "integration-tests" \
6672
--output "type=docker,name=$iid" \
6773
$currentcontext

0 commit comments

Comments
 (0)