Fix onap-parameters macro
[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 verifying cloud-infra
23 # engine from the tip of the master branch periodically to check the stability of it.
24 #
25 # These jobs are set to run on slaves with label vpod-deploy-ubuntu1604.
26 # The slaves have
27 #   - Ubuntu1604 as the base distro
28 #   - nested virtualization
29 #   - internet access
30 #   - passwordless sudo
31 #   - 16 CPUs/32GB RAM/200 GB Disk
32 #   - docker, git vim curl wget zip unzip chrony apt-transport-https ca-certificates curl
33 #     gnupg-agent software-properties-common docker-ce docker-ce-cli containerd.io openjdk-8-jre
34 #
35 # The slaves should not have a cloud infra scenario deployed on them.
36 #--------------------------------------------------------------------------------------
37
38 - project:
39     name: 'cloud-infra-periodic-onap'
40
41     project: 'infra/engine'
42
43     onap-branch:
44       - 'dublin':
45           nordix-branch: master
46           onap-version: 4.0.0-ONAP
47           engine-version: master
48           engine-refspec: "refs/changes/71/1771/4"
49           deploy-scenario-version: "9a215b7935ab2b14cc7451ba15ea575e62e26da7"
50           deploy-scenario-refspec: "refs/changes/65/1765/12"
51           disabled: false
52       - 'master':
53           nordix-branch: master
54           onap-version: master
55           engine-version: master
56           engine-refspec: master
57           deploy-scenario-version: master
58           deploy-scenario-refspec: master
59           disabled: true
60
61     distro:
62       - ubuntu1804
63
64     deploy-scenario:
65       - onap-oom-nofeature
66
67     type:
68       - cloud:
69           provisioner-type: heat
70           installer-type: kubespray
71           slave-label: 'jumphost-onap-ubuntu1804'
72
73     onap-other-phases:
74       - onap-deploy:
75           build-timeout: 150
76       - oom-healthcheck:
77           build-timeout: 30
78           test-type: oom-healthcheck
79       - promote-onap:
80           build-timeout: 5
81       - delete-stack:
82           build-timeout: 5
83
84     onap-healthcheck-phases:
85       - onap-healthcheck-core:
86           build-timeout: 30
87           test-type: onap-healthcheck
88       - onap-healthcheck-small:
89           build-timeout: 30
90           test-type: onap-healthcheck
91       - onap-healthcheck-medium:
92           build-timeout: 30
93           test-type: onap-healthcheck
94       - onap-healthcheck-full:
95           build-timeout: 30
96           test-type: onap-healthcheck
97
98     jobs:
99       - '{deploy-scenario}-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
100       - '{onap-other-phases}-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
101       - '{onap-healthcheck-phases}-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
102
103 - job-template:
104     name: '{deploy-scenario}-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
105
106     project-type: multijob
107
108     disabled: '{obj:disabled}'
109
110     concurrent: true
111
112     parameters:
113       - onap-parameter-macro
114       - string:
115           name: ONAP_VERSION
116           default: '{onap-version}'
117           description: 'ONAP version to deploy'
118       - string:
119           name: ENGINE_VERSION
120           default: '{engine-version}'
121           description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying ONAP. Could be sha, branch'
122       - string:
123           name: ENGINE_REFSPEC
124           default: '{engine-refspec}'
125           description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying ONAP. Must be refspec.'
126       - string:
127           name: DEPLOY_SCENARIO_VERSION
128           default: '{deploy-scenario-version}'
129           description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying ONAP. Depends on DEPLOY_SCENARIO_REFSPEC and could be sha, branch.'
130       - string:
131           name: DEPLOY_SCENARIO_REFSPEC
132           default: '{deploy-scenario-refspec}'
133           description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying ONAP. Depends on DEPLOY_SCENARIO_VERSION and must be refspec.'
134
135     properties:
136       - logrotate
137       - build-blocker:
138           use-build-blocker: true
139           blocking-jobs:
140             - 'cloud-infra-periodic-engine-.*'
141             - 'onap-.*'
142             - 'k8-.*'
143           block-level: 'NODE'
144       - throttle:
145           max-per-node: 1
146           max-total: 3
147           option: project
148
149     wrappers:
150       - build-timeout:
151           timeout: 220
152       - fix-workspace-permissions
153
154     scm:
155       - git-scm:
156           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
157           branch: '{nordix-branch}'
158           refspec: ''
159           wipe_workspace: true
160           clean_before: false
161
162     builders:
163       - description-setter:
164           description: $INSTALLER_TYPE | $DEPLOY_SCENARIO
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       - multijob:
331           name: Delete Stack
332           condition: ALWAYS
333           projects:
334             - name: 'delete-stack-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
335               current-parameters: false
336               predefined-parameters: |
337                 DISTRO=$DISTRO
338                 DEPLOY_TYPE=$DEPLOY_TYPE
339                 INSTALLER_TYPE=$INSTALLER_TYPE
340                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
341                 ONAP_VERSION=$ONAP_VERSION
342                 ONAP_FLAVOR=$ONAP_FLAVOR
343                 ENGINE_VERSION=$ENGINE_VERSION
344                 ENGINE_REFSPEC=$ENGINE_REFSPEC
345                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
346                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
347                 XTESTING_REPO_URL=$XTESTING_REPO_URL
348                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
349                 CLEANUP=$CLEANUP
350               node-parameters: true
351               kill-phase-on: NEVER
352               abort-all-job: false
353
354 - job-template:
355     name: '{onap-other-phases}-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
356
357     disabled: false
358
359     concurrent: true
360
361     properties:
362       - logrotate
363
364     parameters:
365       - onap-parameter-macro
366       - string:
367           name: ONAP_VERSION
368           default: '{onap-version}'
369           description: 'ONAP version to deploy'
370
371     wrappers:
372       - credentials-binding:
373           - file:
374               credential-id: nordix-jenkins-openrcfile-city-frankfurt-defaultproject
375               variable: OPENRC_FILE
376       - mask-passwords
377       - build-timeout:
378           timeout: '{build-timeout}'
379       - fix-workspace-permissions
380
381     scm:
382       - git-scm:
383           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
384           branch: '{nordix-branch}'
385           refspec: ''
386           wipe_workspace: true
387           clean_before: false
388
389     builders:
390       - description-setter:
391           description: $INSTALLER_TYPE $DEPLOY_SCENARIO
392       - '{onap-other-phases}-macro'
393
394 - job-template:
395     name: '{onap-healthcheck-phases}-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
396
397     disabled: false
398
399     concurrent: true
400
401     properties:
402       - logrotate
403
404     parameters:
405       - onap-parameter-macro
406       - string:
407           name: ONAP_VERSION
408           default: '{onap-version}'
409           description: 'ONAP version to deploy'
410       - string:
411           name: ENGINE_VERSION
412           default: '{engine-version}'
413           description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying ONAP. Could be sha, branch'
414       - string:
415           name: ENGINE_REFSPEC
416           default: '{engine-refspec}'
417           description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying ONAP. Must be refspec.'
418       - string:
419           name: DEPLOY_SCENARIO_VERSION
420           default: '{deploy-scenario-version}'
421           description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying ONAP. Depends on DEPLOY_SCENARIO_REFSPEC and could be sha, branch.'
422       - string:
423           name: DEPLOY_SCENARIO_REFSPEC
424           default: '{deploy-scenario-refspec}'
425           description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying ONAP. Depends on DEPLOY_SCENARIO_VERSION and must be refspec.'
426
427     wrappers:
428       - credentials-binding:
429           - file:
430               credential-id: nordix-jenkins-openrcfile-city-frankfurt-defaultproject
431               variable: OPENRC_FILE
432       - mask-passwords
433       - build-timeout:
434           timeout: '{build-timeout}'
435       - fix-workspace-permissions
436
437     scm:
438       - git-scm:
439           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
440           branch: '{nordix-branch}'
441           refspec: ''
442           wipe_workspace: true
443           clean_before: false
444
445     builders:
446       - description-setter:
447           description: $INSTALLER_TYPE $DEPLOY_SCENARIO
448       - 'onap-healthcheck-macro'
449
450 # vim: set ts=2 sw=2 expandtab: