Merge "ci: Synchronize Nordix repositories regularly with upstream"
[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 deploying and testing
23 # ONAP scenario onap-nofeature-noha.
24 #--------------------------------------------------------------------------------------
25
26 - project:
27     name: 'cloud-infra-periodic-onap'
28
29     project: 'infra/engine'
30
31     onap-branch:
32       - 'dublin':
33           nordix-branch: master
34           onap-version: dublin
35           onap-flavor: full
36           engine-version: master
37           engine-refspec: master
38           deploy-scenario-version: master
39           deploy-scenario-refspec: master
40           disabled: false
41           delete-stack: 'yes'
42       - 'master':
43           nordix-branch: master
44           onap-version: master
45           onap-flavor: full
46           engine-version: master
47           engine-refspec: master
48           deploy-scenario-version: master
49           deploy-scenario-refspec: master
50           disabled: false
51           delete-stack: 'no'
52
53     distro:
54       - ubuntu1804
55
56     deploy-scenario:
57       - onap-nofeature-noha
58
59     ci-loop:
60       - daily
61
62     type:
63       - cloud:
64           pod-name: est-cloud
65           provisioner-type: heat
66           installer-type: kubespray
67           slave-label: 'jumphost-onap-ubuntu1804'
68
69     onap-other-phases:
70       - onap-deploy:
71           build-timeout: 210
72       - oom-healthcheck:
73           build-timeout: 30
74           test-type: oom-healthcheck
75       - promote-onap:
76           build-timeout: 5
77
78     onap-healthcheck-phases:
79       - onap-hc-core:
80           build-timeout: 30
81           test-type: onap-healthcheck
82       - onap-hc-small:
83           build-timeout: 30
84           test-type: onap-healthcheck
85       - onap-hc-medium:
86           build-timeout: 30
87           test-type: onap-healthcheck
88       - onap-hc-full:
89           build-timeout: 30
90           test-type: onap-healthcheck
91       - onap-hc-healthdist:
92           build-timeout: 30
93           test-type: onap-healthcheck
94
95     jobs:
96       - '{deploy-scenario}-{onap-flavor}-{distro}-{installer-type}-{type}-{ci-loop}-{onap-branch}'
97       - '{onap-other-phases}-{distro}-{installer-type}-{type}-{ci-loop}-{onap-branch}'
98       - '{onap-healthcheck-phases}-{distro}-{installer-type}-{type}-{ci-loop}-{onap-branch}'
99
100 - job-template:
101     name: '{deploy-scenario}-{onap-flavor}-{distro}-{installer-type}-{type}-{ci-loop}-{onap-branch}'
102
103     project-type: multijob
104
105     disabled: '{obj:disabled}'
106
107     concurrent: true
108
109     parameters:
110       - project-parameters:
111           project: '{project}'
112           branch: '{nordix-branch}'
113       - nordix-gerrit-parameters
114       - onap-parameter-macro
115       - string:
116           name: ONAP_VERSION
117           default: '{onap-version}'
118           description: 'ONAP version to deploy'
119       - string:
120           name: ONAP_FLAVOR
121           default: '{onap-flavor}'
122           description: 'ONAP flavor to deploy - could be core, small, medium, full. Also used for xtesting as run_type.'
123       - string:
124           name: STACK_NAME
125           default: 'nordix-cicd-{deploy-scenario}-{onap-branch}-{onap-flavor}'
126       - string:
127           name: ENGINE_VERSION
128           default: '{engine-version}'
129           description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying ONAP. Could be sha, branch'
130       - string:
131           name: ENGINE_REFSPEC
132           default: '{engine-refspec}'
133           description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying ONAP. Must be refspec.'
134       - string:
135           name: DEPLOY_SCENARIO_VERSION
136           default: '{deploy-scenario-version}'
137           description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying ONAP. Depends on DEPLOY_SCENARIO_REFSPEC and could be sha, branch.'
138       - string:
139           name: DEPLOY_SCENARIO_REFSPEC
140           default: '{deploy-scenario-refspec}'
141           description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying ONAP. Depends on DEPLOY_SCENARIO_VERSION and must be refspec.'
142       - string:
143           name: POD_NAME
144           default: '{pod-name}'
145           description: 'Development purposes only! Set to none for disabling test results DB reporting.'
146       - string:
147           name: DELETE_STACK
148           default: '{delete-stack}'
149           description: 'Development purposes only! Whether delete the stack or not. It must either be yes or no. Setting this to no will increase the cost!'
150
151     properties:
152       - logrotate
153       - build-blocker:
154           use-build-blocker: true
155           blocking-jobs:
156             - 'cloud-infra-periodic-engine-.*'
157             - 'onap-.*'
158             - 'k8-.*'
159           block-level: 'NODE'
160       - throttle:
161           max-per-node: 1
162           max-total: 3
163           option: project
164
165     wrappers:
166       - credentials-binding:
167           - file:
168               credential-id: est-jenkins-openrcfile-city-karlskrona-onap
169               variable: OPENRC_FILE
170       - mask-passwords
171       - build-timeout:
172           timeout: 300
173       - fix-workspace-permissions
174       - openstack:
175           single-use: True
176
177     triggers:
178       - timed: '@midnight'
179
180     scm:
181       - git-scm:
182           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
183           branch: '{nordix-branch}'
184           refspec: ''
185           wipe_workspace: true
186           clean_before: false
187
188     builders:
189       - description-setter:
190           description: $DEPLOY_SCENARIO | $ONAP_FLAVOR
191       - shell: |
192           #!/bin/bash
193           cp $OPENRC_FILE /tmp/openrc
194       - multijob:
195           name: Deploy ONAP using OOM
196           condition: ALWAYS
197           projects:
198             - name: 'onap-deploy-{distro}-{installer-type}-{type}-{ci-loop}-{onap-branch}'
199               current-parameters: false
200               predefined-parameters: |
201                 DISTRO=$DISTRO
202                 DEPLOY_TYPE=$DEPLOY_TYPE
203                 PROVISIONER_TYPE=$PROVISIONER_TYPE
204                 INSTALLER_TYPE=$INSTALLER_TYPE
205                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
206                 ONAP_VERSION=$ONAP_VERSION
207                 ONAP_FLAVOR=$ONAP_FLAVOR
208                 POD_NAME=$POD_NAME
209                 STACK_NAME=$STACK_NAME
210                 ENGINE_VERSION=$ENGINE_VERSION
211                 ENGINE_REFSPEC=$ENGINE_REFSPEC
212                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
213                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
214                 XTESTING_REPO_URL=$XTESTING_REPO_URL
215                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
216                 CLEANUP=$CLEANUP
217               git-revision: true
218               node-parameters: true
219               kill-phase-on: NEVER
220               abort-all-job: false
221       - multijob:
222           name: K8S and OOM Healthcheck using xtesting
223           condition: ALWAYS
224           projects:
225             - name: 'oom-hc-{distro}-{installer-type}-{type}-{ci-loop}-{onap-branch}'
226               current-parameters: false
227               predefined-parameters: |
228                 DISTRO=$DISTRO
229                 DEPLOY_TYPE=$DEPLOY_TYPE
230                 PROVISIONER_TYPE=$PROVISIONER_TYPE
231                 INSTALLER_TYPE=$INSTALLER_TYPE
232                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
233                 ONAP_VERSION=$ONAP_VERSION
234                 ONAP_FLAVOR=full
235                 TEST_TYPE=oom-healthcheck
236                 POD_NAME=$POD_NAME
237                 STACK_NAME=$STACK_NAME
238                 ENGINE_VERSION=$ENGINE_VERSION
239                 ENGINE_REFSPEC=$ENGINE_REFSPEC
240                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
241                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
242                 XTESTING_REPO_URL=$XTESTING_REPO_URL
243                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
244                 CLEANUP=$CLEANUP
245               node-parameters: true
246               kill-phase-on: NEVER
247               abort-all-job: false
248       - multijob:
249           name: ONAP Healthcheck using xtesting
250           execution-type: SEQUENTIALLY
251           condition: ALWAYS
252           projects:
253             - name: 'onap-hc-core-{distro}-{installer-type}-{type}-{ci-loop}-{onap-branch}'
254               current-parameters: false
255               predefined-parameters: |
256                 SLAVE_LABEL=$SLAVE_LABEL
257                 DISTRO=$DISTRO
258                 PROVISIONER_TYPE=$PROVISIONER_TYPE
259                 INSTALLER_TYPE=$INSTALLER_TYPE
260                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
261                 DEPLOY_TYPE=$DEPLOY_TYPE
262                 ONAP_VERSION=$ONAP_VERSION
263                 ONAP_FLAVOR=core
264                 TEST_TYPE=onap-healthcheck
265                 POD_NAME=$POD_NAME
266                 STACK_NAME=$STACK_NAME
267                 ENGINE_VERSION=$ENGINE_VERSION
268                 ENGINE_REFSPEC=$ENGINE_REFSPEC
269                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
270                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
271                 XTESTING_REPO_URL=$XTESTING_REPO_URL
272                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
273                 CLEANUP=$CLEANUP
274               node-parameters: true
275               kill-phase-on: NEVER
276               abort-all-job: false
277             - name: 'onap-hc-small-{distro}-{installer-type}-{type}-{ci-loop}-{onap-branch}'
278               current-parameters: false
279               predefined-parameters: |
280                 SLAVE_LABEL=$SLAVE_LABEL
281                 DISTRO=$DISTRO
282                 PROVISIONER_TYPE=$PROVISIONER_TYPE
283                 INSTALLER_TYPE=$INSTALLER_TYPE
284                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
285                 DEPLOY_TYPE=$DEPLOY_TYPE
286                 ONAP_VERSION=$ONAP_VERSION
287                 ONAP_FLAVOR=small
288                 TEST_TYPE=onap-healthcheck
289                 POD_NAME=$POD_NAME
290                 STACK_NAME=$STACK_NAME
291                 ENGINE_VERSION=$ENGINE_VERSION
292                 ENGINE_REFSPEC=$ENGINE_REFSPEC
293                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
294                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
295                 XTESTING_REPO_URL=$XTESTING_REPO_URL
296                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
297                 CLEANUP=$CLEANUP
298               node-parameters: true
299               kill-phase-on: NEVER
300               abort-all-job: false
301             - name: 'onap-hc-medium-{distro}-{installer-type}-{type}-{ci-loop}-{onap-branch}'
302               current-parameters: false
303               predefined-parameters: |
304                 SLAVE_LABEL=$SLAVE_LABEL
305                 DISTRO=$DISTRO
306                 PROVISIONER_TYPE=$PROVISIONER_TYPE
307                 INSTALLER_TYPE=$INSTALLER_TYPE
308                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
309                 DEPLOY_TYPE=$DEPLOY_TYPE
310                 ONAP_VERSION=$ONAP_VERSION
311                 ONAP_FLAVOR=medium
312                 TEST_TYPE=onap-healthcheck
313                 POD_NAME=$POD_NAME
314                 STACK_NAME=$STACK_NAME
315                 ENGINE_VERSION=$ENGINE_VERSION
316                 ENGINE_REFSPEC=$ENGINE_REFSPEC
317                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
318                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
319                 XTESTING_REPO_URL=$XTESTING_REPO_URL
320                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
321                 CLEANUP=$CLEANUP
322               node-parameters: true
323               kill-phase-on: NEVER
324               abort-all-job: false
325             - name: 'onap-hc-full-{distro}-{installer-type}-{type}-{ci-loop}-{onap-branch}'
326               current-parameters: false
327               predefined-parameters: |
328                 SLAVE_LABEL=$SLAVE_LABEL
329                 DISTRO=$DISTRO
330                 PROVISIONER_TYPE=$PROVISIONER_TYPE
331                 INSTALLER_TYPE=$INSTALLER_TYPE
332                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
333                 DEPLOY_TYPE=$DEPLOY_TYPE
334                 ONAP_VERSION=$ONAP_VERSION
335                 ONAP_FLAVOR=full
336                 TEST_TYPE=onap-healthcheck
337                 POD_NAME=$POD_NAME
338                 STACK_NAME=$STACK_NAME
339                 ENGINE_VERSION=$ENGINE_VERSION
340                 ENGINE_REFSPEC=$ENGINE_REFSPEC
341                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
342                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
343                 XTESTING_REPO_URL=$XTESTING_REPO_URL
344                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
345                 CLEANUP=$CLEANUP
346               node-parameters: true
347               kill-phase-on: NEVER
348               abort-all-job: false
349             - name: 'onap-hc-healthdist-{distro}-{installer-type}-{type}-{ci-loop}-{onap-branch}'
350               current-parameters: false
351               predefined-parameters: |
352                 SLAVE_LABEL=$SLAVE_LABEL
353                 DISTRO=$DISTRO
354                 PROVISIONER_TYPE=$PROVISIONER_TYPE
355                 INSTALLER_TYPE=$INSTALLER_TYPE
356                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
357                 DEPLOY_TYPE=$DEPLOY_TYPE
358                 ONAP_VERSION=$ONAP_VERSION
359                 ONAP_FLAVOR=healthdist
360                 TEST_TYPE=onap-healthcheck
361                 POD_NAME=$POD_NAME
362                 STACK_NAME=$STACK_NAME
363                 ENGINE_VERSION=$ENGINE_VERSION
364                 ENGINE_REFSPEC=$ENGINE_REFSPEC
365                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
366                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
367                 XTESTING_REPO_URL=$XTESTING_REPO_URL
368                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
369                 CLEANUP=$CLEANUP
370               node-parameters: true
371               kill-phase-on: NEVER
372               abort-all-job: false
373       - multijob:
374           name: Promote ONAP (not activated)
375           condition: ALWAYS
376           projects:
377             - name: 'promote-onap-{distro}-{installer-type}-{type}-{ci-loop}-{onap-branch}'
378               current-parameters: false
379               predefined-parameters: |
380                 DISTRO=$DISTRO
381                 DEPLOY_TYPE=$DEPLOY_TYPE
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                 POD_NAME=$POD_NAME
389                 STACK_NAME=$STACK_NAME
390                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
391                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
392                 XTESTING_REPO_URL=$XTESTING_REPO_URL
393                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
394                 CLEANUP=$CLEANUP
395               node-parameters: true
396               kill-phase-on: NEVER
397               abort-all-job: false
398
399     publishers:
400       - postbuildscript:
401           builders:
402             - role: SLAVE
403               build-on:
404                 - SUCCESS
405                 - FAILURE
406                 - ABORTED
407                 - NOT_BUILT
408                 - UNSTABLE
409               build-steps:
410                 - shell:
411                     !include-raw-escape: ./wait-for-pkg-manager.sh
412                 - shell:
413                     !include-raw: ./delete-heat-stack.sh
414
415 - job-template:
416     name: '{onap-other-phases}-{distro}-{installer-type}-{type}-{ci-loop}-{onap-branch}'
417
418     disabled: false
419
420     concurrent: true
421
422     properties:
423       - logrotate
424
425     parameters:
426       - project-parameters:
427           project: '{project}'
428           branch: '{nordix-branch}'
429       - nordix-gerrit-parameters
430       - onap-parameter-macro
431       - string:
432           name: ONAP_FLAVOR
433           default: '{onap-flavor}'
434           description: 'ONAP flavor to deploy - could be core, small, medium, full. Also used for xtesting as run_type.'
435       - string:
436           name: ONAP_VERSION
437           default: '{onap-version}'
438           description: 'ONAP version to deploy'
439
440     wrappers:
441       - credentials-binding:
442           - file:
443               credential-id: est-jenkins-openrcfile-city-karlskrona-onap
444               variable: OPENRC_FILE
445       - mask-passwords
446       - build-timeout:
447           timeout: '{build-timeout}'
448       - fix-workspace-permissions
449
450     scm:
451       - git-scm:
452           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
453           branch: '{nordix-branch}'
454           refspec: ''
455           wipe_workspace: true
456           clean_before: false
457
458     builders:
459       - description-setter:
460           description: $DEPLOY_SCENARIO | $ONAP_FLAVOR
461       - '{onap-other-phases}-macro'
462
463 - job-template:
464     name: '{onap-healthcheck-phases}-{distro}-{installer-type}-{type}-{ci-loop}-{onap-branch}'
465
466     disabled: false
467
468     concurrent: true
469
470     properties:
471       - logrotate
472
473     parameters:
474       - project-parameters:
475           project: '{project}'
476           branch: '{nordix-branch}'
477       - nordix-gerrit-parameters
478       - onap-parameter-macro
479       - string:
480           name: ONAP_VERSION
481           default: '{onap-version}'
482           description: 'ONAP version to deploy'
483       - string:
484           name: ENGINE_VERSION
485           default: '{engine-version}'
486           description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying ONAP. Could be sha, branch'
487       - string:
488           name: ENGINE_REFSPEC
489           default: '{engine-refspec}'
490           description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying ONAP. Must be refspec.'
491       - string:
492           name: DEPLOY_SCENARIO_VERSION
493           default: '{deploy-scenario-version}'
494           description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying ONAP. Depends on DEPLOY_SCENARIO_REFSPEC and could be sha, branch.'
495       - string:
496           name: DEPLOY_SCENARIO_REFSPEC
497           default: '{deploy-scenario-refspec}'
498           description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying ONAP. Depends on DEPLOY_SCENARIO_VERSION and must be refspec.'
499       - string:
500           name: POD_NAME
501           default: '{pod-name}'
502           description: 'Development purposes only! Set to none for disabling test results DB reporting.'
503
504     wrappers:
505       - credentials-binding:
506           - file:
507               credential-id: est-jenkins-openrcfile-city-karlskrona-onap
508               variable: OPENRC_FILE
509       - mask-passwords
510       - build-timeout:
511           timeout: '{build-timeout}'
512       - fix-workspace-permissions
513
514     scm:
515       - git-scm:
516           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
517           branch: '{nordix-branch}'
518           refspec: ''
519           wipe_workspace: true
520           clean_before: false
521
522     builders:
523       - description-setter:
524           description: $DEPLOY_SCENARIO | $ONAP_FLAVOR
525       - 'onap-healthcheck-macro'
526
527 # vim: set ts=2 sw=2 expandtab: