Skip to content
This repository has been archived by the owner on Apr 23, 2022. It is now read-only.

Commit

Permalink
Merge pull request #57 from circleci/install-gcloud
Browse files Browse the repository at this point in the history
Adding gcloud
  • Loading branch information
kimh committed Mar 31, 2016
2 parents 04c5e89 + 1d725dc commit c623c6c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ RUN circleci-install qt
ADD circleci-provision-scripts/awscli.sh /opt/circleci-provision-scripts/awscli.sh
RUN circleci-install awscli

# gcloud
ADD circleci-provision-scripts/gcloud.sh /opt/circleci-provision-scripts/gcloud.sh
RUN circleci-install gcloud

# Languages
ARG use_precompile=true
ENV USE_PRECOMPILE $use_precompile
Expand Down
12 changes: 12 additions & 0 deletions circleci-provision-scripts/gcloud.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

function install_gcloud() {
# Using sudo inside `as_user bash` is confusing but this is needed becase
# gcloud installation script needs to instal .config/gcloud dir under user's $HOME directory.
(cat <<'EOF'
sudo bash -c 'curl "https://sdk.cloud.google.com" | CLOUDSDK_CORE_DISABLE_PROMPTS=1 CLOUDSDK_INSTALL_DIR=/opt bash'
EOF
) | as_user bash
chown -R $CIRCLECI_USER:$CIRCLECI_USER "/opt/google-cloud-sdk"
chown -R $CIRCLECI_USER:$CIRCLECI_USER ${CIRCLECI_HOME}/.config/gcloud
}

0 comments on commit c623c6c

Please sign in to comment.