From 767e2bde695def0d110dbd846084e0bad2818163 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..f8a0f59c 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 update + gcloud auth configure-docker "${TRAMPOLINE_HOST}" +fi source ${PROJECT_ROOT}/.kokoro/populate-secrets.sh