e3e68c1f88b8faa2292ec37104f6b1660a1dbc20
[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       - multijob:
132           name: "Offline Deployment on {type}"
133           condition: SUCCESSFUL
134           execution-type: PARALLEL
135           projects:
136             - name: 'kubernetes-{environment-type}-deploy-{distro}-{type}-periodic'
137               current-parameters: true
138               node-parameters: true
139               kill-phase-on: FAILURE
140               abort-all-job: true
141       - multijob:
142           name: functest
143           condition: ALWAYS
144           projects:
145             - name: 'kubernetes-{environment-type}-functest-{distro}-{type}-periodic'
146               current-parameters: true
147               node-parameters: true
148               kill-phase-on: FAILURE
149               abort-all-job: true
150       - multijob:
151           name: yardstick
152           condition: ALWAYS
153           projects:
154             - name: 'kubernetes-{environment-type}-yardstick-{distro}-{type}-periodic'
155               current-parameters: true
156               node-parameters: true
157               kill-phase-on: FAILURE
158               abort-all-job: true
159
160 - job-template:
161     name: 'kubernetes-{environment-type}-{phase}-{distro}-{type}-periodic'
162
163     disabled: '{obj:disabled}'
164
165     properties:
166       - logrotate
167       - throttle:
168           max-per-node: 1
169           max-total: 3
170           option: project
171
172     wrappers:
173       - build-timeout:
174           timeout: '{build-timeout}'
175       - mask-passwords
176       - fix-workspace-permissions
177
178     builders:
179       - shell: |
180           #!/bin/bash
181           env