Merge "[compass] add job to verify k8s deploy"
[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-k8s'
206                 - comment-added-contains-event:
207                     comment-contains-value: 'verify-k8s'
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         - 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                 - name: 'opnfv-yamllint-verify-{stream}'
252                   current-parameters: true
253                   node-parameters: true
254                   kill-phase-on: FAILURE
255                   abort-all-job: true
256         - multijob:
257             name: deploy-virtual
258             condition: SUCCESSFUL
259             projects:
260                 - name: 'compass-verify-deploy-virtual-{distro}-{stream}'
261                   current-parameters: true
262                   predefined-parameters: |
263                     COMPASS_OS_VERSION={os-version}
264                   node-parameters: true
265                   kill-phase-on: FAILURE
266                   abort-all-job: true
267
268 - job-template:
269     name: 'compass-verify-{phase}-{distro}-{stream}'
270
271     disabled: '{obj:disabled}'
272
273     concurrent: true
274
275     properties:
276         - logrotate-default
277         - throttle:
278             enabled: true
279             max-per-node: 1
280             option: 'project'
281         - build-blocker:
282             use-build-blocker: true
283             blocking-jobs:
284                 - 'compass-os-.*?-virtual-daily-.*?'
285                 - 'compass-verify-deploy-.*'
286                 - 'functest-compass-virtual.*'
287             block-level: 'NODE'
288
289     scm:
290         - git-scm-gerrit
291
292     wrappers:
293         - ssh-agent-wrapper
294         - timeout:
295             timeout: 120
296             fail: true
297
298     builders:
299         - description-setter:
300             description: "Built on $NODE_NAME"
301         - '{project}-verify-{phase}-macro'
302
303 #####################################
304 # builder macros
305 #####################################
306 - builder:
307     name: 'compass4nfv-verify-basic-macro'
308     builders:
309         - shell: |
310             #!/bin/bash
311
312             echo "Not activated!"
313
314 - builder:
315     name: 'compass4nfv-verify-deploy-virtual-macro'
316     builders:
317         - shell:
318             !include-raw: ./compass-build.sh
319         - shell:
320             !include-raw: ./compass-deploy.sh
321 #####################################
322 # parameter macros
323 #####################################
324 - parameter:
325     name: 'compass-verify-defaults'
326     parameters:
327         - string:
328             name: BUILD_DIRECTORY
329             default: $WORKSPACE/build_output
330             description: "Directory where the build artifact will be located upon the completion of the build."
331         - string:
332             name: CACHE_DIRECTORY
333             default: "$HOME/opnfv/cache/$PROJECT{gs-pathname}"
334             description: "Directory where the cache to be used during the build is located."
335         - string:
336             name: GS_URL
337             default: '$GS_BASE{gs-pathname}'
338             description: "URL to Google Storage."
339         - string:
340             name: PPA_REPO
341             default: "http://205.177.226.237:9999{gs-pathname}"
342         - string:
343             name: PPA_CACHE
344             default: "$WORKSPACE/work/repo/"
345         - choice:
346             name: COMPASS_OPENSTACK_VERSION
347             choices:
348                 - 'newton'
349         - choice:
350             name: COMPASS_OS_VERSION
351             choices:
352                 - 'xenial'
353                 - 'centos7'