Merge pull request #40809 from rrati/federation-build-local

Automatic merge from submit-queue (batch tested with PRs 40884, 40809, 40845, 40866, 40875)

Add env variable to build federation images locally. #39870

This allows building the federation images without the need for cloud development packages

Related: #39870
This commit is contained in:
Kubernetes Submit Queue 2017-02-02 18:53:48 -08:00 committed by GitHub
commit c82b8f3833

View File

@ -43,10 +43,15 @@ readonly TMP_DIR="$(mktemp -d)"
readonly FEDERATION_OUTPUT_ROOT="${LOCAL_OUTPUT_ROOT}/federation"
readonly VERSIONS_FILE="${FEDERATION_OUTPUT_ROOT}/versions"
detect-project
readonly KUBE_PROJECT="${KUBE_PROJECT:-${PROJECT:-}}"
if [[ "${KUBERNETES_PROVIDER}" == "gke" || "${KUBERNETES_PROVIDER}" == "gce" ]]; then
detect-project
readonly KUBE_PROJECT="${KUBE_PROJECT:-${PROJECT:-}}"
readonly KUBE_REGISTRY="${KUBE_REGISTRY:-gcr.io/${KUBE_PROJECT}}"
else
readonly KUBE_PROJECT="${KUBE_PROJECT:-${PROJECT:-federation}}"
readonly KUBE_REGISTRY="${KUBE_REGISTRY:-localhost:5000/${KUBE_PROJECT}}"
fi
readonly KUBE_REGISTRY="${KUBE_REGISTRY:-gcr.io/${KUBE_PROJECT}}"
# In dev environments this value must be recomputed after build. See
# the build_image() function. So not making it readonly
KUBE_VERSION="${KUBE_VERSION:-}"