Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# This script is to set up Google Cloud in CircleCI
# Author: Stewart Park <>
# Usage:
# (set up GCLOUD_SERVICE_KEY as a base64-encoded json credentials file, GCLOUD_PROJECT_ID as your project ID)
# curl -L | bash
sudo -E env "PATH=$PATH" gcloud --quiet components update
sudo chmod 757 /home/ubuntu/.config/gcloud/logs -R
echo $GCLOUD_SERVICE_KEY | base64 --decode --ignore-garbage > ${HOME}/gcloud-service-key.json
gcloud --quiet components update
gcloud auth activate-service-account --key-file ${HOME}/gcloud-service-key.json
gcloud config set project $GCLOUD_PROJECT_ID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.