Do not put KEY into environment variable
#!/bin/bash
set -e
-
-echo ${JIB_INTEGRATION_TESTING_KEY} > ./keyfile.json
-
set -x
gcloud components install docker-credential-gcr
@@ -12,7 +9,7 @@ gcloud components install docker-credential-gcr
export PATH=$PATH:/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/
# docker-credential-gcr uses GOOGLE_APPLICATION_CREDENTIALS as the credentials key file
-export GOOGLE_APPLICATION_CREDENTIALS=$(pwd)/keyfile.json
+export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_KEYSTORE_DIR}/72743_jib_integration_testing_key
docker-credential-gcr configure-docker
# Stops any left-over containers.
