Skip to content

Instantly share code, notes, and snippets.

@ssttevee
Last active April 13, 2017 06:13
Show Gist options
  • Save ssttevee/924ee99937118227bbcdb23dacc27fdd to your computer and use it in GitHub Desktop.
Save ssttevee/924ee99937118227bbcdb23dacc27fdd to your computer and use it in GitHub Desktop.
Install gcloud on semaphore-ci
#!/bin/bash
VERSION=151.0.0
## Usage:
## curl https://gist.githubusercontent.com/ssttevee/924ee99937118227bbcdb23dacc27fdd/raw/semaphore_ci_gcloud_prepare.sh | sh
export PATH=$SEMAPHORE_CACHE_DIR/google-cloud-sdk/bin:$PATH
if [ ! -f "$SEMAPHORE_CACHE_DIR/google-cloud-sdk/bin/gcloud" ]
then
curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-$VERSION-linux-x86_64.tar.gz
tar -x -C $SEMAPHORE_CACHE_DIR -f google-cloud-sdk-$VERSION-linux-x86_64.tar.gz
gcloud --quiet components update --version $VERSION
gcloud --quiet components update --version $VERSION beta
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment