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