Skip to content

Commit

Permalink
Merge pull request #16287 from fejta/deploy
Browse files Browse the repository at this point in the history
Only activate service account when one exists
  • Loading branch information
k8s-ci-robot committed Feb 13, 2020
2 parents 64e4072 + 0d5c3d3 commit 0032cdb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions images/builder/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@

set -e

echo "Activating service account..."
gcloud auth activate-service-account --key-file="${GOOGLE_APPLICATION_CREDENTIALS}"
if [[ -n "${GOOGLE_APPLICATION_CREDENTIALS:-}" ]]; then
echo "Activating service account..."
gcloud auth activate-service-account --key-file="${GOOGLE_APPLICATION_CREDENTIALS}"
fi


echo "Running..."
if [ -n "${ARTIFACTS}" ] && [ -z "${LOG_TO_STDOUT}" ]; then
Expand Down

0 comments on commit 0032cdb

Please sign in to comment.