Pin engine and scenario versions to patch versions
[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           onap-flavor: full
48           engine-version: master
49           engine-refspec: "refs/changes/71/1771/4"
50           deploy-scenario-version: "9a215b7935ab2b14cc7451ba15ea575e62e26da7"
51           deploy-scenario-refspec: "refs/changes/65/1765/12"
52           disabled: false
53       - 'master':
54           nordix-branch: master
55           onap-version: master
56           onap-flavor: full
57           engine-version: master
58           engine-refspec: master
59           deploy-scenario-version: master
60           deploy-scenario-refspec: master
61           disabled: true
62
63     distro:
64       - ubuntu1804
65
66     deploy-scenario:
67       - onap-oom-nofeature
68
69     type:
70       - cloud:
71           provisioner-type: heat
72           installer-type: kubespray
73           slave-label: 'jumphost-onap-ubuntu1804'
74
75     phase:
76       - onap-deploy:
77           build-timeout: 150
78       - oom-healthcheck:
79           build-timeout: 30
80           test-type: oom-healthcheck
81       - onap-healthcheck:
82           build-timeout: 30
83           test-type: onap-healthcheck
84       - promote-onap:
85           build-timeout: 5
86
87     jobs:
88       - '{deploy-scenario}-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
89       - '{phase}-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
90
91 - job-template:
92     name: '{deploy-scenario}-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
93
94     project-type: multijob
95
96     disabled: '{obj:disabled}'
97
98     concurrent: true
99
100     parameters:
101       - project-parameters:
102           project: '{project}'
103           branch: '{nordix-branch}'
104       - nordix-gerrit-parameters
105       - label:
106           name: SLAVE_LABEL
107           default: '{slave-label}'
108           description: 'Slave label to schedule this job on. All slaves have Ubuntu1604 no matter what distro target nodes use'
109       - string:
110           name: DISTRO
111           default: '{distro}'
112           description: 'Distribution to use for configuring target nodes (networking etc.)'
113       - string:
114           name: PROVISIONER_TYPE
115           default: '{provisioner-type}'
116           description: 'Provisioner to use for provisioning nodes'
117       - string:
118           name: INSTALLER_TYPE
119           default: '{installer-type}'
120           description: 'Installer to use for deploying the scenario'
121       - string:
122           name: DEPLOY_SCENARIO
123           default: '{deploy-scenario}'
124           description: 'Scenario to deploy and test'
125       - string:
126           name: DEPLOY_TYPE
127           default: '{type}'
128           description: 'Type of the deployment'
129       - string:
130           name: ONAP_VERSION
131           default: '{onap-version}'
132           description: 'ONAP version to deploy'
133       - string:
134           name: ONAP_FLAVOR
135           default: '{onap-flavor}'
136           description: 'ONAP flavor to deploy - could be core, small, medium, full. Also used for xtesting as run_type.'
137       - string:
138           name: ENGINE_REPO_URL
139           default: 'https://gerrit.nordix.org/infra/engine.git'
140           description: 'URL to Nordix cloud-infra/engine repository'
141       - string:
142           name: ENGINE_VERSION
143           default: '{engine-version}'
144           description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying ONAP. Could be sha, branch'
145       - string:
146           name: ENGINE_REFSPEC
147           default: '{engine-refspec}'
148           description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying ONAP. Must be refspec.'
149       - string:
150           name: DEPLOY_SCENARIO_VERSION
151           default: '{deploy-scenario-version}'
152           description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying ONAP. Depends on DEPLOY_SCENARIO_REFSPEC and could be sha, branch.'
153       - string:
154           name: DEPLOY_SCENARIO_REFSPEC
155           default: '{deploy-scenario-refspec}'
156           description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying ONAP. Depends on DEPLOY_SCENARIO_VERSION and must be refspec.'
157       - string:
158           name: XTESTING_REPO_URL
159           default: 'https://gerrit.nordix.org/opnfv/xtesting-onap.git'
160           description: 'URL to Nordix xtesting-onap repository'
161       - string:
162           name: ENGINE_ANSIBLE_PARAMS
163           default: ''
164           description: 'Extra parameters that can be added when run the play books.'
165       - string:
166           name: CLEANUP
167           default: 'true'
168           description: 'Cleanup leftovers of the previous run'
169
170     properties:
171       - logrotate
172       - build-blocker:
173           use-build-blocker: true
174           blocking-jobs:
175             - 'cloud-infra-periodic-engine-.*'
176             - 'onap-.*'
177             - 'k8-.*'
178           block-level: 'NODE'
179       - throttle:
180           max-per-node: 1
181           max-total: 3
182           option: project
183
184     wrappers:
185       - build-timeout:
186           timeout: 220
187       - fix-workspace-permissions
188
189     scm:
190       - git-scm:
191           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
192           branch: '{nordix-branch}'
193           refspec: ''
194           wipe_workspace: true
195           clean_before: false
196
197     builders:
198       - description-setter:
199           description: $INSTALLER_TYPE | $DEPLOY_SCENARIO
200       - multijob:
201           name: Deploy ONAP
202           condition: SUCCESSFUL
203           projects:
204             - name: 'onap-deploy-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
205               current-parameters: false
206               predefined-parameters: |
207                 DISTRO=$DISTRO
208                 DEPLOY_TYPE=$DEPLOY_TYPE
209                 PROVISIONER_TYPE=$PROVISIONER_TYPE
210                 INSTALLER_TYPE=$INSTALLER_TYPE
211                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
212                 ONAP_VERSION=$ONAP_VERSION
213                 ONAP_FLAVOR=$ONAP_FLAVOR
214                 ENGINE_VERSION=$ENGINE_VERSION
215                 ENGINE_REFSPEC=$ENGINE_REFSPEC
216                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
217                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
218                 XTESTING_REPO_URL=$XTESTING_REPO_URL
219                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
220                 CLEANUP=$CLEANUP
221               git-revision: true
222               node-parameters: true
223               kill-phase-on: FAILURE
224               abort-all-job: true
225       - multijob:
226           name: OOM Healthcheck xtesting
227           condition: ALWAYS
228           projects:
229             - name: 'oom-healthcheck-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
230               current-parameters: false
231               predefined-parameters: |
232                 DISTRO=$DISTRO
233                 DEPLOY_TYPE=$DEPLOY_TYPE
234                 PROVISIONER_TYPE=$PROVISIONER_TYPE
235                 INSTALLER_TYPE=$INSTALLER_TYPE
236                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
237                 ONAP_VERSION=$ONAP_VERSION
238                 ONAP_FLAVOR=full
239                 TEST_TYPE=oom-healthcheck
240                 ENGINE_VERSION=$ENGINE_VERSION
241                 ENGINE_REFSPEC=$ENGINE_REFSPEC
242                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
243                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
244                 XTESTING_REPO_URL=$XTESTING_REPO_URL
245                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
246                 CLEANUP=$CLEANUP
247               node-parameters: true
248               kill-phase-on: NEVER
249               abort-all-job: false
250       - multijob:
251           name: ONAP Healthcheck xtesting
252           condition: ALWAYS
253           projects:
254             - name: 'onap-healthcheck-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
255               current-parameters: false
256               predefined-parameters: |
257                 DISTRO=$DISTRO
258                 DEPLOY_TYPE=$DEPLOY_TYPE
259                 PROVISIONER_TYPE=$PROVISIONER_TYPE
260                 INSTALLER_TYPE=$INSTALLER_TYPE
261                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
262                 ONAP_VERSION=$ONAP_VERSION
263                 ONAP_FLAVOR=core
264                 TEST_TYPE=onap-healthcheck
265                 ENGINE_VERSION=$ENGINE_VERSION
266                 ENGINE_REFSPEC=$ENGINE_REFSPEC
267                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
268                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
269                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
270                 XTESTING_REPO_URL=$XTESTING_REPO_URL
271                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
272                 CLEANUP=$CLEANUP
273               node-parameters: true
274               kill-phase-on: NEVER
275               abort-all-job: false
276             - name: 'onap-healthcheck-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
277               current-parameters: false
278               predefined-parameters: |
279                 DISTRO=$DISTRO
280                 DEPLOY_TYPE=$DEPLOY_TYPE
281                 PROVISIONER_TYPE=$PROVISIONER_TYPE
282                 INSTALLER_TYPE=$INSTALLER_TYPE
283                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
284                 ONAP_VERSION=$ONAP_VERSION
285                 ONAP_FLAVOR=small
286                 TEST_TYPE=onap-healthcheck
287                 ENGINE_VERSION=$ENGINE_VERSION
288                 ENGINE_REFSPEC=$ENGINE_REFSPEC
289                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
290                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
291                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
292                 XTESTING_REPO_URL=$XTESTING_REPO_URL
293                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
294                 CLEANUP=$CLEANUP
295               node-parameters: true
296               kill-phase-on: NEVER
297               abort-all-job: false
298             - name: 'onap-healthcheck-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
299               current-parameters: false
300               predefined-parameters: |
301                 DISTRO=$DISTRO
302                 DEPLOY_TYPE=$DEPLOY_TYPE
303                 PROVISIONER_TYPE=$PROVISIONER_TYPE
304                 INSTALLER_TYPE=$INSTALLER_TYPE
305                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
306                 ONAP_VERSION=$ONAP_VERSION
307                 ONAP_FLAVOR=medium
308                 TEST_TYPE=onap-healthcheck
309                 ENGINE_VERSION=$ENGINE_VERSION
310                 ENGINE_REFSPEC=$ENGINE_REFSPEC
311                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
312                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
313                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
314                 XTESTING_REPO_URL=$XTESTING_REPO_URL
315                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
316                 CLEANUP=$CLEANUP
317               node-parameters: true
318               kill-phase-on: NEVER
319               abort-all-job: false
320             - name: 'onap-healthcheck-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
321               current-parameters: false
322               predefined-parameters: |
323                 DISTRO=$DISTRO
324                 DEPLOY_TYPE=$DEPLOY_TYPE
325                 PROVISIONER_TYPE=$PROVISIONER_TYPE
326                 INSTALLER_TYPE=$INSTALLER_TYPE
327                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
328                 ONAP_VERSION=$ONAP_VERSION
329                 ONAP_FLAVOR=full
330                 TEST_TYPE=onap-healthcheck
331                 ENGINE_VERSION=$ENGINE_VERSION
332                 ENGINE_REFSPEC=$ENGINE_REFSPEC
333                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
334                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
335                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
336                 XTESTING_REPO_URL=$XTESTING_REPO_URL
337                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
338                 CLEANUP=$CLEANUP
339               node-parameters: true
340               kill-phase-on: NEVER
341               abort-all-job: false
342       - multijob:
343           name: Promote ONAP
344           condition: ALWAYS
345           projects:
346             - name: 'promote-onap-periodic-{distro}-{installer-type}-{type}-{onap-branch}'
347               current-parameters: false
348               predefined-parameters: |
349                 DISTRO=$DISTRO
350                 DEPLOY_TYPE=$DEPLOY_TYPE
351                 INSTALLER_TYPE=$INSTALLER_TYPE
352                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
353                 ONAP_VERSION=$ONAP_VERSION
354                 ONAP_FLAVOR=$ONAP_FLAVOR
355                 ENGINE_VERSION=$ENGINE_VERSION
356                 ENGINE_REFSPEC=$ENGINE_REFSPEC
357                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
358                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
359                 XTESTING_REPO_URL=$XTESTING_REPO_URL
360                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
361                 CLEANUP=$CLEANUP
362               node-parameters: true
363               kill-phase-on: NEVER
364               abort-all-job: false
365
366 - job-template:
367     name: '{phase}-periodic-{distro}-{installer-type}-{type}-{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       - label:
382           name: SLAVE_LABEL
383           default: 'jumphost-onap-ubuntu1804'
384           description: 'Slave label to schedule this job on. All slaves have Ubuntu1604 no matter what distro target nodes use'
385       - string:
386           name: DISTRO
387           default: 'ubuntu1804'
388           description: 'Distribution to use for configuring target nodes (networking etc.). Overriden by upstream job.'
389       - string:
390           name: PROVISIONER_TYPE
391           default: 'heat'
392           description: 'Provisioner to use for provisioning nodes'
393       - string:
394           name: INSTALLER_TYPE
395           default: 'kubespray'
396           description: 'Installer to use for deploying the scenario'
397       - string:
398           name: DEPLOY_SCENARIO
399           default: 'onap-oom-nofeature'
400           description: 'Scenario to deploy and test'
401       - string:
402           name: HEAT_ENVIRONMENT_FILE
403           default: "file://$WORKSPACE/.cache/repos/swconfig/scenarios/$DEPLOY_SCENARIO/$INSTALLER_TYPE/role/$DEPLOY_SCENARIO/files/heat-environment-full.yaml"
404           description: 'Type of the deployment'
405       - string:
406           name: DEPLOY_TYPE
407           default: 'cloud'
408           description: 'Type of the deployment. Overriden by upstream job.'
409       - string:
410           name: ONAP_VERSION
411           default: 'master'
412           description: 'ONAP version to deploy'
413       - string:
414           name: ONAP_FLAVOR
415           default: '{onap-flavor}'
416           description: 'ONAP flavor to deploy - could be core, small, medium, full. Also used for xtesting as run_type.'
417       - string:
418           name: TEST_TYPE
419           default: 'oom-healthcheck'
420           description: 'Test type to run. Could be oom-healthcheck or onap-healthcheck'
421       - string:
422           name: ENGINE_VERSION
423           default: 'master'
424           description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying ONAP. Could be sha, branch'
425       - string:
426           name: ENGINE_REFSPEC
427           default: 'master'
428           description: 'Development purposes only! Nordix Cloud Infra Engine version to use for deploying ONAP. Must be refspec.'
429       - string:
430           name: DEPLOY_SCENARIO_VERSION
431           default: 'master'
432           description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying ONAP. Depends on DEPLOY_SCENARIO_REFSPEC and could be sha, branch.'
433       - string:
434           name: DEPLOY_SCENARIO_REFSPEC
435           default: 'master'
436           description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying ONAP. Depends on DEPLOY_SCENARIO_VERSION and must be refspec.'
437       - string:
438           name: XTESTING_REPO_URL
439           default: 'https://gerrit.nordix.org/opnfv/xtesting-onap.git'
440           description: 'URL to Nordix xtesting-onap repository'
441       - string:
442           name: ENGINE_ANSIBLE_PARAMS
443           default: ''
444           description: 'Extra parameters that can be added when run the play books.'
445       - string:
446           name: CLEANUP
447           default: 'true'
448
449     wrappers:
450       - credentials-binding:
451           - file:
452               credential-id: nordix-jenkins-openrcfile-city-frankfurt-defaultproject
453               variable: OPENRC_FILE
454       - mask-passwords
455       - build-timeout:
456           timeout: '{build-timeout}'
457       - fix-workspace-permissions
458
459     scm:
460       - git-scm:
461           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
462           branch: '{nordix-branch}'
463           refspec: ''
464           wipe_workspace: true
465           clean_before: false
466
467     builders:
468       - description-setter:
469           description: $INSTALLER_TYPE $DEPLOY_SCENARIO
470       - '{phase}-macro'
471
472 # vim: set ts=2 sw=2 expandtab: