-
Notifications
You must be signed in to change notification settings - Fork 0
105 lines (93 loc) · 3.04 KB
/
full-deploy-to-prod.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: "PROD Full - Deploy tagged version to Prod"
on:
workflow_dispatch:
inputs:
tag_version:
description: "What tagged verison do you want to push to prod?"
required: true
type: "string"
permissions:
pull-requests: write
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
env:
PYTHON_VERSION: "3.11"
ENVIRONMENT: prod
SANDBOX: prod
BUILD_BRANCH: ${{ inputs.tag_version }}
jobs:
view_action_parameters:
name: View input params
runs-on: ubuntu-latest
steps:
- name: Display client passed variables
run: |
echo Build Branch: ${{ inputs.tag_version }}
echo Sandbox: prod
echo Environment: prod
echo Cypress Base Url: ${{ vars.CYPRESS_BASE_URL }}
lambda_test_job:
name: Run Lambda Unit Tests
uses: ./.github/workflows/base-lambdas-reusable-test.yml
with:
python_version: "3.11"
build_branch: ${{ inputs.tag_version }}
react_testing_job:
name: Run UI Unit Tests
uses: ./.github/workflows/base-jest-test.yml
with:
build_branch: ${{ inputs.tag_version }}
cypress_build_job:
name: Build UI version for E2E Tests
uses: ./.github/workflows/base-cypress-build.yml
with:
build_branch: ${{ inputs.tag_version }}
cypress_test_job:
name: Run Cypress E2E Tests
needs: [cypress_build_job]
uses: ./.github/workflows/base-cypress-test-all-env.yml
with:
cypress_base_url: ${{ vars.CYPRESS_BASE_URL }}
build_branch: ${{ inputs.tag_version }}
publish_all_lambda_layers:
name: Publish all Lambda Layers
needs: ["lambda_test_job", "react_testing_job", "cypress_test_job"]
uses: ./.github/workflows/base-lambda-layer-reusable-publish-all.yml
with:
build_branch: ${{ inputs.tag_version }}
sandbox: prod
environment: prod
python_version: "3.11"
secrets:
AWS_ASSUME_ROLE: ${{ secrets.AWS_ASSUME_ROLE }}
deploy_all_lambdas:
name: Deploy all Lambdas
needs: ["lambda_test_job", "react_testing_job", "cypress_test_job", "publish_all_lambda_layers"]
uses: ./.github/workflows/base-lambdas-reusable-deploy-all.yml
with:
build_branch: ${{ inputs.tag_version }}
sandbox: prod
environment: prod
python_version: "3.11"
secrets:
AWS_ASSUME_ROLE: ${{ secrets.AWS_ASSUME_ROLE }}
deploy_ui:
name: Deploy UI
needs: ["lambda_test_job", "react_testing_job", "cypress_test_job"]
uses: ./.github/workflows/base-deploy-ui.yml
with:
build_branch: ${{ inputs.tag_version }}
environment: prod
sandbox: prod
secrets:
AWS_ASSUME_ROLE: ${{ secrets.AWS_ASSUME_ROLE }}
deploy_ods_batch_update:
name: Deploy ODS Batch Update
needs: [ "lambda_test_job", "react_testing_job", "cypress_test_job" ]
uses: ./.github/workflows/base-batch-update.yml
with:
build_branch: ${{ inputs.tag_version }}
environment: prod
sandbox: prod
secrets:
AWS_ASSUME_ROLE: ${{ secrets.AWS_ASSUME_ROLE }}