Files
runner-images/images/linux/scripts/installers/google-cloud-cli.sh
T

23 lines
889 B
Bash
Raw Normal View History

2020-10-07 13:49:40 +05:00
#!/bin/bash -e
################################################################################
2023-09-20 16:32:41 +02:00
## File: google-cloud-cli.sh
## Desc: Installs the Google Cloud CLI
################################################################################
REPO_URL="https://packages.cloud.google.com/apt"
2023-09-20 16:32:41 +02:00
# Install the Google Cloud CLI
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] $REPO_URL cloud-sdk main" > /etc/apt/sources.list.d/google-cloud-sdk.list
wget -qO- https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor > /usr/share/keyrings/cloud.google.gpg
apt-get update -y
2023-09-20 16:32:41 +02:00
apt-get install -y google-cloud-cli
# remove apt
rm /etc/apt/sources.list.d/google-cloud-sdk.list
rm /usr/share/keyrings/cloud.google.gpg
# add repo to the apt-sources.txt
echo "google-cloud-sdk $REPO_URL" >> $HELPER_SCRIPTS/apt-sources.txt
2023-09-20 16:32:41 +02:00
invoke_tests "CLI.Tools" "Google Cloud CLI"