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