use `bash` to parse shell
[releng.git] / jjb / compass4nfv / compass-verify-jobs.yaml
1 ---
2 - project:
3     name: 'compass-verify-jobs'
4
5     project: 'compass4nfv'
6
7     installer: 'compass'
8     #####################################
9     # branch definitions
10     #####################################
11     stream:
12       - master:
13           branch: '{stream}'
14           gs-pathname: ''
15           ppa-pathname: '/{stream}'
16           disabled: false
17           openstack-version: 'queens'
18           branch-type: 'master'
19       - gambia:
20           branch: 'stable/{stream}'
21           gs-pathname: '/{stream}'
22           ppa-pathname: '/{stream}'
23           disabled: false
24           openstack-version: 'queens'
25           branch-type: 'master'
26
27     distro:
28       - 'xenial':
29           disabled: false
30           os-version: 'xenial'
31           openstack-os-version: ''
32       - 'centos7':
33           disabled: true
34           os-version: 'centos7'
35           openstack-os-version: ''
36     #####################################
37     # patch verification phases
38     #####################################
39     phase:
40       - 'basic'
41       - 'deploy-virtual'
42     #####################################
43     # jobs
44     #####################################
45     jobs:
46       - 'compass-verify-{distro}-{stream}'
47       - 'compass-verify-k8-{distro}-{stream}'
48       - 'compass-verify-{phase}-{distro}-{stream}'
49 #####################################
50 # job templates
51 #####################################
52 - job-template:
53     name: 'compass-verify-{distro}-{stream}'
54
55     project-type: multijob
56
57     disabled: '{obj:disabled}'
58
59     concurrent: true
60
61     properties:
62       - logrotate-default
63       - throttle:
64           enabled: true
65           max-total: 4
66           max-per-node: 1
67           option: 'project'
68       - build-blocker:
69           use-build-blocker: true
70           blocking-jobs:
71             - 'compass-verify-[^-]*-[^-]*'
72             - 'compass-os-.*?-virtual-daily-.*?'
73             - 'compass-k8-.*?-virtual-daily-.*?'
74           blocking-level: 'NODE'
75
76     wrappers:
77       - ssh-agent-wrapper
78       - timeout:
79           timeout: 360
80           fail: true
81       - fix-workspace-permissions
82
83     scm:
84       - git-scm-gerrit
85
86     triggers:
87       - gerrit:
88           server-name: 'gerrit.opnfv.org'
89           trigger-on:
90             - patchset-created-event:
91                 exclude-drafts: 'false'
92                 exclude-trivial-rebase: 'false'
93                 exclude-no-code-change: 'false'
94             - draft-published-event
95             - comment-added-contains-event:
96                 comment-contains-value: 'recheck'
97             - comment-added-contains-event:
98                 comment-contains-value: 'reverify'
99           projects:
100             - project-compare-type: 'ANT'
101               project-pattern: '{project}'
102               branches:
103                 - branch-compare-type: 'ANT'
104                   branch-pattern: '**/{branch}'
105               file-paths:
106                 - compare-type: ANT
107                   pattern: '**/*'
108               disable-strict-forbidden-file-verification: 'true'
109               forbidden-file-paths:
110                 - compare-type: ANT
111                   pattern: 'docs/**'
112           readable-message: true
113
114     parameters:
115       - project-parameter:
116           project: '{project}'
117           branch: '{branch}'
118       - 'compass-virtual-{branch-type}-defaults'
119       - '{installer}-defaults'
120       - 'compass-verify-defaults':
121           installer: '{installer}'
122           gs-pathname: '{gs-pathname}'
123           ppa-pathname: '{ppa-pathname}'
124       - string:
125           name: DEPLOY_SCENARIO
126           default: 'os-nosdn-nofeature-ha'
127
128     builders:
129       - description-setter:
130           description: "Built on $NODE_NAME"
131       - multijob:
132           name: basic
133           condition: SUCCESSFUL
134           projects:
135             - name: 'opnfv-lint-verify-{stream}'
136               current-parameters: true
137               node-parameters: true
138               kill-phase-on: FAILURE
139               abort-all-job: true
140       - multijob:
141           name: deploy-virtual
142           condition: SUCCESSFUL
143           projects:
144             - name: 'compass-verify-deploy-virtual-{distro}-{stream}'
145               current-parameters: true
146               predefined-parameters: |
147                 COMPASS_OS_VERSION={os-version}
148                 COMPASS_OPENSTACK_VERSION={openstack-version}
149               node-parameters: true
150               kill-phase-on: FAILURE
151               abort-all-job: true
152       - multijob:
153           name: smoke-test
154           condition: SUCCESSFUL
155           projects:
156             - name: 'functest-compass-virtual-suite-{stream}'
157               current-parameters: false
158               predefined-parameters: |
159                 FUNCTEST_MODE=tier
160                 FUNCTEST_TIER=healthcheck
161                 DEPLOY_SCENARIO=os-nosdn-nofeature-ha
162               node-parameters: true
163               kill-phase-on: NEVER
164               abort-all-job: true
165
166 - job-template:
167     name: 'compass-verify-k8-{distro}-{stream}'
168
169     project-type: multijob
170
171     disabled: '{obj:disabled}'
172
173     concurrent: true
174
175     properties:
176       - logrotate-default
177       - throttle:
178           enabled: true
179           max-total: 4
180           max-per-node: 1
181           option: 'project'
182       - build-blocker:
183           use-build-blocker: true
184           blocking-jobs:
185             - 'compass-verify-[^-]*-[^-]*'
186             - 'compass-os-.*?-virtual-daily-.*?'
187           blocking-level: 'NODE'
188
189     wrappers:
190       - ssh-agent-wrapper
191       - timeout:
192           timeout: 240
193           fail: true
194       - fix-workspace-permissions
195
196     scm:
197       - git-scm-gerrit
198
199     triggers:
200       - gerrit:
201           server-name: 'gerrit.opnfv.org'
202           trigger-on:
203             - comment-added-contains-event:
204                 comment-contains-value: 'check k8'
205             - comment-added-contains-event:
206                 comment-contains-value: 'verify k8'
207             - comment-added-contains-event:
208                 comment-contains-value: 'check kubernetes'
209             - comment-added-contains-event:
210                 comment-contains-value: 'verify kubernetes'
211           projects:
212             - project-compare-type: 'ANT'
213               project-pattern: '{project}'
214               branches:
215                 - branch-compare-type: 'ANT'
216                   branch-pattern: '**/{branch}'
217               file-paths:
218                 - compare-type: ANT
219                   pattern: '**/*'
220               forbidden-file-paths:
221                 - compare-type: ANT
222                   pattern: 'docs/**'
223           readable-message: true
224
225     parameters:
226       - project-parameter:
227           project: '{project}'
228           branch: '{branch}'
229       - 'compass-virtual-{branch-type}-defaults'
230       - '{installer}-defaults'
231       - 'compass-verify-defaults':
232           installer: '{installer}'
233           gs-pathname: '{gs-pathname}'
234           ppa-pathname: '{ppa-pathname}'
235       - string:
236           name: DEPLOY_SCENARIO
237           default: 'k8-nosdn-nofeature-ha'
238
239     builders:
240       - description-setter:
241           description: "Built on $NODE_NAME"
242       - multijob:
243           name: basic
244           condition: SUCCESSFUL
245           projects:
246             - name: 'opnfv-lint-verify-{stream}'
247               current-parameters: true
248               node-parameters: true
249               kill-phase-on: FAILURE
250               abort-all-job: true
251       - multijob:
252           name: deploy-virtual
253           condition: SUCCESSFUL
254           projects:
255             - name: 'compass-verify-deploy-virtual-{distro}-{stream}'
256               current-parameters: true
257               predefined-parameters: |
258                 COMPASS_OS_VERSION={os-version}
259               node-parameters: true
260               kill-phase-on: FAILURE
261               abort-all-job: true
262
263 - job-template:
264     name: 'compass-verify-{phase}-{distro}-{stream}'
265
266     disabled: '{obj:disabled}'
267
268     concurrent: true
269
270     properties:
271       - logrotate-default
272       - throttle:
273           enabled: true
274           max-per-node: 1
275           option: 'project'
276       - build-blocker:
277           use-build-blocker: true
278           blocking-jobs:
279             - 'compass-os-.*?-virtual-daily-.*?'
280             - 'compass-verify-deploy-.*'
281             - 'functest-compass-virtual.*'
282           blocking-level: 'NODE'
283
284     wrappers:
285       - ssh-agent-wrapper
286       - timeout:
287           timeout: 360
288           fail: true
289       - fix-workspace-permissions
290
291     scm:
292       - git-scm-gerrit
293
294     builders:
295       - description-setter:
296           description: "Built on $NODE_NAME"
297       - '{project}-verify-{phase}-macro'
298
299 #####################################
300 # builder macros
301 #####################################
302 - builder:
303     name: 'compass4nfv-verify-basic-macro'
304     builders:
305       - shell: |
306           #!/bin/bash
307
308           echo "Not activated!"
309
310 - builder:
311     name: 'compass4nfv-verify-deploy-virtual-macro'
312     builders:
313       - shell:
314           !include-raw: ./compass-build.sh
315       - shell:
316           !include-raw: ./compass-deploy.sh
317 #####################################
318 # parameter macros
319 #####################################
320 - parameter:
321     name: 'compass-verify-defaults'
322     parameters:
323       - string:
324           name: BUILD_DIRECTORY
325           default: $WORKSPACE/build_output
326           description: "Directory where the build artifact will be located upon the completion of the build."
327       - string:
328           name: CACHE_DIRECTORY
329           default: "$HOME/opnfv/cache/$PROJECT{gs-pathname}"
330           description: "Directory where the cache to be used during the build is located."
331       - string:
332           name: GS_URL
333           default: '$GS_BASE{gs-pathname}'
334           description: "URL to Google Storage."
335       - string:
336           name: PPA_REPO
337           default: "https://artifacts.opnfv.org/compass4nfv/package{ppa-pathname}"
338       - string:
339           name: PPA_CACHE
340           default: "$WORKSPACE/work/repo/"
341       - choice:
342           name: COMPASS_OS_VERSION
343           choices:
344             - 'xenial'
345             - 'centos7'