Merge "Enable onap-oom-nofeature master branch 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: master
49           deploy-scenario-version: master
50           deploy-scenario-refspec: master
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: false
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       - project-parameters:
114           project: '{project}'
115           branch: '{nordix-branch}'
116       - nordix-gerrit-parameters
117       - onap-parameter-macro
118       - string:
119           name: ONAP_VERSION
120           default: '{onap-version}'
121           description: 'ONAP version to deploy'
122       - string:
123           name: ENGINE_VERSION
124           default: '{engine-version}'
125           description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying ONAP. Could be sha, branch'
126       - string:
127           name: ENGINE_REFSPEC
128           default: '{engine-refspec}'
129           description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying ONAP. Must be refspec.'
130       - string:
131           name: DEPLOY_SCENARIO_VERSION
132           default: '{deploy-scenario-version}'
133           description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying ONAP. Depends on DEPLOY_SCENARIO_REFSPEC and could be sha, branch.'
134       - string:
135           name: DEPLOY_SCENARIO_REFSPEC
136           default: '{deploy-scenario-refspec}'
137           description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying ONAP. Depends on DEPLOY_SCENARIO_VERSION and must be refspec.'
138
139     properties:
140       - logrotate
141       - build-blocker:
142           use-build-blocker: true
143           blocking-jobs:
144             - 'cloud-infra-periodic-engine-.*'
145             - 'onap-.*'
146             - 'k8-.*'
147           block-level: 'NODE'
148       - throttle:
149           max-per-node: 1
150           max-total: 3
151           option: project
152
153     wrappers:
154       - build-timeout:
155           timeout: 220
156       - fix-workspace-permissions
157       - openstack:
158           single-use: True
159
160     scm:
161       - git-scm:
162           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
163           branch: '{nordix-branch}'
164           refspec: ''
165           wipe_workspace: true
166           clean_before: false
167
168     builders:
169       - description-setter:
170           description: $INSTALLER_TYPE | $DEPLOY_SCENARIO
171       - multijob:
172           name: Deploy ONAP using OOM
173           condition: SUCCESSFUL
174           projects:
175             - name: 'onap-deploy-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
176               current-parameters: false
177               predefined-parameters: |
178                 DISTRO=$DISTRO
179                 DEPLOY_TYPE=$DEPLOY_TYPE
180                 PROVISIONER_TYPE=$PROVISIONER_TYPE
181                 INSTALLER_TYPE=$INSTALLER_TYPE
182                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
183                 ONAP_VERSION=$ONAP_VERSION
184                 ONAP_FLAVOR=$ONAP_FLAVOR
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               git-revision: true
193               node-parameters: true
194               kill-phase-on: FAILURE
195               abort-all-job: true
196       - multijob:
197           name: K8S and OOM Healthcheck using xtesting
198           condition: ALWAYS
199           projects:
200             - name: 'oom-healthcheck-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
201               current-parameters: false
202               predefined-parameters: |
203                 DISTRO=$DISTRO
204                 DEPLOY_TYPE=$DEPLOY_TYPE
205                 PROVISIONER_TYPE=$PROVISIONER_TYPE
206                 INSTALLER_TYPE=$INSTALLER_TYPE
207                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
208                 ONAP_VERSION=$ONAP_VERSION
209                 ONAP_FLAVOR=full
210                 TEST_TYPE=oom-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       - multijob:
222           name: ONAP Healthcheck using xtesting
223           condition: ALWAYS
224           projects:
225             - name: 'onap-healthcheck-core-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
226               current-parameters: false
227               predefined-parameters: |
228                 SLAVE_LABEL=$SLAVE_LABEL
229                 DISTRO=$DISTRO
230                 PROVISIONER_TYPE=$PROVISIONER_TYPE
231                 INSTALLER_TYPE=$INSTALLER_TYPE
232                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
233                 DEPLOY_TYPE=$DEPLOY_TYPE
234                 ONAP_VERSION=$ONAP_VERSION
235                 ONAP_FLAVOR=core
236                 TEST_TYPE=onap-healthcheck
237                 ENGINE_VERSION=$ENGINE_VERSION
238                 ENGINE_REFSPEC=$ENGINE_REFSPEC
239                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
240                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
241                 XTESTING_REPO_URL=$XTESTING_REPO_URL
242                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
243                 CLEANUP=$CLEANUP
244               node-parameters: true
245               kill-phase-on: NEVER
246               abort-all-job: false
247             - name: 'onap-healthcheck-small-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
248               current-parameters: false
249               predefined-parameters: |
250                 SLAVE_LABEL=$SLAVE_LABEL
251                 DISTRO=$DISTRO
252                 PROVISIONER_TYPE=$PROVISIONER_TYPE
253                 INSTALLER_TYPE=$INSTALLER_TYPE
254                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
255                 DEPLOY_TYPE=$DEPLOY_TYPE
256                 ONAP_VERSION=$ONAP_VERSION
257                 ONAP_FLAVOR=small
258                 TEST_TYPE=onap-healthcheck
259                 ENGINE_VERSION=$ENGINE_VERSION
260                 ENGINE_REFSPEC=$ENGINE_REFSPEC
261                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
262                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
263                 XTESTING_REPO_URL=$XTESTING_REPO_URL
264                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
265                 CLEANUP=$CLEANUP
266               node-parameters: true
267               kill-phase-on: NEVER
268               abort-all-job: false
269             - name: 'onap-healthcheck-medium-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
270               current-parameters: false
271               predefined-parameters: |
272                 SLAVE_LABEL=$SLAVE_LABEL
273                 DISTRO=$DISTRO
274                 PROVISIONER_TYPE=$PROVISIONER_TYPE
275                 INSTALLER_TYPE=$INSTALLER_TYPE
276                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
277                 DEPLOY_TYPE=$DEPLOY_TYPE
278                 ONAP_VERSION=$ONAP_VERSION
279                 ONAP_FLAVOR=medium
280                 TEST_TYPE=onap-healthcheck
281                 ENGINE_VERSION=$ENGINE_VERSION
282                 ENGINE_REFSPEC=$ENGINE_REFSPEC
283                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
284                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
285                 XTESTING_REPO_URL=$XTESTING_REPO_URL
286                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
287                 CLEANUP=$CLEANUP
288               node-parameters: true
289               kill-phase-on: NEVER
290               abort-all-job: false
291             - name: 'onap-healthcheck-full-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
292               current-parameters: false
293               predefined-parameters: |
294                 SLAVE_LABEL=$SLAVE_LABEL
295                 DISTRO=$DISTRO
296                 PROVISIONER_TYPE=$PROVISIONER_TYPE
297                 INSTALLER_TYPE=$INSTALLER_TYPE
298                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
299                 DEPLOY_TYPE=$DEPLOY_TYPE
300                 ONAP_VERSION=$ONAP_VERSION
301                 ONAP_FLAVOR=full
302                 TEST_TYPE=onap-healthcheck
303                 ENGINE_VERSION=$ENGINE_VERSION
304                 ENGINE_REFSPEC=$ENGINE_REFSPEC
305                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
306                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
307                 XTESTING_REPO_URL=$XTESTING_REPO_URL
308                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
309                 CLEANUP=$CLEANUP
310               node-parameters: true
311               kill-phase-on: NEVER
312               abort-all-job: false
313       - multijob:
314           name: Promote ONAP (not activated)
315           condition: ALWAYS
316           projects:
317             - name: 'promote-onap-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
318               current-parameters: false
319               predefined-parameters: |
320                 DISTRO=$DISTRO
321                 DEPLOY_TYPE=$DEPLOY_TYPE
322                 INSTALLER_TYPE=$INSTALLER_TYPE
323                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
324                 ONAP_VERSION=$ONAP_VERSION
325                 ONAP_FLAVOR=$ONAP_FLAVOR
326                 ENGINE_VERSION=$ENGINE_VERSION
327                 ENGINE_REFSPEC=$ENGINE_REFSPEC
328                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
329                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
330                 XTESTING_REPO_URL=$XTESTING_REPO_URL
331                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
332                 CLEANUP=$CLEANUP
333               node-parameters: true
334               kill-phase-on: NEVER
335               abort-all-job: false
336       - multijob:
337           name: Delete Stack
338           condition: ALWAYS
339           projects:
340             - name: 'delete-stack-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
341               current-parameters: false
342               predefined-parameters: |
343                 DISTRO=$DISTRO
344                 DEPLOY_TYPE=$DEPLOY_TYPE
345                 INSTALLER_TYPE=$INSTALLER_TYPE
346                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
347                 ONAP_VERSION=$ONAP_VERSION
348                 ONAP_FLAVOR=$ONAP_FLAVOR
349                 ENGINE_VERSION=$ENGINE_VERSION
350                 ENGINE_REFSPEC=$ENGINE_REFSPEC
351                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
352                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
353                 XTESTING_REPO_URL=$XTESTING_REPO_URL
354                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
355                 CLEANUP=$CLEANUP
356               node-parameters: true
357               kill-phase-on: NEVER
358               abort-all-job: false
359
360 - job-template:
361     name: '{onap-other-phases}-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
362
363     disabled: false
364
365     concurrent: true
366
367     properties:
368       - logrotate
369
370     parameters:
371       - project-parameters:
372           project: '{project}'
373           branch: '{nordix-branch}'
374       - nordix-gerrit-parameters
375       - onap-parameter-macro
376       - string:
377           name: ONAP_VERSION
378           default: '{onap-version}'
379           description: 'ONAP version to deploy'
380
381     wrappers:
382       - credentials-binding:
383           - file:
384               credential-id: nordix-jenkins-openrcfile-city-frankfurt-defaultproject
385               variable: OPENRC_FILE
386       - mask-passwords
387       - build-timeout:
388           timeout: '{build-timeout}'
389       - fix-workspace-permissions
390
391     scm:
392       - git-scm:
393           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
394           branch: '{nordix-branch}'
395           refspec: ''
396           wipe_workspace: true
397           clean_before: false
398
399     builders:
400       - description-setter:
401           description: $INSTALLER_TYPE $DEPLOY_SCENARIO
402       - '{onap-other-phases}-macro'
403
404 - job-template:
405     name: '{onap-healthcheck-phases}-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
406
407     disabled: false
408
409     concurrent: true
410
411     properties:
412       - logrotate
413
414     parameters:
415       - project-parameters:
416           project: '{project}'
417           branch: '{nordix-branch}'
418       - nordix-gerrit-parameters
419       - onap-parameter-macro
420       - string:
421           name: ONAP_VERSION
422           default: '{onap-version}'
423           description: 'ONAP version to deploy'
424       - string:
425           name: ENGINE_VERSION
426           default: '{engine-version}'
427           description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying ONAP. Could be sha, branch'
428       - string:
429           name: ENGINE_REFSPEC
430           default: '{engine-refspec}'
431           description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying ONAP. Must be refspec.'
432       - string:
433           name: DEPLOY_SCENARIO_VERSION
434           default: '{deploy-scenario-version}'
435           description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying ONAP. Depends on DEPLOY_SCENARIO_REFSPEC and could be sha, branch.'
436       - string:
437           name: DEPLOY_SCENARIO_REFSPEC
438           default: '{deploy-scenario-refspec}'
439           description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying ONAP. Depends on DEPLOY_SCENARIO_VERSION and must be refspec.'
440
441     wrappers:
442       - credentials-binding:
443           - file:
444               credential-id: nordix-jenkins-openrcfile-city-frankfurt-defaultproject
445               variable: OPENRC_FILE
446       - mask-passwords
447       - build-timeout:
448           timeout: '{build-timeout}'
449       - fix-workspace-permissions
450
451     scm:
452       - git-scm:
453           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
454           branch: '{nordix-branch}'
455           refspec: ''
456           wipe_workspace: true
457           clean_before: false
458
459     builders:
460       - description-setter:
461           description: $INSTALLER_TYPE $DEPLOY_SCENARIO
462       - 'onap-healthcheck-macro'
463
464 # vim: set ts=2 sw=2 expandtab: