From b1c70dfcd280e3f8e566cd1bbfa47f333cc205ae 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 | 6 +++--- 2 files changed, 9 insertions(+), 6 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..b65348a 100644 --- a/vars/test.yaml +++ b/vars/test.yaml @@ -14,10 +14,10 @@ --- # Path to download/generate files -setup_path: "/tmp" +setup_path: "/tmp/setup" # Set `cert_manager_version: : v1.7.2` refer: https://cloud.google.com/apigee/docs/hybrid/v1.10/install-cert-manager -install_cert_manager: false +install_cert_manager: true cert_manager_version: v1.7.2 ################################################ TLS certificate details ################################################ @@ -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