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