diff --git a/index.js b/index.js index f9ab007..9d6490f 100644 --- a/index.js +++ b/index.js @@ -10,7 +10,7 @@ const readFile = util.promisify(fs.readFile); const deleteFile = util.promisify(fs.rm); const required = { required: true }; -const GCLOUD_BINARY = 'gcloud'; +const GCLOUD_BINARY = '/opt/google-cloud-sdk/bin/gcloud'; /** * Status marks the deployment status. Only activates if token is set as an diff --git a/tests/scenarios/canary.sh.snap b/tests/scenarios/canary.sh.snap index 0141655..d648c17 100644 --- a/tests/scenarios/canary.sh.snap +++ b/tests/scenarios/canary.sh.snap @@ -22,9 +22,9 @@ ::debug::param: ttl = "false" ::debug::param: service_account = "helm-ttl-plugin" Setting up GKE authentication -[command]/tmp/bin/gcloud auth activate-service-account --key-file=sa.json +[command]/opt/google-cloud-sdk/bin/gcloud auth activate-service-account --key-file=sa.json gcloud auth activate-service-account --key-file=sa.json -[command]/tmp/bin/gcloud container clusters get-credentials clusterName --zone GKElocation --project GKEproject +[command]/opt/google-cloud-sdk/bin/gcloud container clusters get-credentials clusterName --zone GKElocation --project GKEproject gcloud container clusters get-credentials clusterName --zone GKElocation --project GKEproject ::debug::env: KUBECONFIG="undefined" ::debug::rendering value files [./values.yml] with: {"secrets":{"secret":"val"}} diff --git a/tests/scenarios/helm3.sh.snap b/tests/scenarios/helm3.sh.snap index e0d6cee..4eb39d3 100644 --- a/tests/scenarios/helm3.sh.snap +++ b/tests/scenarios/helm3.sh.snap @@ -22,9 +22,9 @@ ::debug::param: ttl = "false" ::debug::param: service_account = "helm-ttl-plugin" Setting up GKE authentication -[command]/tmp/bin/gcloud auth activate-service-account --key-file=sa.json +[command]/opt/google-cloud-sdk/bin/gcloud auth activate-service-account --key-file=sa.json gcloud auth activate-service-account --key-file=sa.json -[command]/tmp/bin/gcloud container clusters get-credentials clusterName --zone GKElocation --project GKEproject +[command]/opt/google-cloud-sdk/bin/gcloud container clusters get-credentials clusterName --zone GKElocation --project GKEproject gcloud container clusters get-credentials clusterName --zone GKElocation --project GKEproject ::debug::env: KUBECONFIG="undefined" ::debug::rendering value files [./values.yml] with: {"secrets":{"secret":"val"}} diff --git a/tests/scenarios/production.sh.snap b/tests/scenarios/production.sh.snap index f902cf9..00f830c 100644 --- a/tests/scenarios/production.sh.snap +++ b/tests/scenarios/production.sh.snap @@ -22,9 +22,9 @@ ::debug::param: ttl = "false" ::debug::param: service_account = "helm-ttl-plugin" Setting up GKE authentication -[command]/tmp/bin/gcloud auth activate-service-account --key-file=sa.json +[command]/opt/google-cloud-sdk/bin/gcloud auth activate-service-account --key-file=sa.json gcloud auth activate-service-account --key-file=sa.json -[command]/tmp/bin/gcloud container clusters get-credentials clusterName --zone GKElocation --project GKEproject +[command]/opt/google-cloud-sdk/bin/gcloud container clusters get-credentials clusterName --zone GKElocation --project GKEproject gcloud container clusters get-credentials clusterName --zone GKElocation --project GKEproject ::debug::env: KUBECONFIG="undefined" ::debug::rendering value files [./values.yml] with: {"secrets":{"secret":"val"}} diff --git a/tests/scenarios/ttl.sh.snap b/tests/scenarios/ttl.sh.snap index f418360..2096724 100644 --- a/tests/scenarios/ttl.sh.snap +++ b/tests/scenarios/ttl.sh.snap @@ -22,9 +22,9 @@ ::debug::param: ttl = "7 days" ::debug::param: service_account = "helm-ttl-plugin" Setting up GKE authentication -[command]/tmp/bin/gcloud auth activate-service-account --key-file=sa.json +[command]/opt/google-cloud-sdk/bin/gcloud auth activate-service-account --key-file=sa.json gcloud auth activate-service-account --key-file=sa.json -[command]/tmp/bin/gcloud container clusters get-credentials clusterName --zone GKElocation --project GKEproject +[command]/opt/google-cloud-sdk/bin/gcloud container clusters get-credentials clusterName --zone GKElocation --project GKEproject gcloud container clusters get-credentials clusterName --zone GKElocation --project GKEproject ::debug::env: KUBECONFIG="undefined" ::debug::rendering value files [./values.yml] with: {"secrets":{"secret":"val"}} diff --git a/tests/test-snap.sh b/tests/test-snap.sh index 800c7d1..3154eef 100755 --- a/tests/test-snap.sh +++ b/tests/test-snap.sh @@ -7,7 +7,8 @@ export PATH="/tmp/bin:$PATH" mkdir -p /tmp/bin cp ./helm-fake /tmp/bin/helm cp ./helm3-fake /tmp/bin/helm3 -cp ./gcloud-fake /tmp/bin/gcloud +mkdir -p /opt/google-cloud-sdk/bin/ +cp ./gcloud-fake /opt/google-cloud-sdk/bin/gcloud for s in $(find ./scenarios/ -mindepth 1 | grep -v 'snap'); do echo $s