engine: Enable build timeouts
[infra/cicd.git] / jjb / engine / periodic-jobs / engine-periodic-offline-deploy-test.yaml
1 ---
2 # ============LICENSE_START=======================================================
3 #  Copyright (C) 2019 Nordix Foundation.
4 # ================================================================================
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 #      http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 #
17 # SPDX-License-Identifier: Apache-2.0
18 # ============LICENSE_END=========================================================
19
20 - project:
21     name: 'engine-periodic-offline-deploy-test'
22
23     project: 'engine-periodic-offline-deploy-test'
24
25     stream:
26       - 'master':
27           branch: '{stream}'
28
29     distro:
30       - ubuntu1804
31
32     deploy-scenario:
33       - k8-calico-nofeature
34       - k8-multus-nofeature
35
36
37     type:
38       - baremetal:
39           pod-name: est-baremetal
40           provisioner-type: bifrost
41           installer-type: kubespray
42           slave-label: baremetal-deploy
43           yardstick-dispatcher: 'file'
44
45     environment-type:
46       - offline:
47           disabled: false
48           execution-mode: offline-deployment
49           pdf: 'file:///opt/engine/offline/git/hwconfig/pods'
50           idf: 'file:///opt/engine/offline/git/hwconfig/pods'
51
52     phase:
53       - deploy:
54           build-timeout: 60
55       - functest:
56           build-timeout: 210
57       - yardstick:
58           build-timeout: 30
59
60     jobs:
61       - '{deploy-scenario}-{environment-type}-{distro}-{type}-periodic'
62       - 'kubernetes-{environment-type}-{phase}-{distro}-{type}-periodic'
63
64 - job-template:
65     name: '{deploy-scenario}-{environment-type}-{distro}-{type}-periodic'
66
67     project-type: multijob
68
69     disabled: '{obj:disabled}'
70
71     concurrent: true
72
73     parameters:
74       - label:
75           name: SLAVE_LABEL
76           default: '{slave-label}'
77           description: 'Slave label to schedule this job on.'
78       - string:
79           name: PROVISIONER_TYPE
80           default: '{provisioner-type}'
81           description: 'Provisioner type to use'
82       - string:
83           name: INSTALLER_TYPE
84           default: '{installer-type}'
85           description: 'Installer type to use'
86       - string:
87           name: DEPLOY_SCENARIO
88           default: '{deploy-scenario}'
89           description: 'Scenario to deploy and test'
90       - string:
91           name: PDF
92           default: '{pdf}/${{NODE_NAME}}-pdf.yml'
93           description: 'PDF file to use for deployment'
94       - string:
95           name: IDF
96           default: '{idf}/${{NODE_NAME}}-idf.yml'
97           description: 'IDF file to use for deployment'
98
99     properties:
100       - logrotate
101       - throttle:
102           max-per-node: 1
103           max-total: 3
104           option: project
105
106     wrappers:
107       - build-timeout:
108           timeout: 300
109       - mask-passwords
110       - fix-workspace-permissions
111
112     builders:
113       - description-setter:
114           description: $DEPLOY_SCENARIO | $PROVISIONER_TYPE | $INSTALLER_TYPE
115       - 'download-artifact-macro'
116       - multijob:
117           name: "Offline Deployment on {type}"
118           condition: SUCCESSFUL
119           execution-type: PARALLEL
120           projects:
121             - name: 'kubernetes-{environment-type}-deploy-{distro}-{type}-periodic'
122               current-parameters: true
123               node-parameters: true
124               kill-phase-on: FAILURE
125               abort-all-job: true
126       - multijob:
127           name: functest
128           condition: ALWAYS
129           projects:
130             - name: 'kubernetes-{environment-type}-functest-{distro}-{type}-periodic'
131               current-parameters: true
132               node-parameters: true
133               kill-phase-on: FAILURE
134               abort-all-job: true
135       - multijob:
136           name: yardstick
137           condition: ALWAYS
138           projects:
139             - name: 'kubernetes-{environment-type}-yardstick-{distro}-{type}-periodic'
140               current-parameters: true
141               node-parameters: true
142               kill-phase-on: FAILURE
143               abort-all-job: true
144
145 - job-template:
146     name: 'kubernetes-{environment-type}-{phase}-{distro}-{type}-periodic'
147
148     disabled: '{obj:disabled}'
149
150     parameters:
151       - string:
152           name: TEST_REPO_URL
153           default: 'https://gerrit.nordix.org/infra/test.git'
154           description: 'URL to clone the test repo from'
155       - string:
156           name: TEST_FW
157           default: '{phase}'
158           description: 'Test framework to use'
159       - string:
160           name: TEST_SUITE
161           default: 'smoke'
162           description: 'Test suite to run'
163       - string:
164           name: YARDSTICK_DISPATCHER
165           default: '{yardstick-dispatcher}'
166           description: 'Dispatcher to use for Yardstick reporting'
167
168     properties:
169       - logrotate
170       - throttle:
171           max-per-node: 1
172           max-total: 3
173           option: project
174
175     wrappers:
176       - build-timeout:
177           timeout: '{build-timeout}'
178       - mask-passwords
179       - fix-workspace-permissions
180
181     builders:
182       - description-setter:
183           description: $DEPLOY_SCENARIO | $PROVISIONER_TYPE | $INSTALLER_TYPE
184       - '{phase}-macro'