Introduction:
This article guides you through installing the Google Cloud CLI (gcloud), included in the Google Cloud SDK, on macOS executors used in CircleCI. This tool is not preinstalled on macOS images by default, but users can manually install it using Google’s official instructions or via Homebrew for simplicity. This guide will walk through the easiest and most reliable method using Homebrew.
- A CircleCI project using a macOS executor.
- Homebrew is preinstalled on all CircleCI macOS images.
Instructions:
-
Choose the install method
- While Google provides manual installation instructions here, most users find Homebrew easier.
- While Google provides manual installation instructions here, most users find Homebrew easier.
-
Install
gcloudusing Homebrew- run: name: "Install gcloud CLI" command: "brew update && brew install --cask google-cloud-sdk" -
Verify installation
-
After install, you can verify with:
gcloud --version
-
-
Locate the installed binary
- Installed at:
/opt/homebrew/bin/gcloud - This path is included in
$PATHby default on macOS executors.
- Installed at:
Outcome:
The gcloud CLI will be installed and available on your macOS executor, allowing your jobs to authenticate, configure, or deploy to Google Cloud resources as needed.
Comments
Article is closed for comments.