Switch to functest-smoke suite for periodic 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       - baremetal:
66           slave-label: 'baremetal-deploy'
67
68     phase:
69       - deploy:
70           build-timeout: 60
71       - functest:
72           build-timeout: 120
73       - yardstick:
74           build-timeout: 30
75
76     jobs:
77       - 'cloud-infra-periodic-engine-{os}-{type}-{stream}'
78       - 'cloud-infra-periodic-{os}-{phase}-{type}-{stream}'
79
80 - job-template:
81     name: 'cloud-infra-periodic-engine-{os}-{type}-{stream}'
82
83     project-type: multijob
84
85     disabled: '{obj:disabled}'
86
87     concurrent: true
88
89     parameters:
90       - project-parameters:
91           project: '{project}'
92           branch: '{branch}'
93       - nordix-gerrit-parameters
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: DISTRIBUTION
100           default: '{distribution}'
101           description: 'Distribution to use for configuring target nodes (networking etc.)'
102       - string:
103           name: DEPLOY_TYPE
104           default: '{type}'
105           description: 'Type of the deployment'
106       - string:
107           name: USE_PREBUILT_DEPLOYMENT_IMAGE
108           default: 'true'
109           description: 'Use prebuilt deployment image while running as part of CI/CD'
110       - string:
111           name: IPA_DIB_OS_ELEMENT
112           default: '{ipa_dib_os_element}'
113           description: 'DIB OS Element to use for building the ramdisk image'
114       - string:
115           name: DIB_OS_RELEASE
116           default: '{dib_os_release}'
117           description: 'DIB OS Release to use for building the deployment image to provision target nodes with'
118       - string:
119           name: DIB_OS_ELEMENT
120           default: '{dib_os_element}'
121           description: 'DIB OS Element to use for building the deployment image to provision target nodes with'
122       - string:
123           name: DEPLOY_SCENARIO
124           default: 'k8-calico-nofeature'
125           description: 'Scenario to deploy and test'
126       - string:
127           name: TEST_SUITE
128           default: 'smoke'
129           description: 'Test suite to run'
130       - string:
131           name: CLEANUP
132           default: 'true'
133           description: 'Cleanup leftovers of the previous run'
134
135     properties:
136       - logrotate
137       - build-blocker:
138           use-build-blocker: true
139           blocking-jobs:
140             - 'cloud-infra-verify-engine-{os}-.*'
141             - 'cloud-infra-periodic-engine-{os}-.*'
142             - 'cloud-infra-os-.*'
143             - 'cloud-infra-k8-.*'
144           block-level: 'NODE'
145       - throttle:
146           max-per-node: 1
147           max-total: 3
148           option: project
149
150     wrappers:
151       - build-timeout:
152           timeout: 210
153       - fix-workspace-permissions
154
155     scm:
156       - git-scm:
157           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
158           branch: '{branch}'
159           refspec: ''
160
161     triggers:
162       - timed: 'H H/3 * * *'
163
164     builders:
165       - multijob:
166           name: deploy
167           condition: SUCCESSFUL
168           projects:
169             - name: 'cloud-infra-periodic-{os}-deploy-{type}-{stream}'
170               current-parameters: true
171               predefined-parameters: |
172                 DISTRIBUTION=$DISTRIBUTION
173                 DEPLOY_TYPE=$DEPLOY_TYPE
174                 USE_PREBUILT_DEPLOYMENT_IMAGE=$USE_PREBUILT_DEPLOYMENT_IMAGE
175                 IPA_DIB_OS_ELEMENT=$IPA_DIB_OS_ELEMENT
176                 DIB_OS_RELEASE=$DIB_OS_RELEASE
177                 DIB_OS_ELEMENT=$DIB_OS_ELEMENT
178                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
179                 CLEANUP=$CLEANUP
180               git-revision: true
181               node-parameters: true
182               kill-phase-on: FAILURE
183               abort-all-job: true
184       - multijob:
185           name: functest
186           condition: ALWAYS
187           projects:
188             - name: 'cloud-infra-periodic-{os}-functest-{type}-{stream}'
189               current-parameters: true
190               predefined-parameters: |
191                 DISTRIBUTION=$DISTRIBUTION
192                 DEPLOY_TYPE=$DEPLOY_TYPE
193                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
194                 TEST_SUITE=$TEST_SUITE
195                 CLEANUP=$CLEANUP
196               node-parameters: true
197               kill-phase-on: NEVER
198               abort-all-job: false
199       - multijob:
200           name: yardstick
201           condition: ALWAYS
202           projects:
203             - name: 'cloud-infra-periodic-{os}-yardstick-{type}-{stream}'
204               current-parameters: true
205               predefined-parameters: |
206                 DISTRIBUTION=$DISTRIBUTION
207                 DEPLOY_TYPE=$DEPLOY_TYPE
208                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
209                 TEST_SUITE=$TEST_SUITE
210                 CLEANUP=$CLEANUP
211               node-parameters: true
212               kill-phase-on: NEVER
213               abort-all-job: false
214
215 - job-template:
216     name: 'cloud-infra-periodic-{os}-{phase}-{type}-{stream}'
217
218     disabled: false
219
220     concurrent: true
221
222     properties:
223       - logrotate
224
225     parameters:
226       - string:
227           name: PROJECT
228           default: $GERRIT_PROJECT
229       - string:
230           name: DISTRIBUTION
231           default: 'ubuntu18'
232           description: 'Distribution to use for configuring target nodes (networking etc.). Overriden by upstream job.'
233       - string:
234           name: DEPLOY_TYPE
235           default: 'virtual'
236           description: 'Type of the deployment. Overriden by upstream job.'
237       - string:
238           name: USE_PREBUILT_DEPLOYMENT_IMAGE
239           default: 'false'
240           description: 'Use prebuilt deployment image while running as part of CI/CD'
241       - string:
242           name: IPA_DIB_OS_ELEMENT
243           default: 'fedora'
244           description: 'DIB OS Element to use for building the ramdisk image. Overriden by upstream job.'
245       - string:
246           name: DIB_OS_RELEASE
247           default: 'bionic'
248           description: 'DIB OS Release to use for building the deployment image to provision target nodes with. Overriden by upstream job.'
249       - string:
250           name: DIB_OS_ELEMENT
251           default: 'ubuntu-minimal'
252           description: 'DIB OS Element to use for building the deployment image to provision target nodes with. Overriden by upstream job.'
253       - string:
254           name: ENGINE_ANSIBLE_PARAMS
255           default: ' -v '
256           description: 'Extra paramters that can be added when run the play books.'
257       - string:
258           name: DEPLOY_SCENARIO
259           default: 'k8-calico-nofeature'
260           description: 'Scenario to deploy and test'
261       - string:
262           name: TEST_FW
263           default: '{phase}'
264           description: 'Test framework to use'
265       - string:
266           name: TEST_SUITE
267           default: 'smoke'
268           description: 'Test suite to run'
269       - string:
270           name: TEST_REPO_URL
271           default: 'https://gerrit.nordix.org/infra/test.git'
272           description: 'URL to Nordix Cloud Infra test repository'
273       - string:
274           name: CLEANUP
275           default: 'false'
276
277     wrappers:
278       - build-timeout:
279           timeout: '{build-timeout}'
280       - fix-workspace-permissions
281
282     scm:
283       - git-scm:
284           ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
285           branch: '{branch}'
286           refspec: ''
287
288     builders:
289       - 'cloud-infra-{phase}-macro'
290
291 # vim: set ts=2 sw=2 expandtab: