blob: 08b6e78b8eafa46f4a832d0e20b228ff86a09621 [file] [log] [blame]
Devin Lim49200ec2018-01-19 16:17:41 -08001---
2# ONOS System Test Pipeline jobs
3
Devin Lim49200ec2018-01-19 16:17:41 -08004
5- test-free-job-boiler-plate: &test-free-job-boiler-plate
6 name: test-free-job-boiler-plate
7
8 project-type: freestyle
9
Devin Lim323c9872018-01-30 19:57:58 -080010- job-free-version-plate: &job-free-version-plate
11 name: job-free-version-plate
12 version:
Devin Lim323c9872018-01-30 19:57:58 -080013 - '1.12'
Devin Lim7550e022018-04-13 18:31:02 -070014 - '1.13'
You Wang7ab523d2018-08-20 15:03:43 -070015 - '1.14'
You Wangbefeecf2018-11-09 15:06:57 -080016 - '1.15'
You Wang30ff7442018-12-21 14:11:27 -080017 - '2.0'
Devin Lim323c9872018-01-30 19:57:58 -080018 - 'master'
19 - 'manually'
20
Devin Lim49200ec2018-01-19 16:17:41 -080021- test-free-init-procedure-plate: &test-free-init-procedure-plate
22 name: test-free-init-procedure-plate
23 project: OnosSystemTest
24 stream: 'master'
25
26- inject-env-variable-plate: &inject-env-variable-plate
27 name: inject-env-variable-plate
28 wrappers:
29 - inject:
30 properties-file: '/var/jenkins/TestONOS.property'
31 script-content: |
32 echo "ONOSBranch=$ONOSBranch" > /var/jenkins/TestONOS.property
33 echo "TestONBranch=$TestONBranch" >> /var/jenkins/TestONOS.property
34 echo "ONOSTag=$ONOSTag" >> /var/jenkins/TestONOS.property
35 echo "WikiPrefix=$WikiPrefix" >> /var/jenkins/TestONOS.property
36 override-build-parameters: true
37
38# post_Job
39- job-template:
40 name: postjob-{station-type}
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -080041 description: |
42 <!-- Managed by Jenkins Job Builder -->
43 Click on the "Last Successful Artifacts" to view all of the graphs (also accessible when logged out).<br />
44 <font color="red">Unless debugging, DO NOT MANUALLY BUILD THIS PIPELINE.</font><br />
45 <br />
46 Created by Devin Lim - devin@opennetworking.org<br />
47 Copyright (c) 2017 Open Networking Foundation (ONF)
Devin Lim49200ec2018-01-19 16:17:41 -080048
49 <<: *test-free-job-boiler-plate
50
51 properties:
52
53 - build-discarder:
54 num-to-keep: 1
55
56 parameters:
57
58 - lf-infra-parameters:
59 project: '{project}'
60 branch: '{stream}'
61 stream: '{stream}'
62 lftools-version: '{lftools-version}'
63
64 node: 'TestStation-{station-type}s'
65
66 publishers:
67
Devin Lim85722c32018-05-15 13:13:50 -070068 - archive:
69 artifacts: '*.jpg'
70
Devin Limb00d26a2018-02-01 17:27:59 -080071 - image-gallery:
72 - gallery-type: archived-images-gallery
73 title: 'Test result'
74 includes: '*.jpg'
Devin Lim49200ec2018-01-19 16:17:41 -080075
Devin Lim49200ec2018-01-19 16:17:41 -080076- job-template:
Devin Lima008a212018-04-09 16:01:55 -070077 name: test-station-log-cleanup-{clean-station-type}
Devin Lim02197b22018-05-10 17:09:38 -070078 id: test-station-log-cleanup
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -080079 description: |
80 <!-- Managed by Jenkins Job Builder -->
Devin Lim02197b22018-05-10 17:09:38 -070081 clean up periodically ~/OnosSystemTest/TestON/logs - delete logs older than {days_remove} days.
Devin Lim49200ec2018-01-19 16:17:41 -080082
83 <<: *test-free-job-boiler-plate
84 <<: *inject-env-variable-plate
85 properties:
86
87 - build-discarder:
88 num-to-keep: 30
89
90 parameters:
91
92 - string:
93 name: 'DAYS_OLD'
Devin Lim02197b22018-05-10 17:09:38 -070094 default: '{days_remove}'
Devin Lim49200ec2018-01-19 16:17:41 -080095
96 - lf-infra-parameters:
97 project: '{project}'
98 branch: '{stream}'
99 stream: '{stream}'
100 lftools-version: '{lftools-version}'
101
Devin Lima008a212018-04-09 16:01:55 -0700102 node: 'TestStation-{clean-station-type}s'
Devin Lim49200ec2018-01-19 16:17:41 -0800103
Devin Lim2b5ef2e2018-02-27 14:05:08 -0800104 triggers:
Devin Lim02197b22018-05-10 17:09:38 -0700105 - timed: '01 08 1{date} * *'
Devin Lim49200ec2018-01-19 16:17:41 -0800106
107 builders:
108
Devin Limb00d26a2018-02-01 17:27:59 -0800109 - shell: !include-raw-escape: vm-bm-clean-up.sh
Devin Lim49200ec2018-01-19 16:17:41 -0800110
111- job-template:
112 name: test-station-log-cleanup-CHO
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -0800113 description: |
114 <!-- Managed by Jenkins Job Builder -->
115
116
Devin Lim49200ec2018-01-19 16:17:41 -0800117
118 <<: *test-free-job-boiler-plate
Devin Limc284c982018-03-30 12:13:00 -0700119 wrappers:
120 - inject:
121 properties-file: '/var/lib/jenkins/TestONOS.property'
122 script-content: |
123 echo "ONOSBranch=$ONOSBranch" > /var/lib/jenkins/TestONOS.property
124 echo "TestONBranch=$TestONBranch" >> /var/lib/jenkins/TestONOS.property
125 echo "ONOSTag=$ONOSTag" >> /var/lib/jenkins/TestONOS.property
126 echo "WikiPrefix=$WikiPrefix" >> /var/lib/jenkins/TestONOS.property
127 override-build-parameters: true
128
129 # post_Job
Devin Lim49200ec2018-01-19 16:17:41 -0800130 properties:
131
132 - build-discarder:
133 num-to-keep: 15
134
135 parameters:
136
137 - string:
138 name: 'DAYS_OLD'
139 default: '15'
140
141 - lf-infra-parameters:
142 project: '{project}'
143 branch: '{stream}'
144 stream: '{stream}'
145 lftools-version: '{lftools-version}'
146
147 node: 'TestStation-CHOs'
148
Devin Lim2b5ef2e2018-02-27 14:05:08 -0800149 triggers:
150 - timed: '@daily'
Devin Lim49200ec2018-01-19 16:17:41 -0800151 builders:
152
Devin Limb00d26a2018-02-01 17:27:59 -0800153 - shell: !include-raw-escape: cho-clean-up.sh
Devin Lim18f459d2018-01-26 19:20:30 -0800154
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800155- job-template:
156 name: QA-check-style
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -0800157 description: |
158 <!-- Managed by Jenkins Job Builder -->
159 <h3>ONOS QA Code Style:</h3>
160 At Open Networking Foundation, we have adopted the <a href="https://github.com/mininet/mininet/wiki/Mininet-Python-Style">Mininet Python Style</a> for our drivers and testcases. The one exception is that TestON does not correctly parse multiline comments in testcases when the ending triple double quotes are on the same line as the comment. Therefore, in the testcases, the ending triple double quotes must be on it's own line.<br />
161 All .py files that are in the most recent patchset will be style checked.<br />
162 <br />
163 Jenkins User will give +1 if all files pass the style check, -1 if there is at least one style check failure.<br />
164 Jenkins will not comment on Gerrit if there are no .py files to test. This is caused by failing the job with exit code 2.<br />
165 <br />
166 Click on the link in the Gerrit patchset comment to view the results of the style check.<br />
167 Alternatively, you can check the console output to view the files checked and style check raw output.<br />
168 <br />
169 You may also manually run this job by selecting "Build with Parameters", then providing the 5-digit change number from Gerrit.<br />
170 <br />
171 <h3>Important Notes:</h3>
172 A build that is "Unstable" has failed the style check. A build with state "Error" means that there were no .py files to check.<br />
173 Build numbers that are 1 build apart may NOT necessarily correspond to the same patchset!<br />
174 Manually running this job will NOT leave a comment after the most recent patchset in Gerrit.<br />
175 <br />
176 <h3>Style Check PEP8 Exclusions:</h3>
177 This job mainly follows PEP8 style check, but excludes many errors and warnings.<br />
178 The following errors and warnings are excluded from the PEP8 check portion of the job:
179 <ul>
180 <li>E251</li>
181 <li>E201</li>
182 <li>E302</li>
183 <li>E202</li>
184 <li>E126</li>
185 <li>E127</li>
186 <li>E203</li>
187 <li>E226</li>
188 <li>E501</li>
189 <li>W391</li>
190 </ul>
191 <h3>Credits:</h3>
192 This job is modeled from <a href="https://jenkins.onosproject.org/view/all/job/onos-master-release-build-verify/">onos-master-release-build-verify</a><br />
193 The check style portion of the job is modeled from "HA-Jobs/codecheck_test"<br />
194 Created by Jeremy Ronquillo: jeremyr@opennetworking.org or j_ronquillo@u.pacific.edu<br />
195 <br />
196 Copyright (c) 2017 Open Networking Foundation (ONF)
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800197
198 <<: *test-free-job-boiler-plate
199 properties:
200
201 - build-discarder:
Devin Lim18f459d2018-01-26 19:20:30 -0800202 num-to-keep: 100
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800203
204 parameters:
205
206 - string:
Devin Lim18f459d2018-01-26 19:20:30 -0800207 name: 'GERRIT_CHANGE_NUMBER'
208 default: ''
209 description: '5-digit number that corresponds to the patch set change on Gerrit.'
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800210
211 - lf-infra-parameters:
212 project: '{project}'
213 branch: '{stream}'
214 stream: '{stream}'
215 lftools-version: '{lftools-version}'
216
Devin Lim18f459d2018-01-26 19:20:30 -0800217 concurrent: true
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800218
Devin Lim18f459d2018-01-26 19:20:30 -0800219 node: 'TestStation-Jeremys'
220
Devin Lim323c9872018-01-30 19:57:58 -0800221 triggers:
222 - gerrit:
Devin Lim491d92b2018-02-09 10:41:45 -0800223 server-name: 'OnosSystemTest Project Gerrit'
Devin Lim323c9872018-01-30 19:57:58 -0800224 trigger-on:
225 - patchset-created-event:
226 exclude-drafts: false
227 exclude-trivial-rebase: false
228 exclude-no-code-change: false
229 - draft-published-event
230 - comment-added-contains-event:
231 comment-contains-value: '(?i)^.*recheck$'
232 projects:
233 - project-compare-type: PLAIN
234 project-pattern: '{project}'
235 branches:
You Wanga70156d2018-08-07 14:36:46 -0700236 - branch-compare-type: REG_EXP
237 branch-pattern: '(master|onos-1.(1[3-9]|[2-9][0-9]))'
Devin Lim323c9872018-01-30 19:57:58 -0800238 wrappers:
239 - lf-infra-wrappers:
240 build-timeout: 1800
241 jenkins-ssh-credential: '{jenkins-ssh-credential}'
242
Devin Lim18f459d2018-01-26 19:20:30 -0800243 builders:
Devin Lime65e71c2018-02-09 15:01:33 -0800244 - shell: !include-raw-escape: check-style.sh
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800245
Devin Limb00d26a2018-02-01 17:27:59 -0800246 publishers:
247 - warnings:
248 workspace-file-scanners:
249 - file-pattern: pep8Result.txt
250 scanner: Pep8
Devin Lime65e71c2018-02-09 15:01:33 -0800251 total-thresholds:
252 unstable:
253 total-all: 1
Devin Lim323c9872018-01-30 19:57:58 -0800254
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800255- job-template:
256 name: delta-nightly
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -0800257 description: |
258 <!-- Managed by Jenkins Job Builder -->
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800259
260 <<: *test-free-job-boiler-plate
261 properties:
262
263 - build-discarder:
264 num-to-keep: 30
265
266 parameters:
267
268 - string:
269 name: 'NIGHTLY_FILE_NAME'
270 default: ''
271 description: |
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -0800272 Name of ONOS nightly build file <br />
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800273 will be set to the latest file if not specified here
274
275 - string:
276 name: 'ONOS_VERSION'
277 default: '1.11.0'
278 description: 'Version number in ONOS nightly build file'
279
280 - string:
281 name: 'DELTA_PATH'
282 default: '/home/sdn'
283 description: 'Path of DELTA project'
284
285 - string:
286 name: 'WIKI_PREFIX'
287 default: 'master'
288
289 - bool:
290 name: 'CLEANUP'
291 default: true
292
293 - lf-infra-parameters:
294 project: '{project}'
295 branch: '{stream}'
296 stream: '{stream}'
297 lftools-version: '{lftools-version}'
298
299 node: 'TestStation-BMs'
300
301 wrappers:
302 - inject:
303 properties-file: '/var/jenkins/TestONOS.property'
304
305 builders:
306
307 - shell: !include-raw-escape: delta-script.sh
308
Devin Limb00d26a2018-02-01 17:27:59 -0800309 publishers:
310 - plot:
311 - title: 'DELTA Test Results for master'
312 group: 'DELTA-nightly'
313 yaxis: 'Number of test cases'
314 style: line
315 series:
316 - file: 'DELTA-nightly.csv'
317 format: 'csv'
318
319 # Todo : add confluence ( use pipeline for post build ..? )
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800320
Devin Lim18f459d2018-01-26 19:20:30 -0800321- job-template:
322 name: init-CHO
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -0800323 description: |
324 <!-- Managed by Jenkins Job Builder -->
325 1) Set a specific onos branch to test; <br />
326 2) pull and checkout the branch; <br />
327 3) build onos and package to tar.gz <br />
Devin Lim18f459d2018-01-26 19:20:30 -0800328
329 <<: *test-free-job-boiler-plate
330 properties:
331
332 - build-discarder:
333 num-to-keep: 30
334
335 parameters:
336
337 - string:
338 name: 'ONOSBranch'
339 default: 'master'
340 description: |
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -0800341 set onos branch to test. default to "master", <br />
342 but can also be set at "onos-1.2", etc. <br />
Devin Lim18f459d2018-01-26 19:20:30 -0800343 This parameter is also use to trigger where the test results to be posted
344
345 - string:
346 name: 'ONOSJVMHeap'
347 default: "\"${{JAVA_OPTS:--Xms8G -Xmx8G}}\""
348 description: 'onos cell jvm heap size setting'
349
350 - string:
351 name: 'TestONBranch'
352 default: 'master'
353 description: 'sets TestON branch'
354
355 - string:
356 name: 'ONOSTag'
357 default: ''
358
359 - lf-infra-parameters:
360 project: '{project}'
361 branch: '{stream}'
362 stream: '{stream}'
363 lftools-version: '{lftools-version}'
364
Devin Lim0e1bac02018-04-24 17:46:59 -0700365 node: 'TestStation-Fabric5s'
Devin Lim18f459d2018-01-26 19:20:30 -0800366
367 wrappers:
368 - inject:
369 properties-file: '/var/lib/jenkins/TestONOS.property'
370 script-content: |
371 echo "ONOSBranch=$ONOSBranch" > /var/lib/jenkins/TestONOS.property
372 echo "TestONBranch=$TestONBranch" >> /var/lib/jenkins/TestONOS.property
373 echo "ONOSTag=$ONOSTag" >> /var/lib/jenkins/TestONOS.property
374
375 override-build-parameters: true
376
377 builders:
378
379 - shell: !include-raw-escape: cho-init.sh
380
381- job-template:
382 name: running-CHO
383
384 <<: *test-free-job-boiler-plate
385 properties:
386
387 - build-discarder:
388 num-to-keep: 30
389
390 parameters:
391
392 - lf-infra-parameters:
393 project: '{project}'
394 branch: '{stream}'
395 stream: '{stream}'
396 lftools-version: '{lftools-version}'
397
Devin Lim0e1bac02018-04-24 17:46:59 -0700398 node: 'TestStation-Fabric5s'
Devin Lim18f459d2018-01-26 19:20:30 -0800399 triggers:
400 - reverse:
401 jobs: 'init-CHO'
402 result: 'failure'
403
404 builders:
405
406 - shell: !include-raw-escape: running-cho.sh
407
408- job-template:
You Wange59d3442018-05-25 14:04:05 -0700409 name: 'SR-log-{version}'
410 id: SR-log-storage
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800411
Devin Lim323c9872018-01-30 19:57:58 -0800412 <<: *test-free-job-boiler-plate
413 properties:
414
415 - build-discarder:
Devin Lim1c4753e2018-03-23 15:31:38 -0700416 num-to-keep: 50
Devin Lim323c9872018-01-30 19:57:58 -0800417
418 parameters:
419
420 - lf-infra-parameters:
421 project: '{project}'
422 branch: '{stream}'
423 stream: '{stream}'
424 lftools-version: '{lftools-version}'
425
You Wange59d3442018-05-25 14:04:05 -0700426 node: 'TestStation-Fabric{fabricOn}s'
Devin Lim323c9872018-01-30 19:57:58 -0800427 publishers:
428
429 - archive:
Devin Limb00d26a2018-02-01 17:27:59 -0800430 artifacts: '*'
431
432- job-template:
433 name: test-HA
434
435 <<: *test-free-job-boiler-plate
436 properties:
437
438 - build-discarder:
439
440 days-to-keep: 5
441 num-to-keep: 100
442
443 parameters:
444
445 - string:
446 name: 'TEST_NAME'
447 default: 'HAbackupRecover'
448 description: 'The name of the TestON test suite'
449
450 - lf-infra-parameters:
451 project: '{project}'
452 branch: '{stream}'
453 stream: '{stream}'
454 lftools-version: '{lftools-version}'
455
456 node: 'TestStation-Jons'
457 triggers:
458 - reverse:
459 jobs: 'test-HA'
460 result: 'failure'
461
462 builders:
463
464 - shell: !include-raw-escape: test-ha.sh
465
466 publishers:
467 - plot:
468 - title: 'Test job results'
469 group: 'Test-HA'
470 yaxis: 'Number of test cases'
471 style: line
472 series:
473 - file: 'results.csv'
474 format: 'csv'
475
476 - title: 'Timers'
477 group: 'Test-HA'
478 yaxis: 'Time in seconds'
479 style: line
480 series:
481 - file: 'Timers.csv'
482 format: 'csv'
483
484 - post-tasks:
485 - escalate-status: true
486 script: |
487 if [ -e ${{WORKSPACE}}/${{TEST_NAME##*/}}Wiki.txt ] && ! grep -q "FAIL" ${{WORKSPACE}}/${{TEST_NAME##*/}}Wiki.txt
488 then
489 exit 0
490 else
491 exit 1
492 fi
Devin Lim49200ec2018-01-19 16:17:41 -0800493
494- project:
495 name: post-result-jobs
496 project-name: post-result-jobs
497
498 <<: *test-free-init-procedure-plate
Devin Lim49200ec2018-01-19 16:17:41 -0800499 jobs:
Devin Lim02197b22018-05-10 17:09:38 -0700500 - 'postjob-{station-type}':
501 station-type:
502 - 'VM'
503 - 'BM'
504 - 'Fabric'
505 - 'Fabric2'
506 - 'Fabric3'
You Wange59d3442018-05-25 14:04:05 -0700507 - 'Fabric4'
Devin Lim02197b22018-05-10 17:09:38 -0700508 - 'Fabric5'
Devin Lim49200ec2018-01-19 16:17:41 -0800509
510- project:
511 name: cleanup-jobs
512 project-name: cleanup-jobs
513
514 <<: *test-free-init-procedure-plate
Devin Lim49200ec2018-01-19 16:17:41 -0800515 jobs:
Devin Lim02197b22018-05-10 17:09:38 -0700516 - 'test-station-log-cleanup':
517 clean-station-type:
518 - 'BM'
519 - 'Fabric'
520 - 'Fabric2'
521 - 'Fabric3'
522 - 'Fabric4'
523 days_remove: '30'
524 date: ''
525
526 - 'test-station-log-cleanup':
527 clean-station-type:
528 - 'VM'
529 - 'Fabric5'
530 days_remove: '15'
531 date: ',15'
532
Devin Lim49200ec2018-01-19 16:17:41 -0800533 - 'test-station-log-cleanup-CHO'
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800534
535- project:
536 name: check-style
537 project-name: check-style
538
539 <<: *test-free-init-procedure-plate
540 jobs:
541 - 'QA-check-style'
542
543- project:
544 name: delta-test
545 project-name: delta-test
546
547 <<: *test-free-init-procedure-plate
548 jobs:
549 - 'delta-nightly'
Devin Lim7d7cd992018-01-25 14:12:40 -0800550
Devin Lim18f459d2018-01-26 19:20:30 -0800551- project:
552 name: cho-tests
553 project-name: cho-tests
554
555 <<: *test-free-init-procedure-plate
556 jobs:
557 - 'init-CHO'
558 - 'running-CHO'
Devin Lim323c9872018-01-30 19:57:58 -0800559
560- project:
561 name: log-pipeline
562
Devin Lim323c9872018-01-30 19:57:58 -0800563 project-name: 'log-pipeline'
564
565 <<: *test-free-init-procedure-plate
566
You Wang30ff7442018-12-21 14:11:27 -0800567 sr-version-before-previous: '2.0'
You Wangbefeecf2018-11-09 15:06:57 -0800568 sr-version-previous: '1.15'
You Wang5b70d8c2018-05-25 17:02:59 -0700569 sr-version-current: 'master'
Devin Limf57a9eb2018-04-13 20:00:46 -0700570
Devin Lim323c9872018-01-30 19:57:58 -0800571 jobs:
You Wange59d3442018-05-25 14:04:05 -0700572 - 'SR-log-storage':
573 version: '{sr-version-current}'
574 fabricOn: '4'
575 - 'SR-log-storage':
576 version: '{sr-version-previous}'
577 fabricOn: '2'
578 - 'SR-log-storage':
579 version: '{sr-version-before-previous}'
580 fabricOn: '3'
Devin Limb00d26a2018-02-01 17:27:59 -0800581
582- project:
Devin Limb2965252018-04-09 17:34:14 -0700583 name: personal-station
Devin Limb00d26a2018-02-01 17:27:59 -0800584
Devin Limb2965252018-04-09 17:34:14 -0700585 project-name: 'personal-station'
Devin Limb00d26a2018-02-01 17:27:59 -0800586
587 <<: *test-free-init-procedure-plate
588
589 jobs:
590 - 'test-HA'
Devin Lim157404d2018-02-09 16:44:19 -0800591