Skip to content

Commit

Permalink
Merge pull request #11 from gynzy/chore/absolute-path
Browse files Browse the repository at this point in the history
chore: use absolute path to gcloud
  • Loading branch information
joelluijmes authored Feb 8, 2024
2 parents 3396e14 + 4ede3c7 commit 533c41c
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/scenarios/canary.sh.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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"}}
Expand Down
4 changes: 2 additions & 2 deletions tests/scenarios/helm3.sh.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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"}}
Expand Down
4 changes: 2 additions & 2 deletions tests/scenarios/production.sh.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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"}}
Expand Down
4 changes: 2 additions & 2 deletions tests/scenarios/ttl.sh.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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"}}
Expand Down
3 changes: 2 additions & 1 deletion tests/test-snap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 533c41c

Please sign in to comment.