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