From 569c81f4f0f68720b60c92dfd9efc1d88fb4da97 Mon Sep 17 00:00:00 2001 From: Q-CTRL Robot <61040384+qctrlrobot@users.noreply.github.com> Date: Wed, 20 Sep 2023 16:51:58 +1000 Subject: [PATCH] ci: Use script for cluster auth (#283) Co-authored-by: Kunj Dave --- .github/workflows/on-push.yaml | 4 +--- .github/workflows/on-release.yaml | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/on-push.yaml b/.github/workflows/on-push.yaml index bd6a46a..23724c3 100644 --- a/.github/workflows/on-push.yaml +++ b/.github/workflows/on-push.yaml @@ -80,9 +80,7 @@ jobs: - name: Update Sphinx deployment in Kubernetes (Development) if: github.ref == 'refs/heads/master' run: | - ./ci vault awsKey -t $(cat .token) -r deploy-eks-dev -o ./.aws-credentials ./ci docker run qctrl/ci-images:google-cloud-sdk-ci sh -- -c ' - . ./.aws-credentials; - aws eks update-kubeconfig --alias hidden --name platform-dev --region us-west-2; + . /scripts/connect-to-dev-cluster.sh; kubectl -n qctrl-platform set image deployment/open-controls-docs open-controls-docs=qctrl/open-controls-docs:$COMMIT && kubectl -n qctrl-platform rollout status deployment/open-controls-docs; ' diff --git a/.github/workflows/on-release.yaml b/.github/workflows/on-release.yaml index 4db270d..944f159 100644 --- a/.github/workflows/on-release.yaml +++ b/.github/workflows/on-release.yaml @@ -52,9 +52,7 @@ jobs: --suffix -docs - name: Update Sphinx deployment in Kubernetes (Production) run: | - ./ci vault awsKey -t $(cat .token) -r deploy-eks-prod -o ./.aws-credentials ./ci docker run qctrl/ci-images:google-cloud-sdk-ci sh -- -c ' - . ./.aws-credentials; - aws eks update-kubeconfig --alias hidden --name platform-prod --region us-west-2; + . /scripts/connect-to-prod-cluster.sh kubectl -n qctrl-platform rollout restart deployment/open-controls-docs && kubectl -n qctrl-platform rollout status deployment/open-controls-docs; '