Use separate job template for onap-healthcheck jobs
[infra/cicd.git] / jjb / cloud-infra / cloud-infra-periodic-onap.yaml
1 ---
2 #
3 # ============LICENSE_START=======================================================
4 #  Copyright (C) 2019 Nordix Foundation.
5 # ================================================================================
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
9 #
10 #      http://www.apache.org/licenses/LICENSE-2.0
11 #
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17 #
18 # SPDX-License-Identifier: Apache-2.0
19 # ============LICENSE_END=========================================================
20
21 #--------------------------------------------------------------------------------------
22 # The jobs declared in this JJB configuration file are used for verifying cloud-infra
23 # engine from the tip of the master branch periodically to check the stability of it.
24 #
25 # These jobs are set to run on slaves with label vpod-deploy-ubuntu1604.
26 # The slaves have
27 #   - Ubuntu1604 as the base distro
28 #   - nested virtualization
29 #   - internet access
30 #   - passwordless sudo
31 #   - 16 CPUs/32GB RAM/200 GB Disk
32 #   - docker, git vim curl wget zip unzip chrony apt-transport-https ca-certificates curl
33 #     gnupg-agent software-properties-common docker-ce docker-ce-cli containerd.io openjdk-8-jre
34 #
35 # The slaves should not have a cloud infra scenario deployed on them.
36 #--------------------------------------------------------------------------------------
37
38 - project:
39     name: 'cloud-infra-periodic-onap'
40
41     project: 'infra/engine'
42
43     onap-branch:
44       - 'dublin':
45           nordix-branch: master
46           onap-version: 4.0.0-ONAP
47           engine-version: master
48           engine-refspec: "refs/changes/71/1771/4"
49           deploy-scenario-version: "9a215b7935ab2b14cc7451ba15ea575e62e26da7"
50           deploy-scenario-refspec: "refs/changes/65/1765/12"
51           disabled: false
52       - 'master':
53           nordix-branch: master
54           onap-version: master
55           engine-version: master
56           engine-refspec: master
57           deploy-scenario-version: master
58           deploy-scenario-refspec: master
59           disabled: true
60
61     distro:
62       - ubuntu1804
63
64     deploy-scenario:
65       - onap-oom-nofeature
66
67     type:
68       - cloud:
69           provisioner-type: heat
70           installer-type: kubespray
71           slave-label: 'jumphost-onap-ubuntu1804'
72
73     onap-other-phases:
74       - onap-deploy:
75           build-timeout: 150
76       - oom-healthcheck:
77           build-timeout: 30
78           test-type: oom-healthcheck
79       - promote-onap:
80           build-timeout: 5
81       - delete-stack:
82           build-timeout: 5
83
84     onap-healthcheck-phases:
85       - onap-healthcheck-core:
86           build-timeout: 30
87           test-type: onap-healthcheck
88       - onap-healthcheck-small:
89           build-timeout: 30
90           test-type: onap-healthcheck
91       - onap-healthcheck-medium:
92           build-timeout: 30
93           test-type: onap-healthcheck
94       - onap-healthcheck-full:
95           build-timeout: 30
96           test-type: onap-healthcheck
97
98     jobs:
99       - '{deploy-scenario}-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
100       - '{onap-other-phases}-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
101       - '{onap-healthcheck-phases}-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
102
103 - job-template:
104     name: '{deploy-scenario}-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
105
106     project-type: multijob
107
108     disabled: '{obj:disabled}'
109
110     concurrent: true
111
112     parameters:
113       - onap-parameter-macro
114
115     properties:
116       - logrotate
117       - build-blocker:
118           use-build-blocker: true
119           blocking-jobs:
120             - 'cloud-infra-periodic-engine-.*'
121             - 'onap-.*'
122             - 'k8-.*'
123           block-level: 'NODE'
124       - throttle:
125           max-per-node: 1
126           max-total: 3
127           option: project
128
129     wrappers:
130       - build-timeout:
131           timeout: 220
132       - fix-workspace-permissions
133
134     scm:
135       - git-scm:
136           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
137           branch: '{nordix-branch}'
138           refspec: ''
139           wipe_workspace: true
140           clean_before: false
141
142     builders:
143       - description-setter:
144           description: $INSTALLER_TYPE | $DEPLOY_SCENARIO
145       - multijob:
146           name: Deploy ONAP using OOM
147           condition: SUCCESSFUL
148           projects:
149             - name: 'onap-deploy-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
150               current-parameters: false
151               predefined-parameters: |
152                 DISTRO=$DISTRO
153                 DEPLOY_TYPE=$DEPLOY_TYPE
154                 PROVISIONER_TYPE=$PROVISIONER_TYPE
155                 INSTALLER_TYPE=$INSTALLER_TYPE
156                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
157                 ONAP_VERSION=$ONAP_VERSION
158                 ONAP_FLAVOR=$ONAP_FLAVOR
159                 ENGINE_VERSION=$ENGINE_VERSION
160                 ENGINE_REFSPEC=$ENGINE_REFSPEC
161                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
162                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
163                 XTESTING_REPO_URL=$XTESTING_REPO_URL
164                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
165                 CLEANUP=$CLEANUP
166               git-revision: true
167               node-parameters: true
168               kill-phase-on: FAILURE
169               abort-all-job: true
170       - multijob:
171           name: K8S and OOM Healthcheck using xtesting
172           condition: ALWAYS
173           projects:
174             - name: 'oom-healthcheck-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
175               current-parameters: false
176               predefined-parameters: |
177                 DISTRO=$DISTRO
178                 DEPLOY_TYPE=$DEPLOY_TYPE
179                 PROVISIONER_TYPE=$PROVISIONER_TYPE
180                 INSTALLER_TYPE=$INSTALLER_TYPE
181                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
182                 ONAP_VERSION=$ONAP_VERSION
183                 ONAP_FLAVOR=full
184                 TEST_TYPE=oom-healthcheck
185                 ENGINE_VERSION=$ENGINE_VERSION
186                 ENGINE_REFSPEC=$ENGINE_REFSPEC
187                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
188                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
189                 XTESTING_REPO_URL=$XTESTING_REPO_URL
190                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
191                 CLEANUP=$CLEANUP
192               node-parameters: true
193               kill-phase-on: NEVER
194               abort-all-job: false
195       - multijob:
196           name: ONAP Healthcheck using xtesting
197           condition: ALWAYS
198           projects:
199             - name: 'onap-healthcheck-core-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
200               current-parameters: false
201               predefined-parameters: |
202                 SLAVE_LABEL=$SLAVE_LABEL
203                 DISTRO=$DISTRO
204                 PROVISIONER_TYPE=$PROVISIONER_TYPE
205                 INSTALLER_TYPE=$INSTALLER_TYPE
206                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
207                 DEPLOY_TYPE=$DEPLOY_TYPE
208                 ONAP_VERSION=$ONAP_VERSION
209                 ONAP_FLAVOR=core
210                 TEST_TYPE=onap-healthcheck
211                 ENGINE_VERSION=$ENGINE_VERSION
212                 ENGINE_REFSPEC=$ENGINE_REFSPEC
213                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
214                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
215                 XTESTING_REPO_URL=$XTESTING_REPO_URL
216                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
217                 CLEANUP=$CLEANUP
218               node-parameters: true
219               kill-phase-on: NEVER
220               abort-all-job: false
221             - name: 'onap-healthcheck-small-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
222               current-parameters: false
223               predefined-parameters: |
224                 SLAVE_LABEL=$SLAVE_LABEL
225                 DISTRO=$DISTRO
226                 PROVISIONER_TYPE=$PROVISIONER_TYPE
227                 INSTALLER_TYPE=$INSTALLER_TYPE
228                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
229                 DEPLOY_TYPE=$DEPLOY_TYPE
230                 ONAP_VERSION=$ONAP_VERSION
231                 ONAP_FLAVOR=small
232                 TEST_TYPE=onap-healthcheck
233                 ENGINE_VERSION=$ENGINE_VERSION
234                 ENGINE_REFSPEC=$ENGINE_REFSPEC
235                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
236                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
237                 XTESTING_REPO_URL=$XTESTING_REPO_URL
238                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
239                 CLEANUP=$CLEANUP
240               node-parameters: true
241               kill-phase-on: NEVER
242               abort-all-job: false
243             - name: 'onap-healthcheck-medium-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
244               current-parameters: false
245               predefined-parameters: |
246                 SLAVE_LABEL=$SLAVE_LABEL
247                 DISTRO=$DISTRO
248                 PROVISIONER_TYPE=$PROVISIONER_TYPE
249                 INSTALLER_TYPE=$INSTALLER_TYPE
250                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
251                 DEPLOY_TYPE=$DEPLOY_TYPE
252                 ONAP_VERSION=$ONAP_VERSION
253                 ONAP_FLAVOR=medium
254                 TEST_TYPE=onap-healthcheck
255                 ENGINE_VERSION=$ENGINE_VERSION
256                 ENGINE_REFSPEC=$ENGINE_REFSPEC
257                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
258                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
259                 XTESTING_REPO_URL=$XTESTING_REPO_URL
260                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
261                 CLEANUP=$CLEANUP
262               node-parameters: true
263               kill-phase-on: NEVER
264               abort-all-job: false
265             - name: 'onap-healthcheck-full-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
266               current-parameters: false
267               predefined-parameters: |
268                 SLAVE_LABEL=$SLAVE_LABEL
269                 DISTRO=$DISTRO
270                 PROVISIONER_TYPE=$PROVISIONER_TYPE
271                 INSTALLER_TYPE=$INSTALLER_TYPE
272                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
273                 DEPLOY_TYPE=$DEPLOY_TYPE
274                 ONAP_VERSION=$ONAP_VERSION
275                 ONAP_FLAVOR=full
276                 TEST_TYPE=onap-healthcheck
277                 ENGINE_VERSION=$ENGINE_VERSION
278                 ENGINE_REFSPEC=$ENGINE_REFSPEC
279                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
280                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
281                 XTESTING_REPO_URL=$XTESTING_REPO_URL
282                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
283                 CLEANUP=$CLEANUP
284               node-parameters: true
285               kill-phase-on: NEVER
286               abort-all-job: false
287       - multijob:
288           name: Promote ONAP (not activated)
289           condition: ALWAYS
290           projects:
291             - name: 'promote-onap-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
292               current-parameters: false
293               predefined-parameters: |
294                 DISTRO=$DISTRO
295                 DEPLOY_TYPE=$DEPLOY_TYPE
296                 INSTALLER_TYPE=$INSTALLER_TYPE
297                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
298                 ONAP_VERSION=$ONAP_VERSION
299                 ONAP_FLAVOR=$ONAP_FLAVOR
300                 ENGINE_VERSION=$ENGINE_VERSION
301                 ENGINE_REFSPEC=$ENGINE_REFSPEC
302                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
303                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
304                 XTESTING_REPO_URL=$XTESTING_REPO_URL
305                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
306                 CLEANUP=$CLEANUP
307               node-parameters: true
308               kill-phase-on: NEVER
309               abort-all-job: false
310       - multijob:
311           name: Delete Stack
312           condition: ALWAYS
313           projects:
314             - name: 'delete-stack-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
315               current-parameters: false
316               predefined-parameters: |
317                 DISTRO=$DISTRO
318                 DEPLOY_TYPE=$DEPLOY_TYPE
319                 INSTALLER_TYPE=$INSTALLER_TYPE
320                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
321                 ONAP_VERSION=$ONAP_VERSION
322                 ONAP_FLAVOR=$ONAP_FLAVOR
323                 ENGINE_VERSION=$ENGINE_VERSION
324                 ENGINE_REFSPEC=$ENGINE_REFSPEC
325                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
326                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
327                 XTESTING_REPO_URL=$XTESTING_REPO_URL
328                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
329                 CLEANUP=$CLEANUP
330               node-parameters: true
331               kill-phase-on: NEVER
332               abort-all-job: false
333
334 - job-template:
335     name: '{onap-other-phases}-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
336
337     disabled: false
338
339     concurrent: true
340
341     properties:
342       - logrotate
343
344     parameters:
345       - onap-parameter-macro
346
347     wrappers:
348       - credentials-binding:
349           - file:
350               credential-id: nordix-jenkins-openrcfile-city-frankfurt-defaultproject
351               variable: OPENRC_FILE
352       - mask-passwords
353       - build-timeout:
354           timeout: '{build-timeout}'
355       - fix-workspace-permissions
356
357     scm:
358       - git-scm:
359           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
360           branch: '{nordix-branch}'
361           refspec: ''
362           wipe_workspace: true
363           clean_before: false
364
365     builders:
366       - description-setter:
367           description: $INSTALLER_TYPE $DEPLOY_SCENARIO
368       - '{onap-other-phases}-macro'
369
370 - job-template:
371     name: '{onap-healthcheck-phases}-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
372
373     disabled: false
374
375     concurrent: true
376
377     properties:
378       - logrotate
379
380     parameters:
381       - onap-parameter-macro
382
383     wrappers:
384       - credentials-binding:
385           - file:
386               credential-id: nordix-jenkins-openrcfile-city-frankfurt-defaultproject
387               variable: OPENRC_FILE
388       - mask-passwords
389       - build-timeout:
390           timeout: '{build-timeout}'
391       - fix-workspace-permissions
392
393     scm:
394       - git-scm:
395           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
396           branch: '{nordix-branch}'
397           refspec: ''
398           wipe_workspace: true
399           clean_before: false
400
401     builders:
402       - description-setter:
403           description: $INSTALLER_TYPE $DEPLOY_SCENARIO
404       - 'onap-healthcheck-macro'
405
406 # vim: set ts=2 sw=2 expandtab: