Path: blob/main/dev/preview/workflow/lib/ensure-gcloud-auth.sh
2500 views
#!/usr/bin/env bash12# this script is meant to be sourced34function ensure_gcloud_auth() {5if [[ $(gcloud auth list --format=json) == '[]' ]]; then6echo7echo "Currently you need to be authenticated with gcloud to run the build"8echo9echo "This is needed to you can use the Leeway build cache that Werft also uses"10echo "We're working on automating this here: https://github.com/gitpod-io/gitpod/issues/13714"11echo12echo "But for now you have to run the following log in manually"13echo14gcloud auth login --no-launch-browser15echo16echo "Great, thanks!"17echo18echo "Continuing the build"19fi20}212223