2020-10-07 13:49:40 +05:00
|
|
|
#!/bin/bash -e
|
2019-12-13 09:48:00 -05:00
|
|
|
################################################################################
|
2023-09-20 16:32:41 +02:00
|
|
|
## File: google-cloud-cli.sh
|
|
|
|
|
## Desc: Installs the Google Cloud CLI
|
2019-12-13 09:48:00 -05:00
|
|
|
################################################################################
|
|
|
|
|
|
2021-04-16 19:24:24 +03:00
|
|
|
REPO_URL="https://packages.cloud.google.com/apt"
|
|
|
|
|
|
2023-09-20 16:32:41 +02:00
|
|
|
# Install the Google Cloud CLI
|
2022-06-06 16:06:55 +02:00
|
|
|
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] $REPO_URL cloud-sdk main" > /etc/apt/sources.list.d/google-cloud-sdk.list
|
2023-05-24 10:07:06 +02:00
|
|
|
wget -qO- https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor > /usr/share/keyrings/cloud.google.gpg
|
2022-06-06 16:06:55 +02:00
|
|
|
apt-get update -y
|
2023-09-20 16:32:41 +02:00
|
|
|
apt-get install -y google-cloud-cli
|
2019-12-13 09:48:00 -05:00
|
|
|
|
2021-04-16 19:24:24 +03:00
|
|
|
# remove apt
|
|
|
|
|
rm /etc/apt/sources.list.d/google-cloud-sdk.list
|
2022-06-06 16:06:55 +02:00
|
|
|
rm /usr/share/keyrings/cloud.google.gpg
|
2021-04-16 19:24:24 +03:00
|
|
|
|
|
|
|
|
# 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"
|