-
Notifications
You must be signed in to change notification settings - Fork 2
215 lines (194 loc) · 7.15 KB
/
hotfix.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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
name: Hotfix
on:
workflow_dispatch:
inputs:
version:
description: 'Version (format: x.xxx.x, ie: 1.221.1)'
required: true
concurrency: CI
jobs:
set-release-version:
if: github.repository_owner == 'Informatievlaanderen'
name: Decide next version
runs-on: ubuntu-latest
outputs:
version: ${{ steps.set-version.outputs.version }}
steps:
- name: Set Release Version
id: set-version
run: |
echo ${{ github.event.inputs.version }} > semver
echo $(cat semver)
echo ::set-output name=version::$(cat semver)
echo RELEASE_VERSION=$(cat semver) >> $GITHUB_ENV
shell: bash
build-acm-api:
name: Build ACM Api
uses: ./.github/workflows/build-image.yml
if: github.repository_owner == 'Informatievlaanderen'
needs: [ set-release-version ]
with:
image-file: ar-acm-api-image.tar
image-name: verenigingsregister-acmapi
test-project: AssociationRegistry.Test.Acm.Api
build-project: AssociationRegistry.Acm.Api/
semver: ${{ needs.set-release-version.outputs.version }}
run-docker-acm: true
run-docker-wiremock: false
run-docker-db: true
run-docker-elasticsearch: false
run-docker-localstack: false
run-docker-otelcollector: false
pre-gen-marten: true
secrets: inherit
build-public-api:
name: Build Public Api
uses: ./.github/workflows/build-image.yml
if: github.repository_owner == 'Informatievlaanderen'
needs: [ set-release-version ]
with:
image-file: ar-public-api-image.tar
image-name: verenigingsregister-publicapi
test-project: AssociationRegistry.Test.Public.Api
build-project: AssociationRegistry.Public.Api/
semver: ${{ needs.set-release-version.outputs.version }}
run-docker-acm: false
run-docker-wiremock: false
run-docker-db: true
run-docker-elasticsearch: true
run-docker-localstack: true
run-docker-otelcollector: true
pre-gen-marten: false
secrets: inherit
build-public-projections:
name: Build Public Projections
uses: ./.github/workflows/build-image.yml
if: github.repository_owner == 'Informatievlaanderen'
needs: [ set-release-version ]
with:
image-file: ar-public-projections-image.tar
image-name: verenigingsregister-publicprojections
build-project: AssociationRegistry.Public.ProjectionHost/
semver: ${{ needs.set-release-version.outputs.version }}
run-docker-acm: false
run-docker-wiremock: false
run-docker-db: true
run-docker-elasticsearch: true
run-docker-localstack: false
run-docker-otelcollector: true
pre-gen-marten: true
secrets: inherit
build-admin-api:
name: Build Admin Api
uses: ./.github/workflows/build-image.yml
if: github.repository_owner == 'Informatievlaanderen'
needs: [ set-release-version ]
with:
image-file: ar-admin-api-image.tar
image-name: verenigingsregister-adminapi
test-project: AssociationRegistry.Test.Admin.Api
build-project: AssociationRegistry.Admin.Api/
semver: ${{ needs.set-release-version.outputs.version }}
run-docker-acm: true
run-docker-wiremock: true
run-docker-db: true
run-docker-elasticsearch: true
run-docker-localstack: true
run-docker-otelcollector: true
pre-gen-marten: true
secrets: inherit
build-admin-projections:
name: Build Admin Projections
uses: ./.github/workflows/build-image.yml
if: github.repository_owner == 'Informatievlaanderen'
needs: [ set-release-version ]
with:
image-file: ar-admin-projections-image.tar
image-name: verenigingsregister-adminprojections
build-project: AssociationRegistry.Admin.ProjectionHost/
semver: ${{ needs.set-release-version.outputs.version }}
run-docker-acm: true
run-docker-wiremock: true
run-docker-db: true
run-docker-elasticsearch: true
run-docker-localstack: true
run-docker-otelcollector: true
pre-gen-marten: true
secrets: inherit
push_images_to_ik4_devops:
if: needs.set-release-version.outputs.version != 'none'
needs: [
set-release-version,
build-acm-api,
build-public-api,
build-public-projections,
build-admin-api,
build-admin-projections
]
name: Push images IK4 (DevOps)
runs-on: ubuntu-latest
steps:
- name: Configure AWS credentials (Test)
if: needs.set-release-version.outputs.version != 'none'
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.VBR_AWS_BUILD_USER_ACCESS_KEY_ID_IK4 }}
aws-secret-access-key: ${{ secrets.VBR_AWS_BUILD_USER_SECRET_ACCESS_KEY_IK4 }}
aws-region: ${{ secrets.VBR_AWS_REGION_PRD }}
- name: Login to Amazon ECR (Test)
if: needs.set-release-version.outputs.version != 'none'
uses: aws-actions/amazon-ecr-login@v2.0.1
- name: Download Acm Api artifact
uses: actions/download-artifact@v4
with:
name: verenigingsregister-acmapi
path: ~/
- name: Load Acm Api image
shell: bash
run: docker image load -i ~/ar-acm-api-image.tar
- name: Download Public Api artifact
uses: actions/download-artifact@v4
with:
name: verenigingsregister-publicapi
path: ~/
- name: Load Public Api image
shell: bash
run: docker image load -i ~/ar-public-api-image.tar
- name: Download Public Projections artifact
uses: actions/download-artifact@v4
with:
name: verenigingsregister-publicprojections
path: ~/
- name: Load Public Projections image
shell: bash
run: docker image load -i ~/ar-public-projections-image.tar
- name: Download Admin Api artifact
uses: actions/download-artifact@v4
with:
name: verenigingsregister-adminapi
path: ~/
- name: Load Admin Api image
shell: bash
run: docker image load -i ~/ar-admin-api-image.tar
- name: Download Admin Projections artifact
uses: actions/download-artifact@v4
with:
name: verenigingsregister-adminprojections
path: ~/
- name: Load Admin Projections image
shell: bash
run: docker image load -i ~/ar-admin-projections-image.tar
- name: Push docker images to ECR Test
if: needs.set-release-version.outputs.version != 'none'
shell: bash
run: |
echo $SEMVER
docker push $BUILD_DOCKER_REGISTRY_IK4/verenigingsregister-acmapi:$SEMVER
docker push $BUILD_DOCKER_REGISTRY_IK4/verenigingsregister-adminapi:$SEMVER
docker push $BUILD_DOCKER_REGISTRY_IK4/verenigingsregister-adminprojections:$SEMVER
docker push $BUILD_DOCKER_REGISTRY_IK4/verenigingsregister-publicapi:$SEMVER
docker push $BUILD_DOCKER_REGISTRY_IK4/verenigingsregister-publicprojections:$SEMVER
env:
BUILD_DOCKER_REGISTRY_IK4: ${{ secrets.BUILD_DOCKER_REGISTRY_IK4 }}
SEMVER: ${{ needs.set-release-version.outputs.version }}
WORKSPACE: ${{ github.workspace }}