-
Notifications
You must be signed in to change notification settings - Fork 4
229 lines (212 loc) · 7.14 KB
/
rollout.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
216
217
218
219
220
221
222
223
224
225
226
227
228
name: Rollout to the instances
run-name: Rollout of ${{ inputs.config_tag_name }} to ${{ inputs.instance_group }}
on:
workflow_dispatch:
inputs:
config_tag_name:
description: 'Tag from the dof_app_deploy'
required: true
instance_group:
description: "All Instances, Instance group or Host"
required: true
default: all
jobs:
approve_ref:
environment: approve_ref
runs-on: ubuntu-latest
steps:
- run: echo "Version ${{ github.event.inputs.config_tag_name }}"
- run: echo "Target(s) ${{ github.event.inputs.instance_group }}"
- run: echo "Workflow is triggered by ${{ github.ref_type }} ${{ github.ref_name }}"
ref-audit:
if: ${{ !failure() }}
needs:
- approve_prod_stage_2
uses: ./.github/workflows/host.yml
with:
cfg_version: ${{ github.event.inputs.config_tag_name }}
host_name: ref-audit
host_group: dbc
host_stage: reference
execute_group: ${{ github.event.inputs.instance_group }}
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
ONEPASSWORD_VAULT: ${{ secrets.ONEPASSWORD_VAULT }}
KUBECONFIG: ${{ secrets.KUBECONFIG }}
RC_WEBHOOK: ${{ secrets.RC_WEBHOOK }}
ref-brb:
needs:
- approve_ref
uses: ./.github/workflows/host.yml
with:
cfg_version: ${{ github.event.inputs.config_tag_name }}
host_name: ref-brb
host_group: brb
host_stage: reference
execute_group: ${{ github.event.inputs.instance_group }}
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
ONEPASSWORD_VAULT: ${{ secrets.ONEPASSWORD_VAULT }}
KUBECONFIG: ${{ secrets.KUBECONFIG }}
RC_WEBHOOK: ${{ secrets.RC_WEBHOOK }}
ref-dbc:
needs:
- approve_ref
uses: ./.github/workflows/host.yml
with:
cfg_version: ${{ github.event.inputs.config_tag_name }}
host_name: ref-dbc
host_group: dbc
host_stage: reference
execute_group: ${{ github.event.inputs.instance_group }}
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
ONEPASSWORD_VAULT: ${{ secrets.ONEPASSWORD_VAULT }}
KUBECONFIG: ${{ secrets.KUBECONFIG }}
RC_WEBHOOK: ${{ secrets.RC_WEBHOOK }}
ref-nbc:
needs:
- approve_ref
uses: ./.github/workflows/host.yml
with:
cfg_version: ${{ github.event.inputs.config_tag_name }}
host_name: ref-nbc
host_group: nbc
host_stage: reference
execute_group: ${{ github.event.inputs.instance_group }}
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
ONEPASSWORD_VAULT: ${{ secrets.ONEPASSWORD_VAULT }}
KUBECONFIG: ${{ secrets.KUBECONFIG }}
RC_WEBHOOK: ${{ secrets.RC_WEBHOOK }}
ref-thr:
needs:
- approve_ref
uses: ./.github/workflows/host.yml
with:
cfg_version: ${{ github.event.inputs.config_tag_name }}
host_name: ref-thr
host_group: thr
host_stage: reference
execute_group: ${{ github.event.inputs.instance_group }}
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
ONEPASSWORD_VAULT: ${{ secrets.ONEPASSWORD_VAULT }}
KUBECONFIG: ${{ secrets.KUBECONFIG }}
RC_WEBHOOK: ${{ secrets.RC_WEBHOOK }}
approve_prod_stage_1:
if: ${{ !failure() }}
needs:
- ref-brb
- ref-dbc
- ref-nbc
- ref-thr
environment: approve_prod_stage_1
runs-on: ubuntu-latest
steps:
- run: echo "Version ${{ github.event.inputs.config_tag_name }}"
- run: echo "Target(s) ${{ github.event.inputs.instance_group }}"
- run: echo "Workflow is triggerd by ${{ github.ref_type }} ${{ github.ref_name }}"
prod-dbc:
if: ${{ !failure() }}
needs:
- approve_prod_stage_1
uses: ./.github/workflows/host.yml
with:
cfg_version: ${{ github.event.inputs.config_tag_name }}
host_name: prod-dbc
host_group: dbc
host_stage: production
execute_group: ${{ github.event.inputs.instance_group }}
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
ONEPASSWORD_VAULT: ${{ secrets.ONEPASSWORD_VAULT }}
KUBECONFIG: ${{ secrets.KUBECONFIG }}
RC_WEBHOOK: ${{ secrets.RC_WEBHOOK }}
approve_prod_stage_2:
if: ${{ !failure() }}
needs:
- prod-dbc
environment: approve_prod_stage_2
runs-on: ubuntu-latest
steps:
- run: echo "Version ${{ github.event.inputs.config_tag_name }}"
- run: echo "Target(s) ${{ github.event.inputs.instance_group }}"
- run: echo "Workflow is triggerd by ${{ github.ref_type }} ${{ github.ref_name }}"
prod-brb:
if: ${{ !failure() }}
needs:
- approve_prod_stage_2
uses: ./.github/workflows/host.yml
with:
cfg_version: ${{ github.event.inputs.config_tag_name }}
host_name: prod-brb
host_group: brb
host_stage: production
execute_group: ${{ github.event.inputs.instance_group }}
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
ONEPASSWORD_VAULT: ${{ secrets.ONEPASSWORD_VAULT }}
KUBECONFIG: ${{ secrets.KUBECONFIG }}
RC_WEBHOOK: ${{ secrets.RC_WEBHOOK }}
prod-nbc:
if: ${{ !failure() }}
needs:
- approve_prod_stage_2
uses: ./.github/workflows/host.yml
with:
cfg_version: ${{ github.event.inputs.config_tag_name }}
host_name: prod-nbc
host_group: nbc
host_stage: production
execute_group: ${{ github.event.inputs.instance_group }}
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
ONEPASSWORD_VAULT: ${{ secrets.ONEPASSWORD_VAULT }}
KUBECONFIG: ${{ secrets.KUBECONFIG }}
RC_WEBHOOK: ${{ secrets.RC_WEBHOOK }}
prod-thr:
if: ${{ !failure() }}
needs:
- approve_prod_stage_2
uses: ./.github/workflows/host.yml
with:
cfg_version: ${{ github.event.inputs.config_tag_name }}
host_name: prod-thr
host_group: thr
host_stage: production
execute_group: ${{ github.event.inputs.instance_group }}
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
ONEPASSWORD_VAULT: ${{ secrets.ONEPASSWORD_VAULT }}
KUBECONFIG: ${{ secrets.KUBECONFIG }}
RC_WEBHOOK: ${{ secrets.RC_WEBHOOK }}
# disable rollout to loadtest instance until it is restructered and fixed in OPS-5141
# dev-loadtest-01:
# uses: ./.github/workflows/host.yml
# with:
# cfg_version: ${{ github.event.inputs.config_tag_name }}
# host_name: dev-loadtest-01
# host_group: dbc
# host_stage: loadtest
# execute_group: ${{ github.event.inputs.instance_group }}
# secrets:
# token: ${{ secrets.GITHUB_TOKEN }}
# ONEPASSWORD_VAULT: ${{ secrets.ONEPASSWORD_VAULT }}
# KUBECONFIG: ${{ secrets.KUBECONFIG }}
# RC_WEBHOOK: ${{ secrets.RC_WEBHOOK }}
infra-dbildungscloud-01:
needs:
- approve_ref
uses: ./.github/workflows/host.yml
with:
cfg_version: ${{ github.event.inputs.config_tag_name }}
host_name: infra.dbildungscloud-01
host_group: dbc
host_stage: infra
execute_group: ${{ github.event.inputs.instance_group }}
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
ONEPASSWORD_VAULT: ${{ secrets.ONEPASSWORD_VAULT }}
KUBECONFIG: ${{ secrets.KUBECONFIG }}
RC_WEBHOOK: ${{ secrets.RC_WEBHOOK }}