images: Configurable BASEIMAGE hierarchy

When building images, their REGISTRY can be set to a custom
one, instead of the default "gcr.io/kubernetes-e2e-test-images" or
"us.gcr.io/k8s-artifacts-prod/e2e-test-images".
Some images are based on other images we're already building
(e.g.: kitten, nautilus), but their base images
are set in the default registry name, which can be undesirable.

This commit addresses this issue.
This commit is contained in:
Claudiu Belu 2019-04-17 15:29:49 +00:00
parent efcdb929de
commit 25b7a13864
3 changed files with 11 additions and 11 deletions

View File

@ -84,7 +84,7 @@ build() {
TAG=$(<VERSION)
if [[ -f BASEIMAGE ]]; then
BASEIMAGE=$(getBaseImage "${os_name}" "${arch}")
BASEIMAGE=$(getBaseImage "${os_name}" "${arch}" | ${SED} "s|REGISTRY|${REGISTRY}|g")
${SED} -i "s|BASEIMAGE|${BASEIMAGE}|g" Dockerfile
${SED} -i "s|BASEARCH|${arch}|g" Dockerfile
fi

View File

@ -1,5 +1,5 @@
linux/amd64=us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost-amd64:2.11
linux/arm=us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost-arm:2.11
linux/arm64=us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost-arm64:2.11
linux/ppc64le=us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost-ppc64le:2.11
linux/s390x=us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost-s390x:2.11
linux/amd64=REGISTRY/agnhost-amd64:2.11
linux/arm=REGISTRY/agnhost-arm:2.11
linux/arm64=REGISTRY/agnhost-arm64:2.11
linux/ppc64le=REGISTRY/agnhost-ppc64le:2.11
linux/s390x=REGISTRY/agnhost-s390x:2.11

View File

@ -1,5 +1,5 @@
linux/amd64=us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost-amd64:2.11
linux/arm=us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost-arm:2.11
linux/arm64=us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost-arm64:2.11
linux/ppc64le=us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost-ppc64le:2.11
linux/s390x=us.gcr.io/k8s-artifacts-prod/e2e-test-images/agnhost-s390x:2.11
linux/amd64=REGISTRY/agnhost-amd64:2.11
linux/arm=REGISTRY/agnhost-arm:2.11
linux/arm64=REGISTRY/agnhost-arm64:2.11
linux/ppc64le=REGISTRY/agnhost-ppc64le:2.11
linux/s390x=REGISTRY/agnhost-s390x:2.11