From 1936f86ae81df4078549728bbe8e50ee2a94384d Mon Sep 17 00:00:00 2001 From: Corey Carvalho <44616801+coreycarvalho@users.noreply.github.com> Date: Mon, 4 Nov 2024 09:46:03 -0500 Subject: [PATCH] Revert testing changes --- .github/workflows/cd-pipeline.yml | 171 +++++++++++++++--------------- 1 file changed, 85 insertions(+), 86 deletions(-) diff --git a/.github/workflows/cd-pipeline.yml b/.github/workflows/cd-pipeline.yml index 4fd684e271..c04c7a89a4 100644 --- a/.github/workflows/cd-pipeline.yml +++ b/.github/workflows/cd-pipeline.yml @@ -16,7 +16,7 @@ name: Continuous Deployment Pipeline on: push: branches: - - 1972-automated-slack-posting + - main jobs: prepare-deployment: @@ -30,19 +30,19 @@ jobs: uses: ./.github/workflows/pr-label-semver.yml secrets: inherit - # approval-deploy-perf: - # needs: prepare-deployment - # environment: - # name: perf-deploy - # runs-on: ubuntu-latest - # steps: - # - name: Pause for manual approval - # run: | - # echo "Deploying commit SHA ${{ github.sha }}, the latest merge to main" - # echo "Deployment paused for manual approval." + approval-deploy-perf: + needs: prepare-deployment + environment: + name: perf-deploy + runs-on: ubuntu-latest + steps: + - name: Pause for manual approval + run: | + echo "Deploying commit SHA ${{ github.sha }}, the latest merge to main" + echo "Deployment paused for manual approval." pre-tag-summary: - #needs: approval-deploy-perf + needs: approval-deploy-perf uses: ./.github/workflows/pre-tag-summary.yml secrets: inherit @@ -51,81 +51,80 @@ jobs: uses: ./.github/workflows/create-and-post-tag.yml secrets: inherit - # build-push-artifacts: - # needs: create-and-post-tag - # runs-on: ubuntu-latest - # steps: - # - name: Checkout Repo - # uses: actions/checkout@v4 - # with: - # ref: ${{ needs.create-and-post-tag.outputs.newVersion }} - # - name: Build and Push Artifacts - # uses: ./.github/actions/build-push-artifacts - # with: - # ref: ${{ needs.create-and-post-tag.outputs.newVersion }} - # aws-access-key-id: ${{ secrets.VAEC_AWS_ACCESS_KEY_ID }} - # aws-secret-access-key: ${{ secrets.VAEC_AWS_SECRET_ACCESS_KEY }} - # role-to-assume: ${{ secrets.VAEC_DEPLOY_ROLE }} - - # deploy-to-perf: - # needs: [create-and-post-tag, build-push-artifacts] - # uses: ./.github/workflows/deploy-release.yml - # secrets: inherit - # with: - # environment: perf - # ref: ${{ needs.create-and-post-tag.outputs.newVersion }} - # lambdaDeploy: true - - # approval-deploy-staging: - # needs: deploy-to-perf - # environment: - # name: staging-deploy - # runs-on: ubuntu-latest - # steps: - # - name: Pause for manual approval - # run: echo "Deployment paused for manual approval." - - # create-release-notes: - # needs: [create-and-post-tag, approval-deploy-staging] - # uses: ./.github/workflows/create-release-notes.yml - # secrets: inherit - # with: - # previousVersion: ${{ needs.create-and-post-tag.outputs.previousVersion }} - - # deploy-to-staging: - # needs: [create-release-notes, create-and-post-tag] - # uses: ./.github/workflows/deploy-release.yml - # secrets: inherit - # with: - # environment: staging - # ref: ${{ needs.create-and-post-tag.outputs.newVersion }} - # lambdaDeploy: true - - # approval-deploy-prod: - # needs: deploy-to-staging - # environment: - # name: prod-deploy - # runs-on: ubuntu-latest - # steps: - # - name: Pause for manual approval - # run: echo "Pipeline paused for pending approval of staging by QA" - - # publish-release-notes: - # needs: [create-release-notes, approval-deploy-prod] - # uses: ./.github/workflows/publish-release-notes.yml - # secrets: inherit - # with: - # draftReleaseReference: ${{ needs.create-release-notes.outputs.draftReleaseReference }} - - # deploy-to-prod: - # needs: [publish-release-notes, create-and-post-tag] - # uses: ./.github/workflows/deploy-release.yml - # secrets: inherit - # with: - # environment: prod - # ref: ${{ needs.create-and-post-tag.outputs.newVersion }} - # lambdaDeploy: true + build-push-artifacts: + needs: create-and-post-tag + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + ref: ${{ needs.create-and-post-tag.outputs.newVersion }} + - name: Build and Push Artifacts + uses: ./.github/actions/build-push-artifacts + with: + ref: ${{ needs.create-and-post-tag.outputs.newVersion }} + aws-access-key-id: ${{ secrets.VAEC_AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.VAEC_AWS_SECRET_ACCESS_KEY }} + role-to-assume: ${{ secrets.VAEC_DEPLOY_ROLE }} + + deploy-to-perf: + needs: [create-and-post-tag, build-push-artifacts] + uses: ./.github/workflows/deploy-release.yml + secrets: inherit + with: + environment: perf + ref: ${{ needs.create-and-post-tag.outputs.newVersion }} + lambdaDeploy: true + + approval-deploy-staging: + needs: deploy-to-perf + environment: + name: staging-deploy + runs-on: ubuntu-latest + steps: + - name: Pause for manual approval + run: echo "Deployment paused for manual approval." + create-release-notes: + needs: [create-and-post-tag, approval-deploy-staging] + uses: ./.github/workflows/create-release-notes.yml + secrets: inherit + with: + previousVersion: ${{ needs.create-and-post-tag.outputs.previousVersion }} + + deploy-to-staging: + needs: [create-release-notes, create-and-post-tag] + uses: ./.github/workflows/deploy-release.yml + secrets: inherit + with: + environment: staging + ref: ${{ needs.create-and-post-tag.outputs.newVersion }} + lambdaDeploy: true + + approval-deploy-prod: + needs: deploy-to-staging + environment: + name: prod-deploy + runs-on: ubuntu-latest + steps: + - name: Pause for manual approval + run: echo "Pipeline paused for pending approval of staging by QA" + + publish-release-notes: + needs: [create-release-notes, approval-deploy-prod] + uses: ./.github/workflows/publish-release-notes.yml + secrets: inherit + with: + draftReleaseReference: ${{ needs.create-release-notes.outputs.draftReleaseReference }} + + deploy-to-prod: + needs: [publish-release-notes, create-and-post-tag] + uses: ./.github/workflows/deploy-release.yml + secrets: inherit + with: + environment: prod + ref: ${{ needs.create-and-post-tag.outputs.newVersion }} + lambdaDeploy: true send-slack-notifications: needs: [create-and-post-tag]