Skip to content

Commit

Permalink
Optional custom repository support for golang docker builder image (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
sashrith authored Mar 18, 2022
1 parent 2cc1f1d commit e43696c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions hack/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ GCR_KEY_FILE="${GCR_KEY_FILE:-}"
GOPROXY="${GOPROXY:-https://proxy.golang.org}"
BUILD_RELEASE_TYPE="${BUILD_RELEASE_TYPE:-}"

# CUSTOM_REPO_FOR_GOLANG can be used to pass custom repository for golang builder image.
# Please ensure it ends with a '/'.
# Example: CUSTOM_REPO_FOR_GOLANG=harbor-repo.vmware.com/dockerhub-proxy-cache/library/
GOLANG_IMAGE=${CUSTOM_REPO_FOR_GOLANG:-}golang:1.16

ARCH=amd64
OSVERSION=1809
# OS Version for the Windows images: 1809, 1903, 1909 2004, 20H2, ltsc2022
Expand Down Expand Up @@ -132,6 +137,7 @@ function build_driver_images_windows() {
--build-arg "OSVERSION=${OSVERSION}" \
--build-arg "GOPROXY=${GOPROXY}" \
--build-arg "GIT_COMMIT=${GIT_COMMIT}" \
--build-arg "GOLANG_IMAGE=${GOLANG_IMAGE}" \
.
docker buildx rm vsphere-csi-builder-win || echo "builder instance not found, safe to proceed"
}
Expand All @@ -149,6 +155,7 @@ function build_driver_images_linux() {
--build-arg "VERSION=${VERSION}" \
--build-arg "GOPROXY=${GOPROXY}" \
--build-arg "GIT_COMMIT=${GIT_COMMIT}" \
--build-arg "GOLANG_IMAGE=${GOLANG_IMAGE}" \
.
}

Expand All @@ -160,6 +167,7 @@ function build_syncer_image_linux() {
--build-arg "VERSION=${VERSION}" \
--build-arg "GOPROXY=${GOPROXY}" \
--build-arg "GIT_COMMIT=${GIT_COMMIT}" \
--build-arg "GOLANG_IMAGE=${GOLANG_IMAGE}" \
.

if [ "${LATEST}" ]; then
Expand Down

0 comments on commit e43696c

Please sign in to comment.