Merge "Rename onap-oom-nofeature scenario to onap-nofeature-noha"
[infra/cicd.git] / jjb / cloud-infra / cloud-infra-periodic-scenario.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-scenario'
40
41     project: 'infra/engine'
42
43     stream:
44       - 'master':
45           branch: '{stream}'
46           disabled: 'false'
47
48     distro:
49       - ubuntu1804:
50           disabled: 'false'
51       - centos7:
52           disabled: 'true'
53
54     deploy-scenario:
55       - k8-calico-nofeature:
56           installer-type: kubespray
57       - k8-flannel-nofeature:
58           installer-type: kubespray
59       - k8-canal-nofeature:
60           installer-type: kubespray
61       - k8-cilium-nofeature:
62           installer-type: kubespray
63       - k8-weave-nofeature:
64           installer-type: kubespray
65       - k8-multus-nofeature:
66           installer-type: kubespray
67       - os-nosdn-nofeature:
68           installer-type: kolla
69
70     type:
71       - baremetal:
72           slave-label: 'baremetal-deploy'
73           yardstick-dispatcher: 'influxdb'
74
75     phase:
76       - deploy:
77           build-timeout: 90
78       - functest:
79           build-timeout: 135
80       - yardstick:
81           build-timeout: 30
82       - promote:
83           build-timeout: 5
84
85     jobs:
86       - '{deploy-scenario}-periodic-{distro}-{type}-{stream}'
87       - 'scenario-periodic-{distro}-{phase}-{type}-{stream}'
88
89 - job-template:
90     name: '{deploy-scenario}-periodic-{distro}-{type}-{stream}'
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: '{branch}'
102       - nordix-gerrit-parameters
103       - label:
104           name: SLAVE_LABEL
105           default: '{slave-label}'
106           description: 'Slave label to schedule this job on. All slaves have Ubuntu1604 no matter what distro target nodes use'
107       - string:
108           name: DISTRO
109           default: '{distro}'
110           description: 'Distribution to use for configuring target nodes (networking etc.)'
111       - string:
112           name: DEPLOY_TYPE
113           default: '{type}'
114           description: 'Type of the deployment'
115       - string:
116           name: USE_PREBUILT_DEPLOYMENT_IMAGE
117           default: 'true'
118           description: 'Use prebuilt deployment image while running as part of CI/CD'
119       - string:
120           name: INSTALLER_TYPE
121           default: '{installer-type}'
122           description: 'Installer to use for deploying the scenario'
123       - string:
124           name: DEPLOY_SCENARIO
125           default: '{deploy-scenario}'
126           description: 'Scenario to deploy and test'
127       - string:
128           name: TEST_SUITE
129           default: 'smoke'
130           description: 'Test suite to run'
131       - string:
132           name: YARDSTICK_DISPATCHER
133           default: '{yardstick-dispatcher}'
134           description: 'Dispatcher to use for Yardstick reporting'
135       - string:
136           name: CLEANUP
137           default: 'true'
138           description: 'Cleanup leftovers of the previous run'
139
140     properties:
141       - logrotate
142       - build-blocker:
143           use-build-blocker: true
144           blocking-jobs:
145             - 'cloud-infra-periodic-engine-.*'
146             - 'k8-.*'
147             - 'os-.*'
148           block-level: 'NODE'
149       - throttle:
150           max-per-node: 1
151           max-total: 3
152           option: project
153
154     wrappers:
155       - build-timeout:
156           timeout: 245
157       - fix-workspace-permissions
158
159     scm:
160       - git-scm:
161           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
162           branch: '{branch}'
163           refspec: ''
164           wipe_workspace: true
165           clean_before: false
166
167     triggers:
168       - timed: '@daily'
169
170     builders:
171       - description-setter:
172           description: $INSTALLER_TYPE
173       - multijob:
174           name: deploy
175           condition: SUCCESSFUL
176           projects:
177             - name: 'scenario-periodic-{distro}-deploy-{type}-{stream}'
178               current-parameters: true
179               predefined-parameters: |
180                 DISTRO=$DISTRO
181                 DEPLOY_TYPE=$DEPLOY_TYPE
182                 USE_PREBUILT_DEPLOYMENT_IMAGE=$USE_PREBUILT_DEPLOYMENT_IMAGE
183                 INSTALLER_TYPE=$INSTALLER_TYPE
184                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
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: functest
192           condition: SUCCESSFUL
193           projects:
194             - name: 'scenario-periodic-{distro}-functest-{type}-{stream}'
195               current-parameters: true
196               predefined-parameters: |
197                 DISTRO=$DISTRO
198                 DEPLOY_TYPE=$DEPLOY_TYPE
199                 INSTALLER_TYPE=$INSTALLER_TYPE
200                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
201                 TEST_SUITE=$TEST_SUITE
202                 YARDSTICK_DISPATCHER=$YARDSTICK_DISPATCHER
203                 CLEANUP=$CLEANUP
204               node-parameters: true
205               kill-phase-on: FAILURE
206               abort-all-job: true
207       - multijob:
208           name: yardstick
209           condition: SUCCESSFUL
210           projects:
211             - name: 'scenario-periodic-{distro}-yardstick-{type}-{stream}'
212               current-parameters: true
213               predefined-parameters: |
214                 DISTRO=$DISTRO
215                 DEPLOY_TYPE=$DEPLOY_TYPE
216                 INSTALLER_TYPE=$INSTALLER_TYPE
217                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
218                 TEST_SUITE=$TEST_SUITE
219                 YARDSTICK_DISPATCHER=$YARDSTICK_DISPATCHER
220                 CLEANUP=$CLEANUP
221               node-parameters: true
222               kill-phase-on: FAILURE
223               abort-all-job: true
224       - multijob:
225           name: promote
226           condition: SUCCESSFUL
227           projects:
228             - name: 'scenario-periodic-{distro}-promote-{type}-{stream}'
229               current-parameters: true
230               predefined-parameters: |
231                 DISTRO=$DISTRO
232                 DEPLOY_TYPE=$DEPLOY_TYPE
233                 INSTALLER_TYPE=$INSTALLER_TYPE
234                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
235                 TEST_SUITE=$TEST_SUITE
236                 YARDSTICK_DISPATCHER=$YARDSTICK_DISPATCHER
237                 CLEANUP=$CLEANUP
238               node-parameters: true
239               kill-phase-on: FAILURE
240               abort-all-job: true
241
242 - job-template:
243     name: 'scenario-periodic-{distro}-{phase}-{type}-{stream}'
244
245     disabled: false
246
247     concurrent: true
248
249     properties:
250       - logrotate
251
252     parameters:
253       - string:
254           name: PROJECT
255           default: $GERRIT_PROJECT
256       - string:
257           name: DISTRO
258           default: 'ubuntu1804'
259           description: 'Distribution to use for configuring target nodes (networking etc.). Overriden by upstream job.'
260       - string:
261           name: DEPLOY_TYPE
262           default: 'virtual'
263           description: 'Type of the deployment. Overriden by upstream job.'
264       - string:
265           name: USE_PREBUILT_DEPLOYMENT_IMAGE
266           default: 'false'
267           description: 'Use prebuilt deployment image while running as part of CI/CD'
268       - string:
269           name: ENGINE_ANSIBLE_PARAMS
270           default: ' -v '
271           description: 'Extra paramters that can be added when run the play books.'
272       - string:
273           name: DEPLOY_SCENARIO
274           default: 'k8-calico-nofeature'
275           description: 'Scenario to deploy and test'
276       - string:
277           name: INSTALLER_TYPE
278           default: 'kubespray'
279           description: 'Installer to use for deploying the scenario'
280       - string:
281           name: TEST_FW
282           default: '{phase}'
283           description: 'Test framework to use'
284       - string:
285           name: TEST_SUITE
286           default: 'smoke'
287           description: 'Test suite to run'
288       - string:
289           name: TEST_REPO_URL
290           default: 'https://gerrit.nordix.org/infra/test.git'
291           description: 'URL to Nordix Cloud Infra test repository'
292       - string:
293           name: YARDSTICK_DISPATCHER
294           default: 'file'
295           description: 'Dispatcher to use for Yardstick reporting'
296       - string:
297           name: CLEANUP
298           default: 'false'
299
300     wrappers:
301       - build-timeout:
302           timeout: '{build-timeout}'
303       - fix-workspace-permissions
304
305     scm:
306       - git-scm:
307           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
308           branch: '{branch}'
309           refspec: ''
310           wipe_workspace: true
311           clean_before: false
312
313     builders:
314       - description-setter:
315           description: $INSTALLER_TYPE - $DEPLOY_SCENARIO
316       - 'scenario-{phase}-macro'
317
318 # vim: set ts=2 sw=2 expandtab: