blob: ca5d837632880a310cf1b4ffd2051d7206cbd6f7 [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
10- init-station-plate: &init-station-plate
11 name: init-station-plate
12 station-type:
13 - 'VM'
14 - 'BM'
Devin Lim1c4753e2018-03-23 15:31:38 -070015 - 'Fabric'
Devin Lima5019ff2018-04-06 12:50:15 -070016 - 'Fabric2'
17 - 'Fabric3'
Devin Lim49200ec2018-01-19 16:17:41 -080018
Devin Lim323c9872018-01-30 19:57:58 -080019- job-free-version-plate: &job-free-version-plate
20 name: job-free-version-plate
21 version:
22 - '1.11'
23 - '1.12'
24 - 'master'
25 - 'manually'
26
Devin Lim49200ec2018-01-19 16:17:41 -080027- test-free-init-procedure-plate: &test-free-init-procedure-plate
28 name: test-free-init-procedure-plate
29 project: OnosSystemTest
30 stream: 'master'
31
32- inject-env-variable-plate: &inject-env-variable-plate
33 name: inject-env-variable-plate
34 wrappers:
35 - inject:
36 properties-file: '/var/jenkins/TestONOS.property'
37 script-content: |
38 echo "ONOSBranch=$ONOSBranch" > /var/jenkins/TestONOS.property
39 echo "TestONBranch=$TestONBranch" >> /var/jenkins/TestONOS.property
40 echo "ONOSTag=$ONOSTag" >> /var/jenkins/TestONOS.property
41 echo "WikiPrefix=$WikiPrefix" >> /var/jenkins/TestONOS.property
42 override-build-parameters: true
43
44# post_Job
45- job-template:
46 name: postjob-{station-type}
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -080047 description: |
48 <!-- Managed by Jenkins Job Builder -->
49 Click on the "Last Successful Artifacts" to view all of the graphs (also accessible when logged out).<br />
50 <font color="red">Unless debugging, DO NOT MANUALLY BUILD THIS PIPELINE.</font><br />
51 <br />
52 Created by Devin Lim - devin@opennetworking.org<br />
53 Copyright (c) 2017 Open Networking Foundation (ONF)
Devin Lim49200ec2018-01-19 16:17:41 -080054
55 <<: *test-free-job-boiler-plate
56
57 properties:
58
59 - build-discarder:
60 num-to-keep: 1
61
62 parameters:
63
64 - lf-infra-parameters:
65 project: '{project}'
66 branch: '{stream}'
67 stream: '{stream}'
68 lftools-version: '{lftools-version}'
69
70 node: 'TestStation-{station-type}s'
71
72 publishers:
73
Devin Limb00d26a2018-02-01 17:27:59 -080074 - image-gallery:
75 - gallery-type: archived-images-gallery
76 title: 'Test result'
77 includes: '*.jpg'
Devin Lim49200ec2018-01-19 16:17:41 -080078
79 - archive:
80 artifacts: '*.jpg'
81
Devin Lim49200ec2018-01-19 16:17:41 -080082- job-template:
83 name: test-station-log-cleanup-VM
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -080084 description: |
85 <!-- Managed by Jenkins Job Builder -->
86 clean up periodically ~/OnosSystemTest/TestON/logs - delete logs older than $DAYS_OLD days.
Devin Lim49200ec2018-01-19 16:17:41 -080087
88 <<: *test-free-job-boiler-plate
89 <<: *inject-env-variable-plate
90 properties:
91
92 - build-discarder:
93 num-to-keep: 30
94
95 parameters:
96
97 - string:
98 name: 'DAYS_OLD'
99 default: '15'
100
101 - lf-infra-parameters:
102 project: '{project}'
103 branch: '{stream}'
104 stream: '{stream}'
105 lftools-version: '{lftools-version}'
106
107 node: 'TestStation-VMs'
108
Devin Lim2b5ef2e2018-02-27 14:05:08 -0800109 triggers:
110 - timed: '01 08 1,15 * *'
Devin Lim49200ec2018-01-19 16:17:41 -0800111 builders:
112
Devin Limb00d26a2018-02-01 17:27:59 -0800113 - shell: !include-raw-escape: vm-bm-clean-up.sh
Devin Lim49200ec2018-01-19 16:17:41 -0800114
115- job-template:
116 name: test-station-log-cleanup-BM
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -0800117 description: |
118 <!-- Managed by Jenkins Job Builder -->
119 clean up periodically ~/OnosSystemTest/TestON/logs - delete logs older than $DAYS_OLD days.
Devin Lim49200ec2018-01-19 16:17:41 -0800120
121 <<: *test-free-job-boiler-plate
122 <<: *inject-env-variable-plate
123 properties:
124
125 - build-discarder:
126 num-to-keep: 30
127
128 parameters:
129
130 - string:
131 name: 'DAYS_OLD'
132 default: '30'
133
134 - lf-infra-parameters:
135 project: '{project}'
136 branch: '{stream}'
137 stream: '{stream}'
138 lftools-version: '{lftools-version}'
139
140 node: 'TestStation-BMs'
141
Devin Lim2b5ef2e2018-02-27 14:05:08 -0800142 triggers:
143 - timed: '01 08 1 * *'
Devin Lim49200ec2018-01-19 16:17:41 -0800144
145 builders:
146
Devin Limb00d26a2018-02-01 17:27:59 -0800147 - shell: !include-raw-escape: vm-bm-clean-up.sh
Devin Lim49200ec2018-01-19 16:17:41 -0800148
149- job-template:
150 name: test-station-log-cleanup-CHO
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -0800151 description: |
152 <!-- Managed by Jenkins Job Builder -->
153
154
Devin Lim49200ec2018-01-19 16:17:41 -0800155
156 <<: *test-free-job-boiler-plate
Devin Limc284c982018-03-30 12:13:00 -0700157 wrappers:
158 - inject:
159 properties-file: '/var/lib/jenkins/TestONOS.property'
160 script-content: |
161 echo "ONOSBranch=$ONOSBranch" > /var/lib/jenkins/TestONOS.property
162 echo "TestONBranch=$TestONBranch" >> /var/lib/jenkins/TestONOS.property
163 echo "ONOSTag=$ONOSTag" >> /var/lib/jenkins/TestONOS.property
164 echo "WikiPrefix=$WikiPrefix" >> /var/lib/jenkins/TestONOS.property
165 override-build-parameters: true
166
167 # post_Job
Devin Lim49200ec2018-01-19 16:17:41 -0800168 properties:
169
170 - build-discarder:
171 num-to-keep: 15
172
173 parameters:
174
175 - string:
176 name: 'DAYS_OLD'
177 default: '15'
178
179 - lf-infra-parameters:
180 project: '{project}'
181 branch: '{stream}'
182 stream: '{stream}'
183 lftools-version: '{lftools-version}'
184
185 node: 'TestStation-CHOs'
186
Devin Lim2b5ef2e2018-02-27 14:05:08 -0800187 triggers:
188 - timed: '@daily'
Devin Lim49200ec2018-01-19 16:17:41 -0800189 builders:
190
Devin Limb00d26a2018-02-01 17:27:59 -0800191 - shell: !include-raw-escape: cho-clean-up.sh
Devin Lim18f459d2018-01-26 19:20:30 -0800192
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800193- job-template:
194 name: QA-check-style
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -0800195 description: |
196 <!-- Managed by Jenkins Job Builder -->
197 <h3>ONOS QA Code Style:</h3>
198 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 />
199 All .py files that are in the most recent patchset will be style checked.<br />
200 <br />
201 Jenkins User will give +1 if all files pass the style check, -1 if there is at least one style check failure.<br />
202 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 />
203 <br />
204 Click on the link in the Gerrit patchset comment to view the results of the style check.<br />
205 Alternatively, you can check the console output to view the files checked and style check raw output.<br />
206 <br />
207 You may also manually run this job by selecting "Build with Parameters", then providing the 5-digit change number from Gerrit.<br />
208 <br />
209 <h3>Important Notes:</h3>
210 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 />
211 Build numbers that are 1 build apart may NOT necessarily correspond to the same patchset!<br />
212 Manually running this job will NOT leave a comment after the most recent patchset in Gerrit.<br />
213 <br />
214 <h3>Style Check PEP8 Exclusions:</h3>
215 This job mainly follows PEP8 style check, but excludes many errors and warnings.<br />
216 The following errors and warnings are excluded from the PEP8 check portion of the job:
217 <ul>
218 <li>E251</li>
219 <li>E201</li>
220 <li>E302</li>
221 <li>E202</li>
222 <li>E126</li>
223 <li>E127</li>
224 <li>E203</li>
225 <li>E226</li>
226 <li>E501</li>
227 <li>W391</li>
228 </ul>
229 <h3>Credits:</h3>
230 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 />
231 The check style portion of the job is modeled from "HA-Jobs/codecheck_test"<br />
232 Created by Jeremy Ronquillo: jeremyr@opennetworking.org or j_ronquillo@u.pacific.edu<br />
233 <br />
234 Copyright (c) 2017 Open Networking Foundation (ONF)
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800235
236 <<: *test-free-job-boiler-plate
237 properties:
238
239 - build-discarder:
Devin Lim18f459d2018-01-26 19:20:30 -0800240 num-to-keep: 100
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800241
242 parameters:
243
244 - string:
Devin Lim18f459d2018-01-26 19:20:30 -0800245 name: 'GERRIT_CHANGE_NUMBER'
246 default: ''
247 description: '5-digit number that corresponds to the patch set change on Gerrit.'
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800248
249 - lf-infra-parameters:
250 project: '{project}'
251 branch: '{stream}'
252 stream: '{stream}'
253 lftools-version: '{lftools-version}'
254
Devin Lim18f459d2018-01-26 19:20:30 -0800255 concurrent: true
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800256
Devin Lim18f459d2018-01-26 19:20:30 -0800257 node: 'TestStation-Jeremys'
258
Devin Lim323c9872018-01-30 19:57:58 -0800259 triggers:
260 - gerrit:
Devin Lim491d92b2018-02-09 10:41:45 -0800261 server-name: 'OnosSystemTest Project Gerrit'
Devin Lim323c9872018-01-30 19:57:58 -0800262 trigger-on:
263 - patchset-created-event:
264 exclude-drafts: false
265 exclude-trivial-rebase: false
266 exclude-no-code-change: false
267 - draft-published-event
268 - comment-added-contains-event:
269 comment-contains-value: '(?i)^.*recheck$'
270 projects:
271 - project-compare-type: PLAIN
272 project-pattern: '{project}'
273 branches:
274 - branch-compare-type: ANT
Devin Lim491d92b2018-02-09 10:41:45 -0800275 branch-pattern: '**/master'
Devin Limb00d26a2018-02-01 17:27:59 -0800276 - branch-compare-type: ANT
Devin Lim491d92b2018-02-09 10:41:45 -0800277 branch-pattern: '**/onos-1.[11-20]'
Devin Lim323c9872018-01-30 19:57:58 -0800278 wrappers:
279 - lf-infra-wrappers:
280 build-timeout: 1800
281 jenkins-ssh-credential: '{jenkins-ssh-credential}'
282
Devin Lim18f459d2018-01-26 19:20:30 -0800283 builders:
Devin Lime65e71c2018-02-09 15:01:33 -0800284 - shell: !include-raw-escape: check-style.sh
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800285
Devin Limb00d26a2018-02-01 17:27:59 -0800286 publishers:
287 - warnings:
288 workspace-file-scanners:
289 - file-pattern: pep8Result.txt
290 scanner: Pep8
Devin Lime65e71c2018-02-09 15:01:33 -0800291 total-thresholds:
292 unstable:
293 total-all: 1
Devin Lim323c9872018-01-30 19:57:58 -0800294
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800295- job-template:
296 name: delta-nightly
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -0800297 description: |
298 <!-- Managed by Jenkins Job Builder -->
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800299
300 <<: *test-free-job-boiler-plate
301 properties:
302
303 - build-discarder:
304 num-to-keep: 30
305
306 parameters:
307
308 - string:
309 name: 'NIGHTLY_FILE_NAME'
310 default: ''
311 description: |
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -0800312 Name of ONOS nightly build file <br />
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800313 will be set to the latest file if not specified here
314
315 - string:
316 name: 'ONOS_VERSION'
317 default: '1.11.0'
318 description: 'Version number in ONOS nightly build file'
319
320 - string:
321 name: 'DELTA_PATH'
322 default: '/home/sdn'
323 description: 'Path of DELTA project'
324
325 - string:
326 name: 'WIKI_PREFIX'
327 default: 'master'
328
329 - bool:
330 name: 'CLEANUP'
331 default: true
332
333 - lf-infra-parameters:
334 project: '{project}'
335 branch: '{stream}'
336 stream: '{stream}'
337 lftools-version: '{lftools-version}'
338
339 node: 'TestStation-BMs'
340
341 wrappers:
342 - inject:
343 properties-file: '/var/jenkins/TestONOS.property'
344
345 builders:
346
347 - shell: !include-raw-escape: delta-script.sh
348
Devin Limb00d26a2018-02-01 17:27:59 -0800349 publishers:
350 - plot:
351 - title: 'DELTA Test Results for master'
352 group: 'DELTA-nightly'
353 yaxis: 'Number of test cases'
354 style: line
355 series:
356 - file: 'DELTA-nightly.csv'
357 format: 'csv'
358
359 # Todo : add confluence ( use pipeline for post build ..? )
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800360
Devin Lim18f459d2018-01-26 19:20:30 -0800361- job-template:
362 name: init-CHO
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -0800363 description: |
364 <!-- Managed by Jenkins Job Builder -->
365 1) Set a specific onos branch to test; <br />
366 2) pull and checkout the branch; <br />
367 3) build onos and package to tar.gz <br />
Devin Lim18f459d2018-01-26 19:20:30 -0800368
369 <<: *test-free-job-boiler-plate
370 properties:
371
372 - build-discarder:
373 num-to-keep: 30
374
375 parameters:
376
377 - string:
378 name: 'ONOSBranch'
379 default: 'master'
380 description: |
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -0800381 set onos branch to test. default to "master", <br />
382 but can also be set at "onos-1.2", etc. <br />
Devin Lim18f459d2018-01-26 19:20:30 -0800383 This parameter is also use to trigger where the test results to be posted
384
385 - string:
386 name: 'ONOSJVMHeap'
387 default: "\"${{JAVA_OPTS:--Xms8G -Xmx8G}}\""
388 description: 'onos cell jvm heap size setting'
389
390 - string:
391 name: 'TestONBranch'
392 default: 'master'
393 description: 'sets TestON branch'
394
395 - string:
396 name: 'ONOSTag'
397 default: ''
398
399 - lf-infra-parameters:
400 project: '{project}'
401 branch: '{stream}'
402 stream: '{stream}'
403 lftools-version: '{lftools-version}'
404
405 node: 'TestStation-CHOs'
406
407 wrappers:
408 - inject:
409 properties-file: '/var/lib/jenkins/TestONOS.property'
410 script-content: |
411 echo "ONOSBranch=$ONOSBranch" > /var/lib/jenkins/TestONOS.property
412 echo "TestONBranch=$TestONBranch" >> /var/lib/jenkins/TestONOS.property
413 echo "ONOSTag=$ONOSTag" >> /var/lib/jenkins/TestONOS.property
414
415 override-build-parameters: true
416
417 builders:
418
419 - shell: !include-raw-escape: cho-init.sh
420
421- job-template:
422 name: running-CHO
423
424 <<: *test-free-job-boiler-plate
425 properties:
426
427 - build-discarder:
428 num-to-keep: 30
429
430 parameters:
431
432 - lf-infra-parameters:
433 project: '{project}'
434 branch: '{stream}'
435 stream: '{stream}'
436 lftools-version: '{lftools-version}'
437
438 node: 'TestStation-CHOs'
439 triggers:
440 - reverse:
441 jobs: 'init-CHO'
442 result: 'failure'
443
444 builders:
445
446 - shell: !include-raw-escape: running-cho.sh
447
448- job-template:
449 name: post-CHO-master
450
451 <<: *test-free-job-boiler-plate
452 properties:
453 - lf-infra-properties:
454 project: '{project}'
455 build-days-to-keep: 7
456
457 parameters:
458
459 - lf-infra-parameters:
460 project: '{project}'
461 branch: '{stream}'
462 stream: '{stream}'
463 lftools-version: '{lftools-version}'
464
465 node: 'TestStation-CHOs'
Devin Lim2b5ef2e2018-02-27 14:05:08 -0800466 triggers:
467 - timed: 'H/60 * * * *'
Devin Lim18f459d2018-01-26 19:20:30 -0800468 wrappers:
469 - inject:
470 properties-file: '/var/lib/jenkins/TestONOS.property'
471 builders:
472
473 - shell: !include-raw-escape: cho-post.sh
Devin Limb00d26a2018-02-01 17:27:59 -0800474 publishers:
475 - plot:
476 - title: 'Network, Application and ONOS Events (per hour)'
477 group: 'CHOTestMonkey'
478 num-builds: '72'
479 yaxis: 'Number of Events'
480 style: line
481 logarithmic-yaxis: true
482 series:
483 - file: 'event.csv'
484 format: 'csv'
485 - title: 'Failed Checks (per hour)'
486 group: 'CHOTestMonkey'
487 num-builds: '72'
488 yaxis: 'Number of Failed Checks'
489 style: line
490 logarithmic-yaxis: true
491 series:
492 - file: 'failure.csv'
493 format: 'csv'
494 - title: 'Warnings, Errors and Exceptions from Logs (per hour)'
495 group: 'CHOTestMonkey'
496 num-builds: '72'
497 yaxis: 'Number of Warnings or Errors'
498 style: line
499 logarithmic-yaxis: true
500 series:
501 - file: 'error.csv'
502 format: 'csv'
Devin Lim18f459d2018-01-26 19:20:30 -0800503
Devin Lim323c9872018-01-30 19:57:58 -0800504- job-template:
505 name: 'SR-log-{version}'
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800506
Devin Lim323c9872018-01-30 19:57:58 -0800507 <<: *test-free-job-boiler-plate
508 properties:
509
510 - build-discarder:
Devin Lim1c4753e2018-03-23 15:31:38 -0700511 num-to-keep: 50
Devin Lim323c9872018-01-30 19:57:58 -0800512
513 parameters:
514
515 - lf-infra-parameters:
516 project: '{project}'
517 branch: '{stream}'
518 stream: '{stream}'
519 lftools-version: '{lftools-version}'
520
Devin Limdc298c92018-03-24 13:47:08 -0700521 node: 'TestStation-Fabrics'
Devin Lim323c9872018-01-30 19:57:58 -0800522 publishers:
523
524 - archive:
Devin Limb00d26a2018-02-01 17:27:59 -0800525 artifacts: '*'
526
527- job-template:
528 name: test-HA
529
530 <<: *test-free-job-boiler-plate
531 properties:
532
533 - build-discarder:
534
535 days-to-keep: 5
536 num-to-keep: 100
537
538 parameters:
539
540 - string:
541 name: 'TEST_NAME'
542 default: 'HAbackupRecover'
543 description: 'The name of the TestON test suite'
544
545 - lf-infra-parameters:
546 project: '{project}'
547 branch: '{stream}'
548 stream: '{stream}'
549 lftools-version: '{lftools-version}'
550
551 node: 'TestStation-Jons'
552 triggers:
553 - reverse:
554 jobs: 'test-HA'
555 result: 'failure'
556
557 builders:
558
559 - shell: !include-raw-escape: test-ha.sh
560
561 publishers:
562 - plot:
563 - title: 'Test job results'
564 group: 'Test-HA'
565 yaxis: 'Number of test cases'
566 style: line
567 series:
568 - file: 'results.csv'
569 format: 'csv'
570
571 - title: 'Timers'
572 group: 'Test-HA'
573 yaxis: 'Time in seconds'
574 style: line
575 series:
576 - file: 'Timers.csv'
577 format: 'csv'
578
579 - post-tasks:
580 - escalate-status: true
581 script: |
582 if [ -e ${{WORKSPACE}}/${{TEST_NAME##*/}}Wiki.txt ] && ! grep -q "FAIL" ${{WORKSPACE}}/${{TEST_NAME##*/}}Wiki.txt
583 then
584 exit 0
585 else
586 exit 1
587 fi
Devin Lim49200ec2018-01-19 16:17:41 -0800588
589- project:
590 name: post-result-jobs
591 project-name: post-result-jobs
592
593 <<: *test-free-init-procedure-plate
594 <<: *init-station-plate
595 jobs:
596 - 'postjob-{station-type}'
597
598- project:
599 name: cleanup-jobs
600 project-name: cleanup-jobs
601
602 <<: *test-free-init-procedure-plate
603 <<: *init-station-plate
604 jobs:
605 - 'test-station-log-cleanup-VM'
606 - 'test-station-log-cleanup-BM'
607 - 'test-station-log-cleanup-CHO'
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800608
609- project:
610 name: check-style
611 project-name: check-style
612
613 <<: *test-free-init-procedure-plate
614 jobs:
615 - 'QA-check-style'
616
617- project:
618 name: delta-test
619 project-name: delta-test
620
621 <<: *test-free-init-procedure-plate
622 jobs:
623 - 'delta-nightly'
Devin Lim7d7cd992018-01-25 14:12:40 -0800624
Devin Lim18f459d2018-01-26 19:20:30 -0800625- project:
626 name: cho-tests
627 project-name: cho-tests
628
629 <<: *test-free-init-procedure-plate
630 jobs:
631 - 'init-CHO'
632 - 'running-CHO'
633 - 'post-CHO-master'
Devin Lim323c9872018-01-30 19:57:58 -0800634
635
636- project:
637 name: log-pipeline
638
639 <<: *job-free-version-plate
640
641 project-name: 'log-pipeline'
642
643 <<: *test-free-init-procedure-plate
644
645 jobs:
646 - 'SR-log-{version}'
Devin Limb00d26a2018-02-01 17:27:59 -0800647
648- project:
649 name: personnel-station
650
651 project-name: 'log-pipeline'
652
653 <<: *test-free-init-procedure-plate
654
655 jobs:
656 - 'test-HA'
Devin Lim157404d2018-02-09 16:44:19 -0800657