Update gcloud and add to tool-cache
sethvargo opened this issue · 3 comments
Tool name
gcloud
Tool license
Apache 2
Add or update?
- Add
- Update
Desired version
latest
Approximate size
600MB
Brief description of tool
The gcloud CLI already exists, but it is installed from a package manager (e.g. apt
). This is problematic because:
-
The version of gcloud that is installed with a package manager cannot install additional components like
kubectl
orcloud-run-proxy
(example). It also prevents using alpha or beta commands (since those are actually separate components. This forces users to re-install the entire 600MB+ package just to install a 2MB optional component. That adds a ton of unnecessary bandwidth and working runtime. -
The gcloud SDK is not included in the tool-cache, so searching the tool-cache to see if a version of gcloud is installed will always fail. This leads to spurious additional installations (example).
URL for tool's homepage
Provide a basic test case to validate the tool's functionality.
gcloud version
Platforms where you need the tool
- Azure DevOps
- GitHub Actions
Runner images where you need the tool
- Ubuntu 18.04
- Ubuntu 20.04
- Ubuntu 22.04
- macOS 11
- macOS 12
- Windows Server 2019
- Windows Server 2022
Can this tool be installed during the build?
I'm not sure what "during the build" means. Users can install the tool themselves using https://github.com/google-github-actions/setup-gcloud, but due to the size of the package (particularly on Windows), this adds 5min+ to build times. It also consumes unnecessary bandwidth and resources.
Tool installation time in runtime
2 minutes
Are you willing to submit a PR?
Yes, but I would like pre-approval before doing the work
Hello @sethvargo! We'll return with an answer a bit later after a little investigation.
@sethvargo Hello!
GCP is generally to be deprecated and removed from all runners, the currently existing apt version was provided long ago and will be removed eventually, there are no plans to add it to more OSes or provide it via toolcache. Customers who need more advanced functionality / better installation should still use the setup-gcloud
GitHub action.
Hi @mikhailkoliada & @erik-bershel,
I was wondering - are there similar plans to remove the AWS CLI and Azure CLI from all runners, like mentioned above for the Google Cloud CLI? (according to https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md all three CLIs are still installed to runners).
Perhaps the original plans changed?