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