22387dfdc86975b3538a7dfc645acef961320817
[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           onap-flavor: full
48           engine-version: master
49           engine-refspec: master
50           deploy-scenario-version: master
51           deploy-scenario-refspec: master
52           disabled: false
53       - 'master':
54           nordix-branch: master
55           onap-version: master
56           onap-flavor: full
57           engine-version: master
58           engine-refspec: master
59           deploy-scenario-version: master
60           deploy-scenario-refspec: master
61           disabled: true
62
63     distro:
64       - ubuntu1804
65
66     deploy-scenario:
67       - onap-oom-nofeature
68
69     type:
70       - cloud:
71           provisioner-type: heat
72           installer-type: kubespray
73           slave-label: 'jumphost-onap-ubuntu1804'
74
75     phase:
76       - onap-deploy:
77           build-timeout: 150
78           flavor:
79             - full
80       - oom-healthcheck:
81           build-timeout: 30
82           test-type: oom-healthcheck
83           flavor:
84             - full
85       - onap-healthcheck:
86           build-timeout: 30
87           test-type: onap-healthcheck
88           flavor:
89             - core
90             - small
91             - medium
92             - full
93       - promote-onap:
94           build-timeout: 5
95           flavor:
96             - full
97
98     jobs:
99       - '{deploy-scenario}-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
100       - 'xtesting-{phase}-{flavor}-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
101
102 - job-template:
103     name: '{deploy-scenario}-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
104
105     project-type: multijob
106
107     disabled: '{obj:disabled}'
108
109     concurrent: true
110
111     parameters:
112       - project-parameters:
113           project: '{project}'
114           branch: '{nordix-branch}'
115       - nordix-gerrit-parameters
116       - label:
117           name: SLAVE_LABEL
118           default: '{slave-label}'
119           description: 'Slave label to schedule this job on. All slaves have Ubuntu1604 no matter what distro target nodes use'
120       - string:
121           name: DISTRO
122           default: '{distro}'
123           description: 'Distribution to use for configuring target nodes (networking etc.)'
124       - string:
125           name: PROVISIONER_TYPE
126           default: '{provisioner-type}'
127           description: 'Provisioner to use for provisioning nodes'
128       - string:
129           name: INSTALLER_TYPE
130           default: '{installer-type}'
131           description: 'Installer to use for deploying the scenario'
132       - string:
133           name: DEPLOY_SCENARIO
134           default: '{deploy-scenario}'
135           description: 'Scenario to deploy and test'
136       - string:
137           name: HEAT_ENVIRONMENT_FILE
138           default: "file://$WORKSPACE/.cache/repos/swconfig/scenarios/$DEPLOY_SCENARIO/$INSTALLER_TYPE/role/$DEPLOY_SCENARIO/files/heat-environment-full.yaml"
139           description: 'Type of the deployment'
140       - string:
141           name: DEPLOY_TYPE
142           default: '{type}'
143           description: 'Type of the deployment'
144       - string:
145           name: ONAP_VERSION
146           default: '{onap-version}'
147           description: 'ONAP version to deploy'
148       - string:
149           name: ONAP_FLAVOR
150           default: '{onap-flavor}'
151           description: 'ONAP flavor to deploy - could be core, small, medium, full. Also used for xtesting as run_type.'
152       - string:
153           name: ENGINE_REPO_URL
154           default: 'https://gerrit.nordix.org/infra/engine.git'
155           description: 'URL to Nordix cloud-infra/engine repository'
156       - string:
157           name: ENGINE_VERSION
158           default: '{engine-version}'
159           description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying ONAP. Could be sha, branch'
160       - string:
161           name: ENGINE_REFSPEC
162           default: '{engine-refspec}'
163           description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying ONAP. Must be refspec.'
164       - string:
165           name: DEPLOY_SCENARIO_VERSION
166           default: '{deploy-scenario-version}'
167           description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying ONAP. Depends on DEPLOY_SCENARIO_REFSPEC and could be sha, branch.'
168       - string:
169           name: DEPLOY_SCENARIO_REFSPEC
170           default: '{deploy-scenario-refspec}'
171           description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying ONAP. Depends on DEPLOY_SCENARIO_VERSION and must be refspec.'
172       - string:
173           name: XTESTING_REPO_URL
174           default: 'https://gerrit.nordix.org/opnfv/xtesting-onap.git'
175           description: 'URL to Nordix xtesting-onap repository'
176       - string:
177           name: ENGINE_ANSIBLE_PARAMS
178           default: ''
179           description: 'Extra parameters that can be added when run the play books.'
180       - string:
181           name: CLEANUP
182           default: 'true'
183           description: 'Cleanup leftovers of the previous run'
184
185     properties:
186       - logrotate
187       - build-blocker:
188           use-build-blocker: true
189           blocking-jobs:
190             - 'cloud-infra-periodic-engine-.*'
191             - 'onap-.*'
192             - 'k8-.*'
193           block-level: 'NODE'
194       - throttle:
195           max-per-node: 1
196           max-total: 3
197           option: project
198
199     wrappers:
200       - build-timeout:
201           timeout: 220
202       - fix-workspace-permissions
203
204     scm:
205       - git-scm:
206           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
207           branch: '{nordix-branch}'
208           refspec: ''
209           wipe_workspace: true
210           clean_before: false
211
212     builders:
213       - description-setter:
214           description: $INSTALLER_TYPE | $DEPLOY_SCENARIO
215       - multijob:
216           name: Deploy ONAP
217           condition: SUCCESSFUL
218           projects:
219             - name: 'onap-deploy-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
220               current-parameters: false
221               predefined-parameters: |
222                 DISTRO=$DISTRO
223                 DEPLOY_TYPE=$DEPLOY_TYPE
224                 PROVISIIONER_TYPE=$PROVISIIONER_TYPE
225                 INSTALLER_TYPE=$INSTALLER_TYPE
226                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
227                 HEAT_ENVIRONMENT_FILE=$HEAT_ENVIRONMENT_FILE
228                 ONAP_VERSION=$ONAP_VERSION
229                 ONAP_FLAVOR=$ONAP_FLAVOR
230                 ENGINE_VERSION=$ENGINE_VERSION
231                 ENGINE_REFSPEC=$ENGINE_REFSPEC
232                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
233                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
234                 XTESTING_REPO_URL=$XTESTING_REPO_URL
235                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
236                 CLEANUP=$CLEANUP
237               git-revision: true
238               node-parameters: true
239               kill-phase-on: FAILURE
240               abort-all-job: true
241       - multijob:
242           name: OOM Healthcheck
243           condition: SUCCESSFUL
244           projects:
245             - name: 'xtesting-oom-healthcheck-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
246               current-parameters: false
247               predefined-parameters: |
248                 DISTRO=$DISTRO
249                 DEPLOY_TYPE=$DEPLOY_TYPE
250                 HEAT_ENVIRONMENT_FILE=$HEAT_ENVIRONMENT_FILE
251                 PROVISIIONER_TYPE=$PROVISIIONER_TYPE
252                 INSTALLER_TYPE=$INSTALLER_TYPE
253                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
254                 ONAP_VERSION=$ONAP_VERSION
255                 ONAP_FLAVOR=full
256                 TEST_TYPE=oom-healthcheck
257                 ENGINE_VERSION=$ENGINE_VERSION
258                 ENGINE_REFSPEC=$ENGINE_REFSPEC
259                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
260                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
261                 XTESTING_REPO_URL=$XTESTING_REPO_URL
262                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
263                 CLEANUP=$CLEANUP
264               node-parameters: true
265               kill-phase-on: NEVER
266               abort-all-job: false
267       - multijob:
268           name: ONAP Healthcheck - Core
269           condition: SUCCESSFUL
270           projects:
271             - name: 'xtesting-onap-healthcheck-core-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
272               current-parameters: false
273               predefined-parameters: |
274                 DISTRO=$DISTRO
275                 DEPLOY_TYPE=$DEPLOY_TYPE
276                 PROVISIIONER_TYPE=$PROVISIIONER_TYPE
277                 INSTALLER_TYPE=$INSTALLER_TYPE
278                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
279                 HEAT_ENVIRONMENT_FILE=$HEAT_ENVIRONMENT_FILE
280                 ONAP_VERSION=$ONAP_VERSION
281                 ONAP_FLAVOR=core
282                 TEST_TYPE=onap-healthcheck
283                 ENGINE_VERSION=$ENGINE_VERSION
284                 ENGINE_REFSPEC=$ENGINE_REFSPEC
285                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
286                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
287                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
288                 XTESTING_REPO_URL=$XTESTING_REPO_URL
289                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
290                 CLEANUP=$CLEANUP
291               node-parameters: true
292               kill-phase-on: NEVER
293               abort-all-job: false
294           name: ONAP Healthcheck - Small
295           condition: SUCCESSFUL
296           projects:
297             - name: 'xtesting-onap-healthcheck-small-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
298               current-parameters: false
299               predefined-parameters: |
300                 DISTRO=$DISTRO
301                 DEPLOY_TYPE=$DEPLOY_TYPE
302                 PROVISIIONER_TYPE=$PROVISIIONER_TYPE
303                 INSTALLER_TYPE=$INSTALLER_TYPE
304                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
305                 HEAT_ENVIRONMENT_FILE=$HEAT_ENVIRONMENT_FILE
306                 ONAP_VERSION=$ONAP_VERSION
307                 ONAP_FLAVOR=small
308                 TEST_TYPE=onap-healthcheck
309                 ENGINE_VERSION=$ENGINE_VERSION
310                 ENGINE_REFSPEC=$ENGINE_REFSPEC
311                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
312                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
313                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
314                 XTESTING_REPO_URL=$XTESTING_REPO_URL
315                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
316                 CLEANUP=$CLEANUP
317               node-parameters: true
318               kill-phase-on: NEVER
319               abort-all-job: false
320           name: ONAP Healthcheck - Medium
321           condition: SUCCESSFUL
322           projects:
323             - name: 'xtesting-onap-healthcheck-medium-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
324               current-parameters: false
325               predefined-parameters: |
326                 DISTRO=$DISTRO
327                 DEPLOY_TYPE=$DEPLOY_TYPE
328                 PROVISIIONER_TYPE=$PROVISIIONER_TYPE
329                 INSTALLER_TYPE=$INSTALLER_TYPE
330                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
331                 HEAT_ENVIRONMENT_FILE=$HEAT_ENVIRONMENT_FILE
332                 ONAP_VERSION=$ONAP_VERSION
333                 ONAP_FLAVOR=medium
334                 TEST_TYPE=onap-healthcheck
335                 ENGINE_VERSION=$ENGINE_VERSION
336                 ENGINE_REFSPEC=$ENGINE_REFSPEC
337                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
338                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
339                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
340                 XTESTING_REPO_URL=$XTESTING_REPO_URL
341                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
342                 CLEANUP=$CLEANUP
343               node-parameters: true
344               kill-phase-on: NEVER
345               abort-all-job: false
346           name: ONAP Healthcheck - Full
347           condition: SUCCESSFUL
348           projects:
349             - name: 'onap-healthcheck-periodic-full-{distro}-{installer-type}-{type}-{onap-branch}'
350               current-parameters: false
351               predefined-parameters: |
352                 DISTRO=$DISTRO
353                 DEPLOY_TYPE=$DEPLOY_TYPE
354                 PROVISIIONER_TYPE=$PROVISIIONER_TYPE
355                 INSTALLER_TYPE=$INSTALLER_TYPE
356                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
357                 HEAT_ENVIRONMENT_FILE=$HEAT_ENVIRONMENT_FILE
358                 ONAP_VERSION=$ONAP_VERSION
359                 ONAP_FLAVOR=full
360                 TEST_TYPE=onap-healthcheck
361                 ENGINE_VERSION=$ENGINE_VERSION
362                 ENGINE_REFSPEC=$ENGINE_REFSPEC
363                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
364                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
365                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
366                 XTESTING_REPO_URL=$XTESTING_REPO_URL
367                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
368                 CLEANUP=$CLEANUP
369               node-parameters: true
370               kill-phase-on: NEVER
371               abort-all-job: false
372       - multijob:
373           name: Promote ONAP
374           condition: SUCCESSFUL
375           projects:
376             - name: 'promote-onap-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
377               current-parameters: false
378               predefined-parameters: |
379                 DISTRO=$DISTRO
380                 DEPLOY_TYPE=$DEPLOY_TYPE
381                 HEAT_ENVIRONMENT_FILE=$HEAT_ENVIRONMENT_FILE
382                 INSTALLER_TYPE=$INSTALLER_TYPE
383                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
384                 ONAP_VERSION=$ONAP_VERSION
385                 ONAP_FLAVOR=$ONAP_FLAVOR
386                 ENGINE_VERSION=$ENGINE_VERSION
387                 ENGINE_REFSPEC=$ENGINE_REFSPEC
388                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
389                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
390                 XTESTING_REPO_URL=$XTESTING_REPO_URL
391                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
392                 CLEANUP=$CLEANUP
393               node-parameters: true
394               kill-phase-on: NEVER
395               abort-all-job: false
396
397 - job-template:
398     name: 'xtesting-{phase}-{flavor}-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
399
400     disabled: false
401
402     concurrent: true
403
404     properties:
405       - logrotate
406
407     parameters:
408       - project-parameters:
409           project: '{project}'
410           branch: '{nordix-branch}'
411       - nordix-gerrit-parameters
412       - label:
413           name: SLAVE_LABEL
414           default: 'jumphost-onap-ubuntu1804'
415           description: 'Slave label to schedule this job on. All slaves have Ubuntu1604 no matter what distro target nodes use'
416       - string:
417           name: DISTRO
418           default: 'ubuntu1804'
419           description: 'Distribution to use for configuring target nodes (networking etc.). Overriden by upstream job.'
420       - string:
421           name: PROVISIONER_TYPE
422           default: 'heat'
423           description: 'Provisioner to use for provisioning nodes'
424       - string:
425           name: INSTALLER_TYPE
426           default: 'kubespray'
427           description: 'Installer to use for deploying the scenario'
428       - string:
429           name: DEPLOY_SCENARIO
430           default: 'onap-oom-nofeature'
431           description: 'Scenario to deploy and test'
432       - string:
433           name: HEAT_ENVIRONMENT_FILE
434           default: "file://$WORKSPACE/.cache/repos/swconfig/scenarios/$DEPLOY_SCENARIO/$INSTALLER_TYPE/role/$DEPLOY_SCENARIO/files/heat-environment-full.yaml"
435           description: 'Type of the deployment'
436       - string:
437           name: DEPLOY_TYPE
438           default: 'cloud'
439           description: 'Type of the deployment. Overriden by upstream job.'
440       - string:
441           name: ONAP_VERSION
442           default: 'master'
443           description: 'ONAP version to deploy'
444       - string:
445           name: ONAP_FLAVOR
446           default: '{flavor}'
447           description: 'ONAP flavor to deploy - could be core, small, medium, full. Also used for xtesting as run_type.'
448       - string:
449           name: TEST_TYPE
450           default: 'oom-healthcheck'
451           description: 'Test type to run. Could be oom-healthcheck or onap-healthcheck'
452       - string:
453           name: ENGINE_VERSION
454           default: 'master'
455           description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying ONAP. Could be sha, branch'
456       - string:
457           name: ENGINE_REFSPEC
458           default: 'master'
459           description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying ONAP. Must be refspec.'
460       - string:
461           name: DEPLOY_SCENARIO_VERSION
462           default: 'master'
463           description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying ONAP. Depends on DEPLOY_SCENARIO_REFSPEC and could be sha, branch.'
464       - string:
465           name: DEPLOY_SCENARIO_REFSPEC
466           default: 'master'
467           description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying ONAP. Depends on DEPLOY_SCENARIO_VERSION and must be refspec.'
468       - string:
469           name: XTESTING_REPO_URL
470           default: 'https://gerrit.nordix.org/opnfv/xtesting-onap.git'
471           description: 'URL to Nordix xtesting-onap repository'
472       - string:
473           name: ENGINE_ANSIBLE_PARAMS
474           default: ''
475           description: 'Extra parameters that can be added when run the play books.'
476       - string:
477           name: CLEANUP
478           default: 'true'
479
480     wrappers:
481       - credentials-binding:
482           - file:
483               credential-id: nordix-jenkins-openrcfile-city-frankfurt-defaultproject
484               variable: OPENRC_FILE
485       - mask-passwords
486       - build-timeout:
487           timeout: '{build-timeout}'
488       - fix-workspace-permissions
489
490     scm:
491       - git-scm:
492           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
493           branch: '{nordix-branch}'
494           refspec: ''
495           wipe_workspace: true
496           clean_before: false
497
498     builders:
499       - description-setter:
500           description: $INSTALLER_TYPE - $DEPLOY_SCENARIO
501       - '{phase}-macro'
502
503 # vim: set ts=2 sw=2 expandtab: