Merge "Remove functest-parser"
[releng.git] / jjb / apex / apex-verify-jobs.yaml
1 ---
2 - project:
3     name: 'apex-verify-jobs'
4     project: 'apex'
5     jobs:
6       - 'apex-verify-{stream}'
7       - 'apex-verify-gate-{stream}'
8       - 'apex-verify-unit-tests-{stream}'
9     stream:
10       - master: &master
11           branch: '{stream}'
12           gs-pathname: ''
13           verify-scenario: 'os-nosdn-nofeature-ha'
14           disabled: false
15       - fraser: &fraser
16           branch: 'stable/{stream}'
17           gs-pathname: '/{stream}'
18           verify-scenario: 'os-nosdn-nofeature-ha'
19           disabled: false
20       - danube: &danube
21           branch: 'stable/{stream}'
22           gs-pathname: '/{stream}'
23           verify-scenario: 'os-odl_l3-nofeature-ha'
24           disabled: true
25       - euphrates: &euphrates
26           branch: 'stable/{stream}'
27           gs-pathname: '/{stream}'
28           verify-scenario: 'os-odl-nofeature-ha'
29           disabled: false
30
31 # Unit Test
32 - job-template:
33     name: 'apex-verify-unit-tests-{stream}'
34
35     node: 'apex-build-master'
36
37     concurrent: true
38
39     disabled: '{obj:disabled}'
40
41     parameters:
42       - apex-parameter:
43           gs-pathname: '{gs-pathname}'
44       - project-parameter:
45           project: '{project}'
46           branch: '{branch}'
47
48     scm:
49       - git-scm-gerrit
50
51     triggers:
52       - gerrit:
53           server-name: 'gerrit.opnfv.org'
54           trigger-on:
55             - patchset-created-event:
56                 exclude-drafts: 'false'
57                 exclude-trivial-rebase: 'false'
58                 exclude-no-code-change: 'true'
59             - draft-published-event
60             - comment-added-contains-event:
61                 comment-contains-value: 'recheck'
62             - comment-added-contains-event:
63                 comment-contains-value: 'reverify'
64           projects:
65             - project-compare-type: 'ANT'
66               project-pattern: 'apex'
67               branches:
68                 - branch-compare-type: 'ANT'
69                   branch-pattern: '**/{branch}'
70               disable-strict-forbidden-file-verification: 'false'
71               file-paths:
72                 - compare-type: ANT
73                   pattern: 'apex/tests/**'
74               forbidden-file-paths:
75                 - compare-type: ANT
76                   pattern: '*'
77                 - compare-type: ANT
78                   pattern: 'apex/*'
79                 - compare-type: ANT
80                   pattern: 'build/**'
81                 - compare-type: ANT
82                   pattern: 'lib/**'
83                 - compare-type: ANT
84                   pattern: 'config/**'
85                 - compare-type: ANT
86                   pattern: 'apex/build/**'
87                 - compare-type: ANT
88                   pattern: 'apex/common/**'
89                 - compare-type: ANT
90                   pattern: 'apex/inventory/**'
91                 - compare-type: ANT
92                   pattern: 'apex/network/**'
93                 - compare-type: ANT
94                   pattern: 'apex/overcloud/**'
95                 - compare-type: ANT
96                   pattern: 'apex/settings/**'
97                 - compare-type: ANT
98                   pattern: 'apex/undercloud/**'
99                 - compare-type: ANT
100                   pattern: 'apex/virtual/**'
101
102     properties:
103       - logrotate-default
104       - throttle:
105           max-per-node: 1
106           max-total: 10
107           option: 'project'
108
109     builders:
110       - apex-unit-test
111
112 # Verify
113 - job-template:
114     name: 'apex-verify-{stream}'
115
116     concurrent: true
117
118     disabled: '{obj:disabled}'
119
120     project-type: 'multijob'
121
122     parameters:
123       - '{project}-virtual-{stream}-defaults'
124       - apex-parameter:
125           gs-pathname: '{gs-pathname}/dev'
126       - project-parameter:
127           project: '{project}'
128           branch: '{branch}'
129       - string:
130           name: ARTIFACT_VERSION
131           default: dev
132           description: "Used for overriding the ARTIFACT_VERSION"
133     scm:
134       - git-scm-gerrit
135
136     triggers:
137       - gerrit:
138           server-name: 'gerrit.opnfv.org'
139           trigger-on:
140             - patchset-created-event:
141                 exclude-drafts: 'false'
142                 exclude-trivial-rebase: 'false'
143                 exclude-no-code-change: 'true'
144             - draft-published-event
145             - comment-added-contains-event:
146                 comment-contains-value: 'recheck'
147             - comment-added-contains-event:
148                 comment-contains-value: 'reverify'
149           projects:
150             - project-compare-type: 'ANT'
151               project-pattern: 'apex'
152               branches:
153                 - branch-compare-type: 'ANT'
154                   branch-pattern: '**/{branch}'
155               disable-strict-forbidden-file-verification: 'true'
156               file-paths:
157                 - compare-type: ANT
158                   pattern: '*'
159                 - compare-type: ANT
160                   pattern: 'apex/*'
161                 - compare-type: ANT
162                   pattern: 'build/**'
163                 - compare-type: ANT
164                   pattern: 'ci/**'
165                 - compare-type: ANT
166                   pattern: 'lib/**'
167                 - compare-type: ANT
168                   pattern: 'config/**'
169                 - compare-type: ANT
170                   pattern: 'apex/build/**'
171                 - compare-type: ANT
172                   pattern: 'apex/common/**'
173                 - compare-type: ANT
174                   pattern: 'apex/inventory/**'
175                 - compare-type: ANT
176                   pattern: 'apex/network/**'
177                 - compare-type: ANT
178                   pattern: 'apex/overcloud/**'
179                 - compare-type: ANT
180                   pattern: 'apex/settings/**'
181                 - compare-type: ANT
182                   pattern: 'apex/undercloud/**'
183                 - compare-type: ANT
184                   pattern: 'apex/virtual/**'
185               forbidden-file-paths:
186                 - compare-type: ANT
187                   pattern: 'apex/tests/**'
188                 - compare-type: ANT
189                   pattern: 'docs/**'
190
191     properties:
192       - logrotate-default
193       - throttle:
194           max-per-node: 3
195           max-total: 10
196           option: 'project'
197
198     builders:
199       - description-setter:
200           description: "Built on $NODE_NAME"
201       - multijob:
202           name: basic
203           condition: SUCCESSFUL
204           projects:
205             - name: 'apex-verify-unit-tests-{stream}'
206               current-parameters: false
207               predefined-parameters: |
208                 GERRIT_BRANCH=$GERRIT_BRANCH
209                 GERRIT_REFSPEC=$GERRIT_REFSPEC
210                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
211                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
212               node-parameters: false
213               kill-phase-on: FAILURE
214               abort-all-job: true
215               git-revision: true
216       - multijob:
217           name: build
218           condition: SUCCESSFUL
219           projects:
220             - name: 'apex-build-{stream}'
221               current-parameters: false
222               predefined-parameters: |
223                 ARTIFACT_VERSION=$ARTIFACT_VERSION
224                 GERRIT_BRANCH=$GERRIT_BRANCH
225                 GERRIT_REFSPEC=$GERRIT_REFSPEC
226                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
227                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
228               node-parameters: false
229               kill-phase-on: FAILURE
230               abort-all-job: true
231               git-revision: true
232       - multijob:
233           name: deploy-virtual
234           condition: SUCCESSFUL
235           projects:
236             - name: 'apex-virtual-{stream}'
237               current-parameters: false
238               predefined-parameters: |
239                 ARTIFACT_VERSION=$ARTIFACT_VERSION
240                 DEPLOY_SCENARIO={verify-scenario}
241                 OPNFV_CLEAN=yes
242                 GERRIT_BRANCH=$GERRIT_BRANCH
243                 GERRIT_REFSPEC=$GERRIT_REFSPEC
244                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
245                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
246                 FUNCTEST_SUITE_NAME=tempest_smoke_serial
247                 FUNCTEST_MODE=testcase
248               node-parameters: false
249               kill-phase-on: FAILURE
250               abort-all-job: true
251               git-revision: true
252
253 # Verify Scenario Gate
254 - job-template:
255     name: 'apex-verify-gate-{stream}'
256
257     concurrent: true
258
259     disabled: '{obj:disabled}'
260
261     project-type: 'multijob'
262
263     parameters:
264       - '{project}-virtual-{stream}-defaults'
265       - apex-parameter:
266           gs-pathname: '{gs-pathname}/dev'
267       - project-parameter:
268           project: '{project}'
269           branch: '{branch}'
270       - string:
271           name: GIT_BASE
272           default: https://gerrit.opnfv.org/gerrit/$PROJECT
273           description: "Used for overriding the GIT URL coming from parameters macro."
274       - string:
275           name: ARTIFACT_VERSION
276           default: dev
277           description: "Used for overriding the ARTIFACT_VERSION"
278
279     scm:
280       - git-scm-gerrit
281
282     triggers:
283       - gerrit:
284           server-name: 'gerrit.opnfv.org'
285           trigger-on:
286             - comment-added-contains-event:
287                 comment-contains-value: '^Patch Set [0-9]+: Code-Review\+2.*start-gate-scenario:.*'
288           projects:
289             - project-compare-type: 'ANT'
290               project-pattern: 'apex'
291               branches:
292                 - branch-compare-type: 'ANT'
293                   branch-pattern: '**/{branch}'
294               file-paths:
295                 - compare-type: ANT
296                   pattern: 'ci/**'
297                 - compare-type: ANT
298                   pattern: 'build/**'
299                 - compare-type: ANT
300                   pattern: 'lib/**'
301                 - compare-type: ANT
302                   pattern: 'config/**'
303                 - compare-type: ANT
304                   pattern: 'apex/**'
305
306     properties:
307       - logrotate-default
308       - build-blocker:
309           use-build-blocker: true
310           block-level: 'NODE'
311           blocking-jobs:
312             - 'apex-verify.*'
313             - 'apex-virtual.*'
314             - 'apex-.*-promote.*'
315       - throttle:
316           max-per-node: 1
317           max-total: 10
318           option: 'project'
319
320     builders:
321       # yamllint disable rule:line-length
322       - shell: |
323           echo DEPLOY_SCENARIO=$(echo $GERRIT_EVENT_COMMENT_TEXT | grep start-gate-scenario | grep -Eo '(os|k8s)-.*$') > detected_scenario
324       # yamllint enable rule:line-length
325       - inject:
326           properties-file: detected_scenario
327       - multijob:
328           name: deploy-virtual
329           condition: SUCCESSFUL
330           projects:
331             - name: 'apex-deploy-virtual-{stream}'
332               current-parameters: false
333               predefined-parameters: |
334                 ARTIFACT_VERSION=$ARTIFACT_VERSION
335                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
336                 OPNFV_CLEAN=yes
337                 GERRIT_BRANCH=$GERRIT_BRANCH
338                 GERRIT_REFSPEC=$GERRIT_REFSPEC
339                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
340                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
341                 GERRIT_EVENT_COMMENT_TEXT=$GERRIT_EVENT_COMMENT_TEXT
342               node-parameters: true
343               kill-phase-on: FAILURE
344               abort-all-job: true
345               git-revision: true
346       - multijob:
347           name: functest-smoke
348           condition: ALWAYS
349           projects:
350             - name: 'functest-apex-virtual-suite-{stream}'
351               current-parameters: false
352               predefined-parameters: |
353                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
354                 FUNCTEST_SUITE_NAME=tempest_smoke_serial
355                 FUNCTEST_MODE=testcase
356                 GERRIT_BRANCH=$GERRIT_BRANCH
357                 GERRIT_REFSPEC=$GERRIT_REFSPEC
358                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
359                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
360               node-parameters: true
361               kill-phase-on: NEVER
362               enable-condition: "def m = '$DEPLOY_SCENARIO' != k8s-nosdn-nofeature-noha"
363               abort-all-job: true
364               git-revision: false
365       - multijob:
366           name: apex-fetch-logs
367           projects:
368             - name: 'apex-fetch-logs-{stream}'
369               current-parameters: true
370               predefined-parameters: |
371                 GERRIT_BRANCH=$GERRIT_BRANCH
372                 GERRIT_REFSPEC=$GERRIT_REFSPEC
373                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
374               node-parameters: true
375               kill-phase-on: NEVER
376               abort-all-job: true
377               git-revision: false
378
379 ########################
380 # builder macros
381 ########################
382 - builder:
383     name: apex-unit-test
384     builders:
385       - shell:
386           !include-raw: ./apex-unit-test.sh