Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Commit

Permalink
Merge pull request #143 from communitiesuk/BAU_concurrency_workflow
Browse files Browse the repository at this point in the history
BAU Concurrent and finalise workflow
  • Loading branch information
robk-dluhc authored Nov 8, 2023
2 parents 2687cf3 + cc27379 commit d7a9580
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/copilot_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ jobs:
tag_version:
runs-on: ubuntu-latest
outputs:
version_to_tag: ${{ steps.notification_tagging.outputs.tag_value }}
version_to_tag: ${{ steps.account_store_tagging.outputs.tag_value }}
steps:
- id: notification_tagging
- id: account_store_tagging
run: |
echo "tag_value=$(echo '${{ github.ref }}' | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -76,16 +76,21 @@ jobs:
echo "env_list=[\"dev\", \"test\"]" >> $GITHUB_OUTPUT
fi
copilot_environments_deploy:
concurrency: account-store-environment-deploy
copilot_env_deploy:
concurrency:
group: '${{ github.workflow }} @ ${{ github.ref }}'
cancel-in-progress: false
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
needs: [ tag_version, pre_deploy_tests, paketo_build, copilot_environments_workflow_setup ]
runs-on: ubuntu-latest
continue-on-error: true
strategy:
max-parallel: 1
matrix:
value: ${{ fromJSON(needs.copilot_environments_workflow_setup.outputs.matrix) }}
fail-fast: false
environment: ${{ matrix.value }}
steps:
- name: Git clone the repository
Expand All @@ -100,7 +105,7 @@ jobs:
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT }}:role/GithubCopilotDeploy
role-session-name: NOTIFICATION_${{ matrix.value }}_COPILOT_${{ steps.currentdatetime.outputs.datetime }}
role-session-name: ACCOUNT_STORE_${{ matrix.value }}_COPILOT_${{ steps.currentdatetime.outputs.datetime }}
aws-region: eu-west-2

- name: Install AWS Copilot CLI
Expand All @@ -123,13 +128,13 @@ jobs:
# Can we realistically run E2E at this stage, or just plump for application on the grounds it checks account-store is operational?
post_deploy_tests:
needs: copilot_environments_deploy
needs: copilot_env_deploy
if: inputs.environment == 'test' || inputs.environment == 'dev' || inputs.environment == ''
secrets:
E2E_PAT: ${{secrets.E2E_PAT}}
uses: communitiesuk/funding-service-design-workflows/.github/workflows/post-deploy.yml@main
with:
run_performance_tests: ${{ inputs.run_performance_tests }}
run_e2e_tests: ${{ inputs.run_e2e_tests }}
run_performance_tests: ${{ inputs.run_performance_tests || false }}
run_e2e_tests: ${{ inputs.run_e2e_tests || true }}
app_name: application
environment: ${{ inputs.environment == '' && 'test' || inputs.environment }}

0 comments on commit d7a9580

Please sign in to comment.