Skip to content

Commit

Permalink
use apt to install as gcloud cli component manager disabled
Browse files Browse the repository at this point in the history
run apt update before trying to install auth plugin

add gcloud public key before apt update

try if using latest google/cloud-sdk image helps

actually spell cloud-sdk correctly
  • Loading branch information
mipyykko committed Aug 30, 2022
1 parent f737e75 commit dac6b75
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

build_frontend:
docker:
- image: google/cloud-sdk
- image: google/cloud-sdk:latest
steps:
- checkout
- setup_remote_docker
Expand Down Expand Up @@ -228,7 +228,7 @@ jobs:
# command: "bin/push-docker-auth-image.sh"
deploy_to_production:
docker:
- image: google/cloud-sdk
- image: google/cloud-sdk:latest
steps:
- checkout
- setup_remote_docker
Expand Down
8 changes: 7 additions & 1 deletion bin/ci-setup-google-cloud.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ gcloud --quiet config set compute/zone ${GOOGLE_COMPUTE_ZONE}
echo "Configuring kubectl"
gcloud --quiet container clusters get-credentials moocfi-cluster

gcloud components install gke-gcloud-auth-plugin
# if ! [ -x "$(command -v gke-gcloud-auth-plugin)" ]; then
# echo "kubectl plugin gke-gcloud-auth-plugin not found. Installing..."
# echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
# curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
# apt-get update
# apt-get install -y google-cloud-sdk-gke-gcloud-auth-plugin
# fi

BRANCH=$(git rev-parse --abbrev-ref HEAD)

Expand Down

0 comments on commit dac6b75

Please sign in to comment.