-
Notifications
You must be signed in to change notification settings - Fork 58
/
.gitlab-ci.yml
406 lines (370 loc) · 11 KB
/
.gitlab-ci.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
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
include:
- local: ldap-sdk-tools/.gitlab-ci.yml
- local: pingaccess/.gitlab-ci.yml
- local: pingauthorize/.gitlab-ci.yml
- local: pingauthorizepap/.gitlab-ci.yml
- local: pingcentral/.gitlab-ci.yml
- local: pingdataconsole/.gitlab-ci.yml
- local: pingdatasync/.gitlab-ci.yml
- local: pingdelegator/.gitlab-ci.yml
- local: pingdirectory/.gitlab-ci.yml
- local: pingdirectoryproxy/.gitlab-ci.yml
- local: pingfederate/.gitlab-ci.yml
# - local: pingintelligence/.gitlab-ci.yml
- local: pingtoolkit/.gitlab-ci.yml
- local: helm-tests/integration-tests/.gitlab-ci.yml
# - local: apache-jmeter/.gitlab-ci.yml
stages:
- initialization
- foundation
- products
- test.smoke
- test.integration
- deploy
- publish
- archive
- custom.image
- final
default:
before_script:
- ci_scripts/before_script.sh
services:
- $PIPELINE_DEPS_REGISTRY/docker:23.0.2-dind
# Toggle the comment status of the next two lines to test a new X86_64 runner image
# Update the variable in the repository accordingly
# There are similar toggle lines across the other pipeline files for the ARM runner image
# Search for $RUNNER_IMAGE_AARCH64 across all files
image: $RUNNER_IMAGE_X86_64
#image: $RUNNER_IMAGE_X86_64_TEST
################################################
# Default variables used by all jobs unless they
# are overridden by the job
#
# - .5-1 cpu
# - 1.9GB of memory with no elasticity
# - poll timeout of 15 minutes (to release capacity)
################################################
variables:
DOCKER_HOST: tcp://localhost:2375
KUBERNETES_CPU_REQUEST: 500m
KUBERNETES_CPU_LIMIT: 1000m
KUBERNETES_MEMORY_REQUEST: 1900000000
KUBERNETES_MEMORY_LIMIT: 1900000000
KUBERNETES_POLL_TIMEOUT: 1200
DOCKER_TLS_CERTDIR: ""
################################################
# For Docker Compose Tests, provide a kubernetes
# sizing of:
#
# - 95% of a cpu up to 4x (380%)
# - 1.9g of memory with no elasticity
################################################
# variables:
# KUBERNETES_CPU_REQUEST: 950m
# KUBERNETES_CPU_LIMIT: 3800m
# KUBERNETES_MEMORY_REQUEST: 1900000000
# KUBERNETES_MEMORY_LIMIT: 1900000000
################################################
# _____ _ _ _____ _______
# |_ _| \ | |_ _|__ __|
# | | | \| | | | | |
# | | | . ` | | | | |
# _| |_| |\ |_| |
# |_____|_| \_|_____| |_|
#
################################################
# Note: Platform agnostic
intel.i.checks:
stage: initialization
script:
- ci_scripts/if_readme_only.sh
rules:
- if: '$CI_PIPELINE_SOURCE =~ /^push$|^schedule$|^web$/'
when: on_success
intel.i.unmerged:
stage: initialization
script:
- ci_scripts/unmerged_changes.sh
rules:
- if: '$CI_COMMIT_MESSAGE =~ /\[skip build\]/i'
when: never
- if: '$CI_PIPELINE_SOURCE =~ /^push$|^schedule$|^web$/'
when: on_success
intel.i.shellcheck:
stage: initialization
script:
- ci_scripts/shellcheck.sh
rules:
- if: '$CI_COMMIT_MESSAGE =~ /\[skip build\]/i'
when: never
- if: '$CI_PIPELINE_SOURCE =~ /^push$|^schedule$|^web$/'
when: on_success
intel.i.shfmt:
stage: initialization
script:
- ci_scripts/shfmt.sh --diff
rules:
- if: '$CI_COMMIT_MESSAGE =~ /\[skip build\]/i'
when: never
- if: '$CI_PIPELINE_SOURCE =~ /^push$|^schedule$|^web$/'
when: on_success
#####################################################################
# ______ ____ _ _ _ _ _____ _______ _____ ____ _ _
# | ____/ __ \| | | | \ | | __ \ /\|__ __|_ _/ __ \| \ | |
# | |__ | | | | | | | \| | | | | / \ | | | || | | | \| |
# | __|| | | | | | | . ` | | | |/ /\ \ | | | || | | | . ` |
# | | | |__| | |__| | |\ | |__| / ____ \| | _| || |__| | |\ |
# |_| \____/ \____/|_| \_|_____/_/ \_\_| |_____\____/|_| \_|
#
#####################################################################
intel.f.pingfoundation:
stage: foundation
script:
- ci_scripts/cleanup_docker.sh full
- ci_scripts/build_foundation.sh
rules:
- if: $ARCHIVE_PIPELINE == "true"
when: never
- if: $CUSTOM_IMAGE_PIPELINE == "true"
when: never
- if: '$CI_COMMIT_MESSAGE =~ /\[skip build\]/i'
when: never
- if: '$CI_PIPELINE_SOURCE =~ /^push$|^schedule$|^web$/'
when: on_success
arm.f.pingfoundation:
stage: foundation
image: $RUNNER_IMAGE_AARCH64
#image: $RUNNER_IMAGE_AARCH64_TEST
tags:
- platform=aarch64
script:
- ci_scripts/cleanup_docker.sh full
- ci_scripts/build_foundation.sh
rules:
- if: $ARCHIVE_PIPELINE == "true"
when: never
- if: $CUSTOM_IMAGE_PIPELINE == "true"
when: never
- if: '$CI_COMMIT_MESSAGE =~ /\[skip build\]/i'
when: never
- if: '$CI_PIPELINE_SOURCE =~ /^push$|^schedule$|^web$/'
when: on_success
################################################
# _____ _ _ _ _
# | __ \ | | | (_) | |
# | |__) | _| |__ | |_ ___| |__
# | ___/ | | | '_ \| | / __| '_ \
# | | | |_| | |_) | | \__ \ | | |
# |_| \__,_|_.__/|_|_|___/_| |_|
#
################################################
p.github:
stage: publish
script:
- git --version
- ci_scripts/push_to_github.sh
- ci_scripts/deploy_docs.sh
rules:
- if: $ARCHIVE_PIPELINE == "true"
when: never
- if: $CUSTOM_IMAGE_PIPELINE == "true"
when: never
- if: '$CI_COMMIT_MESSAGE =~ /\[skip products\]/i'
when: never
- if: '$CI_COMMIT_REF_NAME =~ /\[skip deploy\]/i'
when: never
- if: '$PING_IDENTITY_SNAPSHOT =~ /--snapshot/'
when: never
- if: '$CI_COMMIT_REF_NAME =~ /^master$/'
when: on_success
- if: '$CI_COMMIT_TAG =~ /^\d{4}\.?\d*/'
when: on_success
################################################
# ______ _____ _ _ _
# | ____|_ _| \ | | /\ | |
# | |__ | | | \| | / \ | |
# | __| | | | . ` | / /\ \ | |
# | | _| |_| |\ |/ ____ \| |____
# |_| |_____|_| \_/_/ \_\______|
################################################
intel.clean-k8s:
stage: final
script:
- ci_scripts/cleanup_kubernetes.sh
when: always
arm.clean-k8s:
stage: final
image: $RUNNER_IMAGE_AARCH64
#image: $RUNNER_IMAGE_AARCH64_TEST
tags:
- platform=aarch64
script:
- ci_scripts/cleanup_kubernetes.sh
when: always
intel.delete-old-k8s:
stage: final
script:
- ci_scripts/cleanup_old_kubernetes.sh
when: always
arm.delete-old-k8s:
stage: final
image: $RUNNER_IMAGE_AARCH64
#image: $RUNNER_IMAGE_AARCH64_TEST
tags:
- platform=aarch64
script:
- ci_scripts/cleanup_old_kubernetes.sh
when: always
########################################################
# _____ _____ _ _ _______ ________
# /\ | __ \ / ____| | | |_ _\ \ / / ____|
# / \ | |__) | | | |__| | | | \ \ / /| |__
# / /\ \ | _ /| | | __ | | | \ \/ / | __|
# / ____ \| | \ \| |____| | | |_| |_ \ / | |____
# /_/ \_\_| \_\\_____|_| |_|_____| \/ |______|
########################################################
a.ldap-sdk-tools:
stage: archive
retry: 2
script:
- ci_scripts/archive_images.sh --product ldap-sdk-tools
rules:
- if: $ARCHIVE_PIPELINE == "true"
when: on_success
- when: never
a.pingaccess:
stage: archive
retry: 2
script:
- ci_scripts/archive_images.sh --product pingaccess
rules:
- if: $ARCHIVE_PIPELINE == "true"
when: on_success
- when: never
a.pingauthorize:
stage: archive
retry: 2
script:
- ci_scripts/archive_images.sh --product pingauthorize
rules:
- if: $ARCHIVE_PIPELINE == "true"
when: on_success
- when: never
a.pingauthorizepap:
stage: archive
retry: 2
script:
- ci_scripts/archive_images.sh --product pingauthorizepap
rules:
- if: $ARCHIVE_PIPELINE == "true"
when: on_success
- when: never
a.pingcentral:
stage: archive
retry: 2
script:
- ci_scripts/archive_images.sh --product pingcentral
rules:
- if: $ARCHIVE_PIPELINE == "true"
when: on_success
- when: never
a.pingdataconsole:
stage: archive
retry: 2
script:
- ci_scripts/archive_images.sh --product pingdataconsole
rules:
- if: $ARCHIVE_PIPELINE == "true"
when: on_success
- when: never
a.pingdatasync:
stage: archive
retry: 2
script:
- ci_scripts/archive_images.sh --product pingdatasync
rules:
- if: $ARCHIVE_PIPELINE == "true"
when: on_success
- when: never
a.pingdelegator:
stage: archive
retry: 2
script:
- ci_scripts/archive_images.sh --product pingdelegator
rules:
- if: $ARCHIVE_PIPELINE == "true"
when: on_success
- when: never
a.pingdirectory:
stage: archive
retry: 2
script:
- ci_scripts/archive_images.sh --product pingdirectory
rules:
- if: $ARCHIVE_PIPELINE == "true"
when: on_success
- when: never
a.pingdirectoryproxy:
stage: archive
retry: 2
script:
- ci_scripts/archive_images.sh --product pingdirectoryproxy
rules:
- if: $ARCHIVE_PIPELINE == "true"
when: on_success
- when: never
a.pingfederate:
stage: archive
retry: 2
script:
- ci_scripts/archive_images.sh --product pingfederate
rules:
- if: $ARCHIVE_PIPELINE == "true"
when: on_success
- when: never
#a.pingintelligence:
# stage: archive
# retry: 2
# script:
# - ci_scripts/archive_images.sh --product pingintelligence
# rules:
# - if: $ARCHIVE_PIPELINE == "true"
# when: on_success
# - when: never
a.pingtoolkit:
stage: archive
retry: 2
script:
- ci_scripts/archive_images.sh --product pingtoolkit
rules:
- if: $ARCHIVE_PIPELINE == "true"
when: on_success
- when: never
###################################################################################
# _____ _ _ _____ _______ ____ __ __ _____ __ __ _____ ______
# / ____| | | |/ ____|__ __/ __ \| \/ | |_ _| \/ | /\ / ____| ____|
# | | | | | | (___ | | | | | | \ / | | | | \ / | / \ | | __| |__
# | | | | | |\___ \ | | | | | | |\/| | | | | |\/| | / /\ \| | |_ | __|
# | |____| |__| |____) | | | | |__| | | | | _| |_| | | |/ ____ \ |__| | |____
# \_____|\____/|_____/ |_| \____/|_| |_| |_____|_| |_/_/ \_\_____|______|
###################################################################################
intel.custom.image:
stage: custom.image
script:
- ci_scripts/build_custom_image.sh --product $CUSTOM_PRODUCT_NAME --version $CUSTOM_PRODUCT_VERSION --os-shim $CUSTOM_OS_SHIM --jvm $CUSTOM_JVM_ID --sprint $CUSTOM_SPRINT_VERSION
rules:
- if: $CUSTOM_IMAGE_PIPELINE == "true"
when: on_success
- when: never
arm.custom.image:
stage: custom.image
image: $RUNNER_IMAGE_AARCH64
#image: $RUNNER_IMAGE_AARCH64_TEST
tags:
- platform=aarch64
script:
- ci_scripts/build_custom_image.sh --product $CUSTOM_PRODUCT_NAME --version $CUSTOM_PRODUCT_VERSION --os-shim $CUSTOM_OS_SHIM --jvm $CUSTOM_JVM_ID --sprint $CUSTOM_SPRINT_VERSION
rules:
- if: $CUSTOM_IMAGE_PIPELINE == "true"
when: on_success
- when: never