Update clean-stack postbuild step
[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-oom-nofeature
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       - multijob:
163           name: Deploy ONAP using OOM
164           condition: SUCCESSFUL
165           projects:
166             - name: 'onap-deploy-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
167               current-parameters: false
168               predefined-parameters: |
169                 DISTRO=$DISTRO
170                 DEPLOY_TYPE=$DEPLOY_TYPE
171                 PROVISIONER_TYPE=$PROVISIONER_TYPE
172                 INSTALLER_TYPE=$INSTALLER_TYPE
173                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
174                 ONAP_VERSION=$ONAP_VERSION
175                 ONAP_FLAVOR=$ONAP_FLAVOR
176                 ENGINE_VERSION=$ENGINE_VERSION
177                 ENGINE_REFSPEC=$ENGINE_REFSPEC
178                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
179                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
180                 XTESTING_REPO_URL=$XTESTING_REPO_URL
181                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
182                 CLEANUP=$CLEANUP
183               git-revision: true
184               node-parameters: true
185               kill-phase-on: FAILURE
186               abort-all-job: true
187       - multijob:
188           name: K8S and OOM Healthcheck using xtesting
189           condition: ALWAYS
190           projects:
191             - name: 'oom-healthcheck-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
192               current-parameters: false
193               predefined-parameters: |
194                 DISTRO=$DISTRO
195                 DEPLOY_TYPE=$DEPLOY_TYPE
196                 PROVISIONER_TYPE=$PROVISIONER_TYPE
197                 INSTALLER_TYPE=$INSTALLER_TYPE
198                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
199                 ONAP_VERSION=$ONAP_VERSION
200                 ONAP_FLAVOR=full
201                 TEST_TYPE=oom-healthcheck
202                 ENGINE_VERSION=$ENGINE_VERSION
203                 ENGINE_REFSPEC=$ENGINE_REFSPEC
204                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
205                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
206                 XTESTING_REPO_URL=$XTESTING_REPO_URL
207                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
208                 CLEANUP=$CLEANUP
209               node-parameters: true
210               kill-phase-on: NEVER
211               abort-all-job: false
212       - multijob:
213           name: ONAP Healthcheck using xtesting
214           condition: ALWAYS
215           projects:
216             - name: 'onap-healthcheck-core-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
217               current-parameters: false
218               predefined-parameters: |
219                 SLAVE_LABEL=$SLAVE_LABEL
220                 DISTRO=$DISTRO
221                 PROVISIONER_TYPE=$PROVISIONER_TYPE
222                 INSTALLER_TYPE=$INSTALLER_TYPE
223                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
224                 DEPLOY_TYPE=$DEPLOY_TYPE
225                 ONAP_VERSION=$ONAP_VERSION
226                 ONAP_FLAVOR=core
227                 TEST_TYPE=onap-healthcheck
228                 ENGINE_VERSION=$ENGINE_VERSION
229                 ENGINE_REFSPEC=$ENGINE_REFSPEC
230                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
231                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
232                 XTESTING_REPO_URL=$XTESTING_REPO_URL
233                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
234                 CLEANUP=$CLEANUP
235               node-parameters: true
236               kill-phase-on: NEVER
237               abort-all-job: false
238             - name: 'onap-healthcheck-small-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
239               current-parameters: false
240               predefined-parameters: |
241                 SLAVE_LABEL=$SLAVE_LABEL
242                 DISTRO=$DISTRO
243                 PROVISIONER_TYPE=$PROVISIONER_TYPE
244                 INSTALLER_TYPE=$INSTALLER_TYPE
245                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
246                 DEPLOY_TYPE=$DEPLOY_TYPE
247                 ONAP_VERSION=$ONAP_VERSION
248                 ONAP_FLAVOR=small
249                 TEST_TYPE=onap-healthcheck
250                 ENGINE_VERSION=$ENGINE_VERSION
251                 ENGINE_REFSPEC=$ENGINE_REFSPEC
252                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
253                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
254                 XTESTING_REPO_URL=$XTESTING_REPO_URL
255                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
256                 CLEANUP=$CLEANUP
257               node-parameters: true
258               kill-phase-on: NEVER
259               abort-all-job: false
260             - name: 'onap-healthcheck-medium-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
261               current-parameters: false
262               predefined-parameters: |
263                 SLAVE_LABEL=$SLAVE_LABEL
264                 DISTRO=$DISTRO
265                 PROVISIONER_TYPE=$PROVISIONER_TYPE
266                 INSTALLER_TYPE=$INSTALLER_TYPE
267                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
268                 DEPLOY_TYPE=$DEPLOY_TYPE
269                 ONAP_VERSION=$ONAP_VERSION
270                 ONAP_FLAVOR=medium
271                 TEST_TYPE=onap-healthcheck
272                 ENGINE_VERSION=$ENGINE_VERSION
273                 ENGINE_REFSPEC=$ENGINE_REFSPEC
274                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
275                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
276                 XTESTING_REPO_URL=$XTESTING_REPO_URL
277                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
278                 CLEANUP=$CLEANUP
279               node-parameters: true
280               kill-phase-on: NEVER
281               abort-all-job: false
282             - name: 'onap-healthcheck-full-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
283               current-parameters: false
284               predefined-parameters: |
285                 SLAVE_LABEL=$SLAVE_LABEL
286                 DISTRO=$DISTRO
287                 PROVISIONER_TYPE=$PROVISIONER_TYPE
288                 INSTALLER_TYPE=$INSTALLER_TYPE
289                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
290                 DEPLOY_TYPE=$DEPLOY_TYPE
291                 ONAP_VERSION=$ONAP_VERSION
292                 ONAP_FLAVOR=full
293                 TEST_TYPE=onap-healthcheck
294                 ENGINE_VERSION=$ENGINE_VERSION
295                 ENGINE_REFSPEC=$ENGINE_REFSPEC
296                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
297                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
298                 XTESTING_REPO_URL=$XTESTING_REPO_URL
299                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
300                 CLEANUP=$CLEANUP
301               node-parameters: true
302               kill-phase-on: NEVER
303               abort-all-job: false
304       - multijob:
305           name: Promote ONAP (not activated)
306           condition: ALWAYS
307           projects:
308             - name: 'promote-onap-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
309               current-parameters: false
310               predefined-parameters: |
311                 DISTRO=$DISTRO
312                 DEPLOY_TYPE=$DEPLOY_TYPE
313                 INSTALLER_TYPE=$INSTALLER_TYPE
314                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
315                 ONAP_VERSION=$ONAP_VERSION
316                 ONAP_FLAVOR=$ONAP_FLAVOR
317                 ENGINE_VERSION=$ENGINE_VERSION
318                 ENGINE_REFSPEC=$ENGINE_REFSPEC
319                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
320                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
321                 XTESTING_REPO_URL=$XTESTING_REPO_URL
322                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
323                 CLEANUP=$CLEANUP
324               node-parameters: true
325               kill-phase-on: NEVER
326               abort-all-job: false
327
328     publishers:
329       - postbuildscript:
330           builders:
331             - role: SLAVE
332               build-on:
333                 - SUCCESS
334                 - FAILURE
335                 - ABORTED
336                 - NOT_BUILT
337                 - UNSTABLE
338               build-steps:
339                 - shell:
340                     !include-raw-escape: ./wait-for-pkg-manager.sh
341                 - shell:
342                     !include-raw: ./delete-heat-stack.sh
343
344 - job-template:
345     name: '{onap-other-phases}-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
346
347     disabled: false
348
349     concurrent: true
350
351     properties:
352       - logrotate
353
354     parameters:
355       - project-parameters:
356           project: '{project}'
357           branch: '{nordix-branch}'
358       - nordix-gerrit-parameters
359       - onap-parameter-macro
360       - string:
361           name: ONAP_VERSION
362           default: '{onap-version}'
363           description: 'ONAP version to deploy'
364
365     wrappers:
366       - credentials-binding:
367           - file:
368               credential-id: nordix-jenkins-openrcfile-city-frankfurt-defaultproject
369               variable: OPENRC_FILE
370       - mask-passwords
371       - build-timeout:
372           timeout: '{build-timeout}'
373       - fix-workspace-permissions
374
375     scm:
376       - git-scm:
377           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
378           branch: '{nordix-branch}'
379           refspec: ''
380           wipe_workspace: true
381           clean_before: false
382
383     builders:
384       - description-setter:
385           description: $INSTALLER_TYPE $DEPLOY_SCENARIO
386       - '{onap-other-phases}-macro'
387
388 - job-template:
389     name: '{onap-healthcheck-phases}-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
390
391     disabled: false
392
393     concurrent: true
394
395     properties:
396       - logrotate
397
398     parameters:
399       - project-parameters:
400           project: '{project}'
401           branch: '{nordix-branch}'
402       - nordix-gerrit-parameters
403       - onap-parameter-macro
404       - string:
405           name: ONAP_VERSION
406           default: '{onap-version}'
407           description: 'ONAP version to deploy'
408       - string:
409           name: ENGINE_VERSION
410           default: '{engine-version}'
411           description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying ONAP. Could be sha, branch'
412       - string:
413           name: ENGINE_REFSPEC
414           default: '{engine-refspec}'
415           description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying ONAP. Must be refspec.'
416       - string:
417           name: DEPLOY_SCENARIO_VERSION
418           default: '{deploy-scenario-version}'
419           description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying ONAP. Depends on DEPLOY_SCENARIO_REFSPEC and could be sha, branch.'
420       - string:
421           name: DEPLOY_SCENARIO_REFSPEC
422           default: '{deploy-scenario-refspec}'
423           description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying ONAP. Depends on DEPLOY_SCENARIO_VERSION and must be refspec.'
424
425     wrappers:
426       - credentials-binding:
427           - file:
428               credential-id: nordix-jenkins-openrcfile-city-frankfurt-defaultproject
429               variable: OPENRC_FILE
430       - mask-passwords
431       - build-timeout:
432           timeout: '{build-timeout}'
433       - fix-workspace-permissions
434
435     scm:
436       - git-scm:
437           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
438           branch: '{nordix-branch}'
439           refspec: ''
440           wipe_workspace: true
441           clean_before: false
442
443     builders:
444       - description-setter:
445           description: $INSTALLER_TYPE $DEPLOY_SCENARIO
446       - 'onap-healthcheck-macro'
447
448 # vim: set ts=2 sw=2 expandtab: