Created
March 27, 2019 02:57
-
-
Save qwertyfinger/32e6423cfebbe0478014cbe0cd9824fb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ "$GCLOUD_SERVICE_KEY" = "" ]; then | |
echo "GCLOUD_SERVICE_KEY env variable is empty. Exiting." | |
exit 1 | |
fi | |
# Export to secrets file | |
echo $GCLOUD_SERVICE_KEY | base64 -di > gcloud-service-key.json | |
# Set project ID | |
gcloud config set project $GOOGLE_PROJECT_ID | |
# Auth account | |
gcloud auth activate-service-account andrii-chubko-ftl@android-simple-boilerplate.iam.gserviceaccount.com --key-file gcloud-service-key.json | |
# Delete secret | |
rm gcloud-service-key.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment