Skip to content

Commit

Permalink
chore: print runners' gcloud identities
Browse files Browse the repository at this point in the history
  • Loading branch information
delanni committed Jan 29, 2024
1 parent 933ec8a commit bdc69c5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .buildkite/scripts/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -euo pipefail

gcloud config get-value core/account

source .buildkite/scripts/common/util.sh
source .buildkite/scripts/common/setup_bazel.sh

Expand Down
12 changes: 12 additions & 0 deletions .buildkite/scripts/lifecycle/pre_command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@ if [[ "$(curl -is metadata.google.internal || true)" ]]; then
echo ""
fi

# Check if we have gcloud, if yes, check which account, if not, check the config paths
if [[ -x "$(command -v gcloud)" ]]; then
gcloud config get-value core/account
else
echo "gcloud not found, checking config paths"
ls -la $HOME/.config/gcloud
ls -la $HOME/.config/gcloud/legacy_credentials
if [[ -f "$HOME/.config/gcloud/configurations/config_default" ]]; then
cat $HOME/.config/gcloud/configurations/config_default
fi
fi

echo '--- Job Environment Setup'

# Set up a custom ES Snapshot Manifest if one has been specified for this build
Expand Down

0 comments on commit bdc69c5

Please sign in to comment.