7c9f87a31a6fc7e5ec6b9815b21a115d5fe83775
[releng.git] / jjb / compass4nfv / compass-verify-jobs.yml
1 - project:
2     name: 'compass-verify-jobs'
3
4     project: 'compass4nfv'
5
6     installer: 'compass'
7 #####################################
8 # branch definitions
9 #####################################
10     stream:
11         - master:
12             branch: '{stream}'
13             gs-pathname: ''
14             disabled: false
15         - danube:
16             branch: 'stable/{stream}'
17             gs-pathname: '/{stream}'
18             disabled: false
19
20     distro:
21         - 'xenial':
22             disabled: false
23             os-version: 'xenial'
24             openstack-os-version: ''
25         - 'centos7':
26             disabled: false
27             os-version: 'centos7'
28             openstack-os-version: ''
29 #####################################
30 # patch verification phases
31 #####################################
32     phase:
33         - 'basic'
34         - 'deploy-virtual'
35 #####################################
36 # jobs
37 #####################################
38     jobs:
39         - 'compass-verify-{distro}-{stream}'
40         - 'compass-verify-k8-{distro}-{stream}'
41         - 'compass-verify-{phase}-{distro}-{stream}'
42 #####################################
43 # job templates
44 #####################################
45 - job-template:
46     name: 'compass-verify-{distro}-{stream}'
47
48     project-type: multijob
49
50     disabled: '{obj:disabled}'
51
52     concurrent: true
53
54     properties:
55         - logrotate-default
56         - throttle:
57             enabled: true
58             max-total: 4
59             max-per-node: 1
60             option: 'project'
61         - build-blocker:
62             use-build-blocker: true
63             blocking-jobs:
64                 - 'compass-verify-[^-]*-[^-]*'
65                 - 'compass-os-.*?-virtual-daily-.*?'
66             block-level: 'NODE'
67
68     scm:
69         - git-scm-gerrit
70
71     wrappers:
72         - ssh-agent-wrapper
73         - timeout:
74             timeout: 120
75             fail: true
76
77     triggers:
78         - gerrit:
79             server-name: 'gerrit.opnfv.org'
80             trigger-on:
81                 - patchset-created-event:
82                     exclude-drafts: 'false'
83                     exclude-trivial-rebase: 'false'
84                     exclude-no-code-change: 'false'
85                 - draft-published-event
86                 - comment-added-contains-event:
87                     comment-contains-value: 'recheck'
88                 - comment-added-contains-event:
89                     comment-contains-value: 'reverify'
90             projects:
91               - project-compare-type: 'ANT'
92                 project-pattern: '{project}'
93                 branches:
94                   - branch-compare-type: 'ANT'
95                     branch-pattern: '**/{branch}'
96                 file-paths:
97                   - compare-type: ANT
98                     pattern: '**/*'
99                 forbidden-file-paths:
100                   - compare-type: ANT
101                     pattern: 'docs/**'
102             readable-message: true
103
104     parameters:
105         - project-parameter:
106             project: '{project}'
107             branch: '{branch}'
108         - 'compass-virtual-defaults'
109         - '{installer}-defaults'
110         - 'compass-verify-defaults':
111             installer: '{installer}'
112             gs-pathname: '{gs-pathname}'
113         - string:
114             name: DEPLOY_SCENARIO
115             default: 'os-nosdn-nofeature-ha'
116
117     builders:
118         - description-setter:
119             description: "Built on $NODE_NAME"
120         - multijob:
121             name: basic
122             condition: SUCCESSFUL
123             projects:
124                 - name: 'opnfv-lint-verify-{stream}'
125                   current-parameters: true
126                   node-parameters: true
127                   kill-phase-on: FAILURE
128                   abort-all-job: true
129                 - name: 'opnfv-yamllint-verify-{stream}'
130                   current-parameters: true
131                   node-parameters: true
132                   kill-phase-on: FAILURE
133                   abort-all-job: true
134         - multijob:
135             name: deploy-virtual
136             condition: SUCCESSFUL
137             projects:
138                 - name: 'compass-verify-deploy-virtual-{distro}-{stream}'
139                   current-parameters: true
140                   predefined-parameters: |
141                     COMPASS_OS_VERSION={os-version}
142                   node-parameters: true
143                   kill-phase-on: FAILURE
144                   abort-all-job: true
145         - multijob:
146             name: smoke-test
147             condition: SUCCESSFUL
148             projects:
149                 - name: 'functest-compass-virtual-suite-{stream}'
150                   current-parameters: true
151                   predefined-parameters:
152                     FUNCTEST_SUITE_NAME=healthcheck
153                   node-parameters: true
154                   kill-phase-on: NEVER
155                   abort-all-job: true
156                 - name: 'functest-compass-virtual-suite-{stream}'
157                   current-parameters: true
158                   predefined-parameters:
159                     FUNCTEST_SUITE_NAME=vping_ssh
160                   node-parameters: true
161                   kill-phase-on: NEVER
162                   abort-all-job: true
163
164 - job-template:
165     name: 'compass-verify-k8-{distro}-{stream}'
166
167     project-type: multijob
168
169     disabled: '{obj:disabled}'
170
171     concurrent: true
172
173     properties:
174         - logrotate-default
175         - throttle:
176             enabled: true
177             max-total: 4
178             max-per-node: 1
179             option: 'project'
180         - build-blocker:
181             use-build-blocker: true
182             blocking-jobs:
183                 - 'compass-verify-[^-]*-[^-]*'
184                 - 'compass-os-.*?-virtual-daily-.*?'
185             block-level: 'NODE'
186
187     scm:
188         - git-scm-gerrit
189
190     wrappers:
191         - ssh-agent-wrapper
192         - timeout:
193             timeout: 120
194             fail: true
195
196     triggers:
197         - gerrit:
198             server-name: 'gerrit.opnfv.org'
199             trigger-on:
200                 - comment-added-contains-event:
201                     comment-contains-value: 'check k8'
202                 - comment-added-contains-event:
203                     comment-contains-value: 'verify k8'
204                 - comment-added-contains-event:
205                     comment-contains-value: 'check kubernetes'
206                 - comment-added-contains-event:
207                     comment-contains-value: 'verify kubernetes'
208             projects:
209               - project-compare-type: 'ANT'
210                 project-pattern: '{project}'
211                 branches:
212                   - branch-compare-type: 'ANT'
213                     branch-pattern: '**/{branch}'
214                 file-paths:
215                   - compare-type: ANT
216                     pattern: '**/*'
217                 forbidden-file-paths:
218                   - compare-type: ANT
219                     pattern: 'docs/**'
220             readable-message: true
221
222     parameters:
223         - project-parameter:
224             project: '{project}'
225             branch: '{branch}'
226         - 'compass-virtual-defaults'
227         - '{installer}-defaults'
228         - 'compass-verify-defaults':
229             installer: '{installer}'
230             gs-pathname: '{gs-pathname}'
231         - string:
232             name: DEPLOY_SCENARIO
233             default: 'k8-nosdn-nofeature-ha'
234
235     builders:
236         - description-setter:
237             description: "Built on $NODE_NAME"
238         - multijob:
239             name: basic
240             condition: SUCCESSFUL
241             projects:
242                 - name: 'opnfv-lint-verify-{stream}'
243                   current-parameters: true
244                   node-parameters: true
245                   kill-phase-on: FAILURE
246                   abort-all-job: true
247                 - name: 'opnfv-yamllint-verify-{stream}'
248                   current-parameters: true
249                   node-parameters: true
250                   kill-phase-on: FAILURE
251                   abort-all-job: true
252         - multijob:
253             name: deploy-virtual
254             condition: SUCCESSFUL
255             projects:
256                 - name: 'compass-verify-deploy-virtual-{distro}-{stream}'
257                   current-parameters: true
258                   predefined-parameters: |
259                     COMPASS_OS_VERSION={os-version}
260                   node-parameters: true
261                   kill-phase-on: FAILURE
262                   abort-all-job: true
263
264 - job-template:
265     name: 'compass-verify-{phase}-{distro}-{stream}'
266
267     disabled: '{obj:disabled}'
268
269     concurrent: true
270
271     properties:
272         - logrotate-default
273         - throttle:
274             enabled: true
275             max-per-node: 1
276             option: 'project'
277         - build-blocker:
278             use-build-blocker: true
279             blocking-jobs:
280                 - 'compass-os-.*?-virtual-daily-.*?'
281                 - 'compass-verify-deploy-.*'
282                 - 'functest-compass-virtual.*'
283             block-level: 'NODE'
284
285     scm:
286         - git-scm-gerrit
287
288     wrappers:
289         - ssh-agent-wrapper
290         - timeout:
291             timeout: 120
292             fail: true
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: "http://205.177.226.237:9999{gs-pathname}"
338         - string:
339             name: PPA_CACHE
340             default: "$WORKSPACE/work/repo/"
341         - choice:
342             name: COMPASS_OPENSTACK_VERSION
343             choices:
344                 - 'newton'
345         - choice:
346             name: COMPASS_OS_VERSION
347             choices:
348                 - 'xenial'
349                 - 'centos7'