From 31b932970c048e8d53201ff1a5e916f6d8c1f9fe Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Fri, 25 Oct 2024 10:44:40 -0700 Subject: [PATCH] authenticate docker host --- .trampolinerc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.trampolinerc b/.trampolinerc index 5fc22531..9d8ee5ee 100644 --- a/.trampolinerc +++ b/.trampolinerc @@ -49,4 +49,11 @@ if [[ -z "${TRAMPOLINE_BUILD_FILE:-}" ]]; then fi # Secret Manager secrets. +TRAMPOLINE_HOST=$(echo "${TRAMPOLINE_IMAGE}" | cut -d/ -f1) +if [[ ! "${TRAMPOLINE_HOST}" =~ "gcr.io" ]] +then + echo "TRAMPOLINE_HOST: ${TRAMPOLINE_HOST}" + gcloud components install auth + gcloud auth configure-docker "${TRAMPOLINE_HOST}" +fi source ${PROJECT_ROOT}/.kokoro/populate-secrets.sh