forked from pingidentity/pingidentity-docker-builds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
226 lines (209 loc) · 6.08 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
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
- final
default:
before_script:
- ci_scripts/before_script.sh
services:
- $PIPELINE_DEPS_REGISTRY/docker:23.0.2-dind
image: $RUNNER_IMAGE_X86_64
################################################
# 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: '$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
tags:
- platform=aarch64
script:
- ci_scripts/cleanup_docker.sh full
- ci_scripts/build_foundation.sh
rules:
- if: $ARCHIVE_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: '$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
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
tags:
- platform=aarch64
script:
- ci_scripts/cleanup_old_kubernetes.sh
when: always
archive:
stage: final
script:
- ci_scripts/archive_images.sh
rules:
- if: $ARCHIVE_PIPELINE == "true"
when: on_success
- when: never