Skip to content

Commit e3f9c2e

Browse files
Accept OS_BUILD_IMAGE_ARGS in our image build scripts
Allows a set of arguments to be passed to the image builder
1 parent 26c9e03 commit e3f9c2e

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

Makefile

+5
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@ OS_OUTPUT_GOPATH ?= 1
1313

1414
export GOFLAGS
1515
export TESTFLAGS
16+
# If set to 1, create an isolated GOPATH inside _output using symlinks to avoid
17+
# other packages being accidentally included. Defaults to on.
1618
export OS_OUTPUT_GOPATH
19+
# May be used to set additional arguments passed to the image build commands for
20+
# mounting secrets specific to a build environment.
21+
export OS_BUILD_IMAGE_ARGS
1722

1823
# Build code.
1924
#

hack/build-base-images.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ if [[ -z "${oc}" ]]; then
2424
fi
2525

2626
function build() {
27-
"${oc}" ex dockerbuild $2 $1
27+
eval "'${oc}'' ex dockerbuild $2 $1 ${OS_BUILD_IMAGE_ARGS:-}"
2828
}
2929

3030
# Build the images

hack/build-images.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ if [[ -z "${oc}" ]]; then
6161
fi
6262

6363
function build() {
64-
"${oc}" ex dockerbuild $2 $1
64+
eval "'${oc}'' ex dockerbuild $2 $1 ${OS_BUILD_IMAGE_ARGS:-}"
6565
}
6666

6767
# Create link to file if the FS supports hardlinks, otherwise copy the file

0 commit comments

Comments
 (0)