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