Skip to content

Commit

Permalink
Merge pull request Kaggle#1162 from Kaggle/djherbis-patch-1
Browse files Browse the repository at this point in the history
Hide sensitive output in jenkins
  • Loading branch information
djherbis committed May 17, 2022
2 parents b03eace + e1e98f4 commit 11f01ce
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,13 @@ pipeline {
# Login to docker to get access to gcr.io/cloud-tpu-v2-images/libtpu
# SA: [email protected]
# To grant access to a SA, start a TPU VM with that SA once.
# Disable echo to avoid printing sensitive tokens:
set +x
METADATA=http:https://metadata.google.internal/computeMetadata/v1
SVC_ACCT=$METADATA/instance/service-accounts/default
ACCESS_TOKEN=$(/usr/bin/curl -s -H 'Metadata-Flavor: Google' $SVC_ACCT/token | cut -d'"' -f 4)
docker login --username oauth2accesstoken --password $ACCESS_TOKEN https://gcr.io
set -x
./tpu/build | ts
./push --tpu ${PRETEST_TAG}
Expand Down

0 comments on commit 11f01ce

Please sign in to comment.