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