Skip to content

Commit

Permalink
authenticate docker host
Browse files Browse the repository at this point in the history
  • Loading branch information
chingor13 committed Oct 25, 2024
1 parent 798b89e commit 70071ac
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .trampolinerc
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,19 @@ 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}"
echo "HOME: ${HOME}"
echo "${HOME}":/home
docker run \
--entrypoint=gcloud \
--env HOME=:/home \
--volume="${HOME}":/home \
"gcr.io/google.com/cloudsdktool/cloud-sdk" \
auth configure-docker "${TRAMPOLINE_HOST}"
echo "docker config:"
cat "${HOME}/.docker/config.json"
fi
source ${PROJECT_ROOT}/.kokoro/populate-secrets.sh

0 comments on commit 70071ac

Please sign in to comment.