From af926155e927c740476b0153bc8e777c5221756a Mon Sep 17 00:00:00 2001 From: anaik91 Date: Sat, 28 Oct 2023 19:41:06 +0530 Subject: [PATCH] fix: fixed workflow script --- test/scripts/run_playbook.sh | 9 ++++++--- vars/test.yaml | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/test/scripts/run_playbook.sh b/test/scripts/run_playbook.sh index e9733aa..f58acb5 100755 --- a/test/scripts/run_playbook.sh +++ b/test/scripts/run_playbook.sh @@ -33,7 +33,10 @@ replace_string "$ANSIBLE_DIR/vars/test.yaml" "_GCP_PROJECT_ID_" "${GCP_PROJECT_I replace_string "$ANSIBLE_DIR/vars/test.yaml" "_GCP_REGION_" "${GCP_REGION}" docker run -v "$ANSIBLE_DIR:/app" \ - -v "$GOOGLE_APPLICATION_CREDENTIALS:/app/kubeconfig" \ - -e GOOGLE_APPLICATION_CREDENTIALS=/app/kubeconfig \ + -v "$GOOGLE_APPLICATION_CREDENTIALS:/svc_account/account.json" \ + -e GOOGLE_APPLICATION_CREDENTIALS=/svc_account/account.json \ "$GCP_REGION-docker.pkg.dev/$GCP_PROJECT_ID/$GCP_GAR_REPO/ansible-helm-apigee-hybrid-deployer:$GIT_COMMIT_SHORT_ID" \ - /bin/bash -c "cd /app && ansible-playbook playbook.yaml --tags 'dc1' -e @vars/test.yaml" + /bin/bash -c "cd /app && \ + gcloud auth login --cred-file=/svc_account/account.json && \ + gcloud container clusters get-credentials apigee-hybrid-cicd-test --region $GCP_REGION --project $GCP_PROJECT_ID && \ + ansible-playbook playbook.yaml --tags 'dc1' -e @vars/test.yaml" diff --git a/vars/test.yaml b/vars/test.yaml index 025de2d..f249b93 100644 --- a/vars/test.yaml +++ b/vars/test.yaml @@ -68,7 +68,7 @@ helm_charts: kubeconfigs: # set `primary: ` to deploy Apigee Hybrid Primary DC - primary: /Users/ashwinknaik/codes/git/apigee-hybrid-ansible/ansible/certs/dc1.config + primary: /root/.kube/config # set `secondary: ` to deploy Apigee Hybrid Secondary DC # secondary: /tmp/dc2.config