From a2cf1ba8d5958cd044c71eb9e322afe6ebac6e29 Mon Sep 17 00:00:00 2001 From: Ben Larabie Date: Tue, 5 Mar 2024 13:34:12 -0500 Subject: [PATCH] workflow rework --- .github/workflows/docker.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 49094d3b68..777027198e 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -59,10 +59,20 @@ jobs: role-to-assume: arn:aws:iam::239043911459:role/notification-api-apply role-session-name: NotifyApiGitHubActions aws-region: "ca-central-1" + deploy: runs-on: github-arc-ss-api-dev name: rollout + needs: build steps: + + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@5fd3084fc36e372ff1fff382a39b10d03659f355 # v2.2.0 + with: + aws-access-key-id: ${{ secrets.STAGING_AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.STAGING_AWS_SECRET_ACCESS_KEY }} + aws-region: ca-central-1 + - name: Install kubectl run: | curl -LO https://storage.googleapis.com/kubernetes-release/release/v$KUBECTL_VERSION/bin/linux/amd64/kubectl @@ -70,9 +80,11 @@ jobs: sudo mv ./kubectl /usr/local/bin/kubectl kubectl version --client mkdir -p $HOME/.kube + - name: Get Kubernetes configuration run: | aws eks --region $AWS_REGION update-kubeconfig --name notification-canada-ca-staging-eks-cluster --kubeconfig $HOME/.kube/config + - name: Update images in staging run: | kubectl set image deployment.apps/api api=$DOCKER_SLUG:${GITHUB_SHA::7} -n=notification-canada-ca --kubeconfig=$HOME/.kube/config @@ -96,9 +108,11 @@ jobs: kubectl rollout restart deployment/celery-sms-send-scalable -n notification-canada-ca kubectl rollout restart deployment/celery-email-send-primary -n notification-canada-ca kubectl rollout restart deployment/celery-email-send-scalable -n notification-canada-ca + finalize: runs-on: ubuntu-latest name: finalize + needs: [build, rollout] steps: - name: my-app-install token id: notify-pr-bot