5a77c400aa3bdf7ce81e30d835d213f77e6540b6
[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: 'influxdb'
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: 90
55       - functest:
56           build-timeout: 240
57       - yardstick:
58           build-timeout: 120
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       - string:
99           name: TEST_REPO_URL
100           default: 'https://gerrit.nordix.org/infra/test.git'
101           description: 'URL to clone the test repo from'
102       - string:
103           name: TEST_FW
104           default: 'functest'
105           description: 'Test framework to use'
106       - string:
107           name: TEST_SUITE
108           default: 'smoke'
109           description: 'Test suite to run'
110       - string:
111           name: YARDSTICK_DISPATCHER
112           default: '{yardstick-dispatcher}'
113           description: 'Dispatcher to use for Yardstick reporting'
114
115     properties:
116       - logrotate
117       - throttle:
118           max-per-node: 1
119           max-total: 3
120           option: project
121
122     wrappers:
123 #      - build-timeout:
124 #          timeout: 550
125       - mask-passwords
126       - fix-workspace-permissions
127
128     builders:
129       - description-setter:
130           description: $PROVISIONER_TYPE | $INSTALLER_TYPE | $DEPLOY_SCENARIO
131       - 'download-artifact-macro'
132       - multijob:
133           name: "Offline Deployment on {type}"
134           condition: SUCCESSFUL
135           execution-type: PARALLEL
136           projects:
137             - name: 'kubernetes-{environment-type}-deploy-{distro}-{type}-periodic'
138               current-parameters: true
139               node-parameters: true
140               kill-phase-on: FAILURE
141               abort-all-job: true
142       - multijob:
143           name: functest
144           condition: ALWAYS
145           projects:
146             - name: 'kubernetes-{environment-type}-functest-{distro}-{type}-periodic'
147               current-parameters: true
148               node-parameters: true
149               kill-phase-on: FAILURE
150               abort-all-job: true
151       - multijob:
152           name: yardstick
153           condition: ALWAYS
154           projects:
155             - name: 'kubernetes-{environment-type}-yardstick-{distro}-{type}-periodic'
156               current-parameters: true
157               node-parameters: true
158               kill-phase-on: FAILURE
159               abort-all-job: true
160
161 - job-template:
162     name: 'kubernetes-{environment-type}-{phase}-{distro}-{type}-periodic'
163
164     disabled: '{obj:disabled}'
165
166     properties:
167       - logrotate
168       - throttle:
169           max-per-node: 1
170           max-total: 3
171           option: project
172
173     wrappers:
174 #      - build-timeout:
175 #          timeout: '{build-timeout}'
176       - mask-passwords
177       - fix-workspace-permissions
178
179     builders:
180       - '{phase}-macro'