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