Skip to content

Commit

Permalink
fix: fixed workflow script
Browse files Browse the repository at this point in the history
  • Loading branch information
anaik91 committed Oct 28, 2023
1 parent 08fbfc7 commit af92615
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions test/scripts/run_playbook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion vars/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ helm_charts:

kubeconfigs:
# set `primary: <Path to kubeconfig of K8s cluster>` to deploy Apigee Hybrid Primary DC
primary: /Users/ashwinknaik/codes/git/apigee-hybrid-ansible/ansible/certs/dc1.config
primary: /root/.kube/config
# set `secondary: <Path to kubeconfig of K8s cluster>` to deploy Apigee Hybrid Secondary DC
# secondary: /tmp/dc2.config

Expand Down

0 comments on commit af92615

Please sign in to comment.