CircleCI-Public / gcp-cli-orb

Install and configure the Google Cloud CLI (gcloud)
https://circleci.com/orbs/registry/orb/circleci/gcp-cli
MIT License
10 stars 34 forks source link

Install from Versioned non-interactive CLI #17

Closed KyleTryon closed 5 years ago

KyleTryon commented 5 years ago

This work was needed for progressing the Google Clour Run orb.

When attempting to use the command(s) gcloud components install beta && gcloud components update the following error is presented.

gcloud components install beta && gcloud components update
ERROR: (gcloud.components.install) 
You cannot perform this action because the Cloud SDK component manager 
is disabled for this installation. You can run the following command 
to achieve the same result for this installation: 

sudo apt-get install google-cloud-sdk

This appears to be a result of using the "interactive" CLI which is installed via apt-get which was called out in this Stack-Overflow: https://stackoverflow.com/questions/42697026/install-google-cloud-components-error-from-gcloud-command

Google recommends installing a versioned and "non-interactive" version of their CLI from this page: https://cloud.google.com/sdk/docs/downloads-versioned-archives

This change allows the user to enter in the version of the CLI for the Linux executor, or skip the installation on any non-docker executor as it did in the past.