-
Notifications
You must be signed in to change notification settings - Fork 3
186 lines (174 loc) · 6.42 KB
/
deploy-dev.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
name: Deploy to development
run-name: Deploy to development [${{ github.head_ref || github.ref_name }}]
on:
merge_group:
types:
- checks_requested
pull_request:
branches:
- main
permissions:
id-token: write
contents: read
jobs:
build-frontend:
if: github.event_name == 'merge_group'
name: Build frontend
runs-on: ubuntu-latest
outputs:
artifact-name: ${{ steps.build.outputs.artifact-id }}
steps:
- name: Pull repository
id: checkout
uses: actions/checkout@v4
- name: Build
id: build
uses: ./.github/actions/build-frontend
with:
artifact-name: frontend-build-development
push-frontend:
if: github.event_name == 'merge_group'
name: Push image
needs: build-frontend
runs-on: ubuntu-latest
timeout-minutes: 20
environment:
name: development
url: ${{ steps.push.outputs.pipeline-url }}
outputs:
pipeline-url: ${{ steps.push.outputs.pipeline-url }}
steps:
- name: Pull repository
id: checkout
uses: actions/checkout@v4
- name: Push
id: push
uses: ./.github/actions/push-frontend
with:
deployment-role-arn: ${{ vars.FRONTEND_DEPLOYMENT_ROLE_ARN }}
artifact-bucket-name: ${{ vars.FRONTEND_DEPLOYMENT_ARTIFACTS_BUCKET }}
pipeline-name: ${{ vars.FRONTEND_PIPELINE_NAME }}
artifact-name: ${{ needs.build-frontend.outputs.artifact-name }}
dynatrace-pass-token: ${{ secrets.DYNATRACE_PAAS_TOKEN }}
container-repository-name: ${{ vars.FRONTEND_CONTAINER_REPOSITORY_NAME }}
test-container-repository-name: ${{ vars.FRONTEND_TEST_CONTAINER_REPOSITORY_NAME }}
build-dynamo:
if: github.event_name == 'merge_group'
name: Build dynamodb
runs-on: ubuntu-latest
outputs:
artifact-name: ${{ steps.build.outputs.artifact-name }}
cache-key: ${{ steps.build.outputs.cache-key }}
steps:
- name: Build
id: build
uses: govuk-one-login/github-actions/sam/build-application@6144f39407b01c9b25b39537b3956deca9e32620 # 22/02/2024
with:
template: backend/dynamodb/cognito.template.yml
base-dir: backend/dynamodb
source-dir: backend/dynamodb
cache-name: dynamodb-infra
artifact-name: dynamodb-infrastructure
pull-repository: true
deploy-dynamodb:
if: github.event_name == 'merge_group'
name: Deploy dynamodb
runs-on: ubuntu-latest
environment:
name: development
url: ${{ steps.deploy.outputs.pipeline-url }}
outputs:
pipeline-url: ${{ steps.deploy.outputs.pipeline-url }}
steps:
- name: Deploy
id: deploy
uses: govuk-one-login/github-actions/secure-pipelines/deploy-application@db4b3614f5f863f56a5356052262878ecec83b31 # 22/07/2024
timeout-minutes: 15
with:
aws-role-arn: ${{ vars.DYNAMODB_DEPLOYMENT_ROLE_ARN }}
artifact-bucket-name: ${{ vars.DYNAMODB_DEPLOYMENT_ARTIFACTS_BUCKET }}
signing-profile-name: ${{ vars.SIGNING_PROFILE_NAME }}
pipeline-name: ${{ vars.DYNAMODB_PIPELINE_NAME }}
artifact-name: ${{ needs.build-dynamodb.outputs.artifact-name }}
template: .aws-sam/build/template.yaml
build-cognito:
if: github.event_name == 'merge_group'
name: Build cognito
runs-on: ubuntu-latest
outputs:
artifact-name: ${{ steps.build.outputs.artifact-name }}
cache-key: ${{ steps.build.outputs.cache-key }}
steps:
- name: Build
id: build
uses: govuk-one-login/github-actions/sam/build-application@6144f39407b01c9b25b39537b3956deca9e32620 # 22/02/2024
with:
template: backend/cognito/cognito.template.yml
manifest: backend/cognito/package.json
base-dir: backend/cognito
source-dir: backend/cognito
cache-name: cognito-infra
artifact-name: cognito-infrastructure
pull-repository: true
deploy-cognito:
if: github.event_name == 'merge_group'
name: Deploy cognito
runs-on: ubuntu-latest
environment:
name: development
url: ${{ steps.deploy.outputs.pipeline-url }}
outputs:
pipeline-url: ${{ steps.deploy.outputs.pipeline-url }}
steps:
- name: Deploy
id: deploy
uses: govuk-one-login/github-actions/secure-pipelines/deploy-application@db4b3614f5f863f56a5356052262878ecec83b31 # 22/07/2024
timeout-minutes: 15
with:
aws-role-arn: ${{ vars.COGNITO_DEPLOYMENT_ROLE_ARN }}
artifact-bucket-name: ${{ vars.COGNITO_DEPLOYMENT_ARTIFACTS_BUCKET }}
signing-profile-name: ${{ vars.SIGNING_PROFILE_NAME }}
pipeline-name: ${{ vars.COGNITO_PIPELINE_NAME }}
artifact-name: ${{ needs.build-cognito.outputs.artifact-name }}
template: .aws-sam/build/template.yaml
build-api:
if: github.event_name == 'merge_group'
name: Build api
runs-on: ubuntu-latest
outputs:
artifact-name: ${{ steps.build.outputs.artifact-name }}
cache-key: ${{ steps.build.outputs.cache-key }}
steps:
- name: Build
id: build
uses: govuk-one-login/github-actions/sam/build-application@6144f39407b01c9b25b39537b3956deca9e32620 # 22/02/2024
with:
template: backend/api/api.template.yml
manifest: backend/api/package.json
base-dir: backend/api
source-dir: backend/api
additional-artifact-paths: backend/api/state-machines
cache-name: api-infra
artifact-name: api-infrastructure
pull-repository: true
deploy-api:
if: github.event_name == 'merge_group'
name: Deploy api
runs-on: ubuntu-latest
environment:
name: development
url: ${{ steps.deploy.outputs.pipeline-url }}
outputs:
pipeline-url: ${{ steps.deploy.outputs.pipeline-url }}
steps:
- name: Deploy
id: deploy
uses: govuk-one-login/github-actions/secure-pipelines/deploy-application@db4b3614f5f863f56a5356052262878ecec83b31 # 22/07/2024
timeout-minutes: 15
with:
aws-role-arn: ${{ vars.API_DEPLOYMENT_ROLE_ARN }}
artifact-bucket-name: ${{ vars.API_DEPLOYMENT_ARTIFACTS_BUCKET }}
signing-profile-name: ${{ vars.SIGNING_PROFILE_NAME }}
pipeline-name: ${{ vars.API_PIPELINE_NAME }}
artifact-name: ${{ needs.build-api.outputs.artifact-name }}
template: .aws-sam/build/template.yaml