Set yardstick dispatcher for testfw verify jobs
[infra/cicd.git] / jjb / cloud-infra / cloud-infra-periodic-engine.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-engine'
40
41     project: 'infra/engine'
42
43     stream:
44       - 'master':
45           branch: '{stream}'
46           disabled: 'false'
47
48     os:
49       - ubuntu1804:
50           disabled: 'false'
51           distribution: 'ubuntu18'
52           ipa_dib_os_element: 'coreos'
53           dib_os_release: 'bionic'
54           dib_os_element: 'ubuntu-minimal'
55       - centos7:
56           disabled: 'true'
57           distribution: 'centos7'
58           ipa_dib_os_element: 'coreos'
59           dib_os_release: '7'
60           dib_os_element: 'centos-minimal'
61
62     type:
63       - virtual:
64           slave-label: 'vpod-deploy-city'
65           yardstick-dispatcher: 'file'
66       - baremetal:
67           slave-label: 'baremetal-deploy'
68           yardstick-dispatcher: 'influxdb'
69
70     phase:
71       - deploy:
72           build-timeout: 60
73       - functest:
74           build-timeout: 120
75       - yardstick:
76           build-timeout: 30
77
78     jobs:
79       - 'cloud-infra-periodic-engine-{os}-{type}-{stream}'
80       - 'cloud-infra-periodic-{os}-{phase}-{type}-{stream}'
81
82 - job-template:
83     name: 'cloud-infra-periodic-engine-{os}-{type}-{stream}'
84
85     project-type: multijob
86
87     disabled: '{obj:disabled}'
88
89     concurrent: true
90
91     parameters:
92       - project-parameters:
93           project: '{project}'
94           branch: '{branch}'
95       - nordix-gerrit-parameters
96       - label:
97           name: SLAVE_LABEL
98           default: '{slave-label}'
99           description: 'Slave label to schedule this job on. All slaves have Ubuntu1604 no matter what distro target nodes use'
100       - string:
101           name: DISTRIBUTION
102           default: '{distribution}'
103           description: 'Distribution to use for configuring target nodes (networking etc.)'
104       - string:
105           name: DEPLOY_TYPE
106           default: '{type}'
107           description: 'Type of the deployment'
108       - string:
109           name: USE_PREBUILT_DEPLOYMENT_IMAGE
110           default: 'true'
111           description: 'Use prebuilt deployment image while running as part of CI/CD'
112       - string:
113           name: IPA_DIB_OS_ELEMENT
114           default: '{ipa_dib_os_element}'
115           description: 'DIB OS Element to use for building the ramdisk image'
116       - string:
117           name: DIB_OS_RELEASE
118           default: '{dib_os_release}'
119           description: 'DIB OS Release to use for building the deployment image to provision target nodes with'
120       - string:
121           name: DIB_OS_ELEMENT
122           default: '{dib_os_element}'
123           description: 'DIB OS Element to use for building the deployment image to provision target nodes with'
124       - string:
125           name: DEPLOY_SCENARIO
126           default: 'k8-calico-nofeature'
127           description: 'Scenario to deploy and test'
128       - string:
129           name: TEST_SUITE
130           default: 'smoke'
131           description: 'Test suite to run'
132       - string:
133           name: YARDSTICK_DISPATCHER
134           default: '{yardstick-dispatcher}'
135           description: 'Dispatcher to use for Yardstick reporting'
136       - string:
137           name: CLEANUP
138           default: 'true'
139           description: 'Cleanup leftovers of the previous run'
140
141     properties:
142       - logrotate
143       - build-blocker:
144           use-build-blocker: true
145           blocking-jobs:
146             - 'cloud-infra-verify-engine-{os}-.*'
147             - 'cloud-infra-verify-scenario-{os}-.*'
148             - 'cloud-infra-periodic-engine-{os}-.*'
149             - 'cloud-infra-os-.*'
150             - 'cloud-infra-k8-.*'
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: 210
160       - fix-workspace-permissions
161
162     scm:
163       - git-scm:
164           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
165           branch: '{branch}'
166           refspec: ''
167
168     triggers:
169       - timed: 'H H/3 * * *'
170
171     builders:
172       - multijob:
173           name: deploy
174           condition: SUCCESSFUL
175           projects:
176             - name: 'cloud-infra-periodic-{os}-deploy-{type}-{stream}'
177               current-parameters: true
178               predefined-parameters: |
179                 DISTRIBUTION=$DISTRIBUTION
180                 DEPLOY_TYPE=$DEPLOY_TYPE
181                 USE_PREBUILT_DEPLOYMENT_IMAGE=$USE_PREBUILT_DEPLOYMENT_IMAGE
182                 IPA_DIB_OS_ELEMENT=$IPA_DIB_OS_ELEMENT
183                 DIB_OS_RELEASE=$DIB_OS_RELEASE
184                 DIB_OS_ELEMENT=$DIB_OS_ELEMENT
185                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
186                 CLEANUP=$CLEANUP
187               git-revision: true
188               node-parameters: true
189               kill-phase-on: FAILURE
190               abort-all-job: true
191       - multijob:
192           name: functest
193           condition: ALWAYS
194           projects:
195             - name: 'cloud-infra-periodic-{os}-functest-{type}-{stream}'
196               current-parameters: true
197               predefined-parameters: |
198                 DISTRIBUTION=$DISTRIBUTION
199                 DEPLOY_TYPE=$DEPLOY_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: NEVER
206               abort-all-job: false
207       - multijob:
208           name: yardstick
209           condition: ALWAYS
210           projects:
211             - name: 'cloud-infra-periodic-{os}-yardstick-{type}-{stream}'
212               current-parameters: true
213               predefined-parameters: |
214                 DISTRIBUTION=$DISTRIBUTION
215                 DEPLOY_TYPE=$DEPLOY_TYPE
216                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
217                 TEST_SUITE=$TEST_SUITE
218                 YARDSTICK_DISPATCHER=$YARDSTICK_DISPATCHER
219                 CLEANUP=$CLEANUP
220               node-parameters: true
221               kill-phase-on: NEVER
222               abort-all-job: false
223
224 - job-template:
225     name: 'cloud-infra-periodic-{os}-{phase}-{type}-{stream}'
226
227     disabled: false
228
229     concurrent: true
230
231     properties:
232       - logrotate
233
234     parameters:
235       - string:
236           name: PROJECT
237           default: $GERRIT_PROJECT
238       - string:
239           name: DISTRIBUTION
240           default: 'ubuntu18'
241           description: 'Distribution to use for configuring target nodes (networking etc.). Overriden by upstream job.'
242       - string:
243           name: DEPLOY_TYPE
244           default: 'virtual'
245           description: 'Type of the deployment. Overriden by upstream job.'
246       - string:
247           name: USE_PREBUILT_DEPLOYMENT_IMAGE
248           default: 'false'
249           description: 'Use prebuilt deployment image while running as part of CI/CD'
250       - string:
251           name: IPA_DIB_OS_ELEMENT
252           default: 'fedora'
253           description: 'DIB OS Element to use for building the ramdisk image. Overriden by upstream job.'
254       - string:
255           name: DIB_OS_RELEASE
256           default: 'bionic'
257           description: 'DIB OS Release to use for building the deployment image to provision target nodes with. Overriden by upstream job.'
258       - string:
259           name: DIB_OS_ELEMENT
260           default: 'ubuntu-minimal'
261           description: 'DIB OS Element to use for building the deployment image to provision target nodes with. Overriden by upstream job.'
262       - string:
263           name: ENGINE_ANSIBLE_PARAMS
264           default: ' -v '
265           description: 'Extra paramters that can be added when run the play books.'
266       - string:
267           name: DEPLOY_SCENARIO
268           default: 'k8-calico-nofeature'
269           description: 'Scenario to deploy and test'
270       - string:
271           name: TEST_FW
272           default: '{phase}'
273           description: 'Test framework to use'
274       - string:
275           name: TEST_SUITE
276           default: 'smoke'
277           description: 'Test suite to run'
278       - string:
279           name: TEST_REPO_URL
280           default: 'https://gerrit.nordix.org/infra/test.git'
281           description: 'URL to Nordix Cloud Infra test repository'
282       - string:
283           name: YARDSTICK_DISPATCHER
284           default: 'file'
285           description: 'Dispatcher to use for Yardstick reporting'
286       - string:
287           name: CLEANUP
288           default: 'false'
289
290     wrappers:
291       - build-timeout:
292           timeout: '{build-timeout}'
293       - fix-workspace-permissions
294
295     scm:
296       - git-scm:
297           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
298           branch: '{branch}'
299           refspec: ''
300
301     builders:
302       - 'cloud-infra-{phase}-macro'
303
304 # vim: set ts=2 sw=2 expandtab: