Adding a new verification job for testapi UI.
[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-odl-nofeature-ha'
14           disabled: false
15       - fraser: &fraser
16           branch: 'stable/{stream}'
17           gs-pathname: '/{stream}'
18           verify-scenario: 'os-odl-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               node-parameters: false
247               kill-phase-on: FAILURE
248               abort-all-job: true
249               git-revision: true
250
251 # Verify Scenario Gate
252 - job-template:
253     name: 'apex-verify-gate-{stream}'
254
255     concurrent: true
256
257     disabled: '{obj:disabled}'
258
259     project-type: 'multijob'
260
261     parameters:
262       - '{project}-virtual-{stream}-defaults'
263       - apex-parameter:
264           gs-pathname: '{gs-pathname}/dev'
265       - project-parameter:
266           project: '{project}'
267           branch: '{branch}'
268       - string:
269           name: GIT_BASE
270           default: https://gerrit.opnfv.org/gerrit/$PROJECT
271           description: "Used for overriding the GIT URL coming from parameters macro."
272       - string:
273           name: ARTIFACT_VERSION
274           default: dev
275           description: "Used for overriding the ARTIFACT_VERSION"
276
277     scm:
278       - git-scm-gerrit
279
280     triggers:
281       - gerrit:
282           server-name: 'gerrit.opnfv.org'
283           trigger-on:
284             - comment-added-contains-event:
285                 comment-contains-value: '^Patch Set [0-9]+: Code-Review\+2.*start-gate-scenario:.*'
286           projects:
287             - project-compare-type: 'ANT'
288               project-pattern: 'apex'
289               branches:
290                 - branch-compare-type: 'ANT'
291                   branch-pattern: '**/{branch}'
292               file-paths:
293                 - compare-type: ANT
294                   pattern: 'ci/**'
295                 - compare-type: ANT
296                   pattern: 'build/**'
297                 - compare-type: ANT
298                   pattern: 'lib/**'
299                 - compare-type: ANT
300                   pattern: 'config/**'
301                 - compare-type: ANT
302                   pattern: 'apex/**'
303
304     properties:
305       - logrotate-default
306       - build-blocker:
307           use-build-blocker: true
308           block-level: 'NODE'
309           blocking-jobs:
310             - 'apex-verify.*'
311             - 'apex-virtual.*'
312       - throttle:
313           max-per-node: 1
314           max-total: 10
315           option: 'project'
316
317     builders:
318       # yamllint disable rule:line-length
319       - shell: |
320           echo DEPLOY_SCENARIO=$(echo $GERRIT_EVENT_COMMENT_TEXT | grep start-gate-scenario | grep -Eo '(os|k8s)-.*$') > detected_scenario
321       # yamllint enable rule:line-length
322       - inject:
323           properties-file: detected_scenario
324       - multijob:
325           name: deploy-virtual
326           condition: SUCCESSFUL
327           projects:
328             - name: 'apex-deploy-virtual-{stream}'
329               current-parameters: false
330               predefined-parameters: |
331                 ARTIFACT_VERSION=$ARTIFACT_VERSION
332                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
333                 OPNFV_CLEAN=yes
334                 GERRIT_BRANCH=$GERRIT_BRANCH
335                 GERRIT_REFSPEC=$GERRIT_REFSPEC
336                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
337                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
338                 GERRIT_EVENT_COMMENT_TEXT=$GERRIT_EVENT_COMMENT_TEXT
339               node-parameters: true
340               kill-phase-on: FAILURE
341               abort-all-job: true
342               git-revision: true
343       - multijob:
344           name: functest-smoke
345           condition: ALWAYS
346           projects:
347             - name: 'functest-apex-virtual-suite-{stream}'
348               current-parameters: false
349               predefined-parameters: |
350                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
351                 FUNCTEST_MODE=tier
352                 FUNCTEST_TIER=healthcheck
353                 GERRIT_BRANCH=$GERRIT_BRANCH
354                 GERRIT_REFSPEC=$GERRIT_REFSPEC
355                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
356                 GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
357               node-parameters: true
358               kill-phase-on: NEVER
359               abort-all-job: true
360               git-revision: false
361       - multijob:
362           name: apex-fetch-logs
363           projects:
364             - name: 'apex-fetch-logs-{stream}'
365               current-parameters: true
366               predefined-parameters: |
367                 GERRIT_BRANCH=$GERRIT_BRANCH
368                 GERRIT_REFSPEC=$GERRIT_REFSPEC
369                 GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
370               node-parameters: true
371               kill-phase-on: NEVER
372               abort-all-job: true
373               git-revision: false
374
375 ########################
376 # builder macros
377 ########################
378 - builder:
379     name: apex-unit-test
380     builders:
381       - shell:
382           !include-raw: ./apex-unit-test.sh