blob: a651ad34d5dfc79f0a79ef590811f9b6c1c9ed4c [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:
13 - '1.11'
14 - '1.12'
Devin Lim7550e022018-04-13 18:31:02 -070015 - '1.13'
Devin Lim323c9872018-01-30 19:57:58 -080016 - 'master'
17 - 'manually'
18
Devin Lim49200ec2018-01-19 16:17:41 -080019- test-free-init-procedure-plate: &test-free-init-procedure-plate
20 name: test-free-init-procedure-plate
21 project: OnosSystemTest
22 stream: 'master'
23
24- inject-env-variable-plate: &inject-env-variable-plate
25 name: inject-env-variable-plate
26 wrappers:
27 - inject:
28 properties-file: '/var/jenkins/TestONOS.property'
29 script-content: |
30 echo "ONOSBranch=$ONOSBranch" > /var/jenkins/TestONOS.property
31 echo "TestONBranch=$TestONBranch" >> /var/jenkins/TestONOS.property
32 echo "ONOSTag=$ONOSTag" >> /var/jenkins/TestONOS.property
33 echo "WikiPrefix=$WikiPrefix" >> /var/jenkins/TestONOS.property
34 override-build-parameters: true
35
36# post_Job
37- job-template:
38 name: postjob-{station-type}
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -080039 description: |
40 <!-- Managed by Jenkins Job Builder -->
41 Click on the "Last Successful Artifacts" to view all of the graphs (also accessible when logged out).<br />
42 <font color="red">Unless debugging, DO NOT MANUALLY BUILD THIS PIPELINE.</font><br />
43 <br />
44 Created by Devin Lim - devin@opennetworking.org<br />
45 Copyright (c) 2017 Open Networking Foundation (ONF)
Devin Lim49200ec2018-01-19 16:17:41 -080046
47 <<: *test-free-job-boiler-plate
48
49 properties:
50
51 - build-discarder:
52 num-to-keep: 1
53
54 parameters:
55
56 - lf-infra-parameters:
57 project: '{project}'
58 branch: '{stream}'
59 stream: '{stream}'
60 lftools-version: '{lftools-version}'
61
62 node: 'TestStation-{station-type}s'
63
64 publishers:
65
Devin Lim85722c32018-05-15 13:13:50 -070066 - archive:
67 artifacts: '*.jpg'
68
Devin Limb00d26a2018-02-01 17:27:59 -080069 - image-gallery:
70 - gallery-type: archived-images-gallery
71 title: 'Test result'
72 includes: '*.jpg'
Devin Lim49200ec2018-01-19 16:17:41 -080073
Devin Lim49200ec2018-01-19 16:17:41 -080074- job-template:
Devin Lima008a212018-04-09 16:01:55 -070075 name: test-station-log-cleanup-{clean-station-type}
Devin Lim02197b22018-05-10 17:09:38 -070076 id: test-station-log-cleanup
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -080077 description: |
78 <!-- Managed by Jenkins Job Builder -->
Devin Lim02197b22018-05-10 17:09:38 -070079 clean up periodically ~/OnosSystemTest/TestON/logs - delete logs older than {days_remove} days.
Devin Lim49200ec2018-01-19 16:17:41 -080080
81 <<: *test-free-job-boiler-plate
82 <<: *inject-env-variable-plate
83 properties:
84
85 - build-discarder:
86 num-to-keep: 30
87
88 parameters:
89
90 - string:
91 name: 'DAYS_OLD'
Devin Lim02197b22018-05-10 17:09:38 -070092 default: '{days_remove}'
Devin Lim49200ec2018-01-19 16:17:41 -080093
94 - lf-infra-parameters:
95 project: '{project}'
96 branch: '{stream}'
97 stream: '{stream}'
98 lftools-version: '{lftools-version}'
99
Devin Lima008a212018-04-09 16:01:55 -0700100 node: 'TestStation-{clean-station-type}s'
Devin Lim49200ec2018-01-19 16:17:41 -0800101
Devin Lim2b5ef2e2018-02-27 14:05:08 -0800102 triggers:
Devin Lim02197b22018-05-10 17:09:38 -0700103 - timed: '01 08 1{date} * *'
Devin Lim49200ec2018-01-19 16:17:41 -0800104
105 builders:
106
Devin Limb00d26a2018-02-01 17:27:59 -0800107 - shell: !include-raw-escape: vm-bm-clean-up.sh
Devin Lim49200ec2018-01-19 16:17:41 -0800108
109- job-template:
110 name: test-station-log-cleanup-CHO
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -0800111 description: |
112 <!-- Managed by Jenkins Job Builder -->
113
114
Devin Lim49200ec2018-01-19 16:17:41 -0800115
116 <<: *test-free-job-boiler-plate
Devin Limc284c982018-03-30 12:13:00 -0700117 wrappers:
118 - inject:
119 properties-file: '/var/lib/jenkins/TestONOS.property'
120 script-content: |
121 echo "ONOSBranch=$ONOSBranch" > /var/lib/jenkins/TestONOS.property
122 echo "TestONBranch=$TestONBranch" >> /var/lib/jenkins/TestONOS.property
123 echo "ONOSTag=$ONOSTag" >> /var/lib/jenkins/TestONOS.property
124 echo "WikiPrefix=$WikiPrefix" >> /var/lib/jenkins/TestONOS.property
125 override-build-parameters: true
126
127 # post_Job
Devin Lim49200ec2018-01-19 16:17:41 -0800128 properties:
129
130 - build-discarder:
131 num-to-keep: 15
132
133 parameters:
134
135 - string:
136 name: 'DAYS_OLD'
137 default: '15'
138
139 - lf-infra-parameters:
140 project: '{project}'
141 branch: '{stream}'
142 stream: '{stream}'
143 lftools-version: '{lftools-version}'
144
145 node: 'TestStation-CHOs'
146
Devin Lim2b5ef2e2018-02-27 14:05:08 -0800147 triggers:
148 - timed: '@daily'
Devin Lim49200ec2018-01-19 16:17:41 -0800149 builders:
150
Devin Limb00d26a2018-02-01 17:27:59 -0800151 - shell: !include-raw-escape: cho-clean-up.sh
Devin Lim18f459d2018-01-26 19:20:30 -0800152
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800153- job-template:
154 name: QA-check-style
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -0800155 description: |
156 <!-- Managed by Jenkins Job Builder -->
157 <h3>ONOS QA Code Style:</h3>
158 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 />
159 All .py files that are in the most recent patchset will be style checked.<br />
160 <br />
161 Jenkins User will give +1 if all files pass the style check, -1 if there is at least one style check failure.<br />
162 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 />
163 <br />
164 Click on the link in the Gerrit patchset comment to view the results of the style check.<br />
165 Alternatively, you can check the console output to view the files checked and style check raw output.<br />
166 <br />
167 You may also manually run this job by selecting "Build with Parameters", then providing the 5-digit change number from Gerrit.<br />
168 <br />
169 <h3>Important Notes:</h3>
170 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 />
171 Build numbers that are 1 build apart may NOT necessarily correspond to the same patchset!<br />
172 Manually running this job will NOT leave a comment after the most recent patchset in Gerrit.<br />
173 <br />
174 <h3>Style Check PEP8 Exclusions:</h3>
175 This job mainly follows PEP8 style check, but excludes many errors and warnings.<br />
176 The following errors and warnings are excluded from the PEP8 check portion of the job:
177 <ul>
178 <li>E251</li>
179 <li>E201</li>
180 <li>E302</li>
181 <li>E202</li>
182 <li>E126</li>
183 <li>E127</li>
184 <li>E203</li>
185 <li>E226</li>
186 <li>E501</li>
187 <li>W391</li>
188 </ul>
189 <h3>Credits:</h3>
190 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 />
191 The check style portion of the job is modeled from "HA-Jobs/codecheck_test"<br />
192 Created by Jeremy Ronquillo: jeremyr@opennetworking.org or j_ronquillo@u.pacific.edu<br />
193 <br />
194 Copyright (c) 2017 Open Networking Foundation (ONF)
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800195
196 <<: *test-free-job-boiler-plate
197 properties:
198
199 - build-discarder:
Devin Lim18f459d2018-01-26 19:20:30 -0800200 num-to-keep: 100
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800201
202 parameters:
203
204 - string:
Devin Lim18f459d2018-01-26 19:20:30 -0800205 name: 'GERRIT_CHANGE_NUMBER'
206 default: ''
207 description: '5-digit number that corresponds to the patch set change on Gerrit.'
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800208
209 - lf-infra-parameters:
210 project: '{project}'
211 branch: '{stream}'
212 stream: '{stream}'
213 lftools-version: '{lftools-version}'
214
Devin Lim18f459d2018-01-26 19:20:30 -0800215 concurrent: true
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800216
Devin Lim18f459d2018-01-26 19:20:30 -0800217 node: 'TestStation-Jeremys'
218
Devin Lim323c9872018-01-30 19:57:58 -0800219 triggers:
220 - gerrit:
Devin Lim491d92b2018-02-09 10:41:45 -0800221 server-name: 'OnosSystemTest Project Gerrit'
Devin Lim323c9872018-01-30 19:57:58 -0800222 trigger-on:
223 - patchset-created-event:
224 exclude-drafts: false
225 exclude-trivial-rebase: false
226 exclude-no-code-change: false
227 - draft-published-event
228 - comment-added-contains-event:
229 comment-contains-value: '(?i)^.*recheck$'
230 projects:
231 - project-compare-type: PLAIN
232 project-pattern: '{project}'
233 branches:
234 - branch-compare-type: ANT
Devin Lim491d92b2018-02-09 10:41:45 -0800235 branch-pattern: '**/master'
Devin Limb00d26a2018-02-01 17:27:59 -0800236 - branch-compare-type: ANT
Devin Lim491d92b2018-02-09 10:41:45 -0800237 branch-pattern: '**/onos-1.[11-20]'
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:
Devin Limb2965252018-04-09 17:34:14 -0700409 name: 'SR-log-{sr-version}'
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800410
Devin Lim323c9872018-01-30 19:57:58 -0800411 <<: *test-free-job-boiler-plate
412 properties:
413
414 - build-discarder:
Devin Lim1c4753e2018-03-23 15:31:38 -0700415 num-to-keep: 50
Devin Lim323c9872018-01-30 19:57:58 -0800416
417 parameters:
418
419 - lf-infra-parameters:
420 project: '{project}'
421 branch: '{stream}'
422 stream: '{stream}'
423 lftools-version: '{lftools-version}'
424
Devin Limb2965252018-04-09 17:34:14 -0700425 node: 'TestStation-Fabric3s'
426 publishers:
427
428 - archive:
429 artifacts: '*'
430
431- job-template:
Devin Limf57a9eb2018-04-13 20:00:46 -0700432 name: 'SR-log-{sr-versions}'
Devin Limb2965252018-04-09 17:34:14 -0700433
434 <<: *test-free-job-boiler-plate
435 properties:
436
437 - build-discarder:
438 num-to-keep: 50
439
440 parameters:
441
442 - lf-infra-parameters:
443 project: '{project}'
444 branch: '{stream}'
445 stream: '{stream}'
446 lftools-version: '{lftools-version}'
447
448 node: 'TestStation-Fabric2s'
Devin Lim323c9872018-01-30 19:57:58 -0800449 publishers:
450
451 - archive:
Devin Limb00d26a2018-02-01 17:27:59 -0800452 artifacts: '*'
453
454- job-template:
455 name: test-HA
456
457 <<: *test-free-job-boiler-plate
458 properties:
459
460 - build-discarder:
461
462 days-to-keep: 5
463 num-to-keep: 100
464
465 parameters:
466
467 - string:
468 name: 'TEST_NAME'
469 default: 'HAbackupRecover'
470 description: 'The name of the TestON test suite'
471
472 - lf-infra-parameters:
473 project: '{project}'
474 branch: '{stream}'
475 stream: '{stream}'
476 lftools-version: '{lftools-version}'
477
478 node: 'TestStation-Jons'
479 triggers:
480 - reverse:
481 jobs: 'test-HA'
482 result: 'failure'
483
484 builders:
485
486 - shell: !include-raw-escape: test-ha.sh
487
488 publishers:
489 - plot:
490 - title: 'Test job results'
491 group: 'Test-HA'
492 yaxis: 'Number of test cases'
493 style: line
494 series:
495 - file: 'results.csv'
496 format: 'csv'
497
498 - title: 'Timers'
499 group: 'Test-HA'
500 yaxis: 'Time in seconds'
501 style: line
502 series:
503 - file: 'Timers.csv'
504 format: 'csv'
505
506 - post-tasks:
507 - escalate-status: true
508 script: |
509 if [ -e ${{WORKSPACE}}/${{TEST_NAME##*/}}Wiki.txt ] && ! grep -q "FAIL" ${{WORKSPACE}}/${{TEST_NAME##*/}}Wiki.txt
510 then
511 exit 0
512 else
513 exit 1
514 fi
Devin Lim49200ec2018-01-19 16:17:41 -0800515
516- project:
517 name: post-result-jobs
518 project-name: post-result-jobs
519
520 <<: *test-free-init-procedure-plate
Devin Lim49200ec2018-01-19 16:17:41 -0800521 jobs:
Devin Lim02197b22018-05-10 17:09:38 -0700522 - 'postjob-{station-type}':
523 station-type:
524 - 'VM'
525 - 'BM'
526 - 'Fabric'
527 - 'Fabric2'
528 - 'Fabric3'
529 - 'Fabric5'
Devin Lim49200ec2018-01-19 16:17:41 -0800530
531- project:
532 name: cleanup-jobs
533 project-name: cleanup-jobs
534
535 <<: *test-free-init-procedure-plate
Devin Lim49200ec2018-01-19 16:17:41 -0800536 jobs:
Devin Lim02197b22018-05-10 17:09:38 -0700537 - 'test-station-log-cleanup':
538 clean-station-type:
539 - 'BM'
540 - 'Fabric'
541 - 'Fabric2'
542 - 'Fabric3'
543 - 'Fabric4'
544 days_remove: '30'
545 date: ''
546
547 - 'test-station-log-cleanup':
548 clean-station-type:
549 - 'VM'
550 - 'Fabric5'
551 days_remove: '15'
552 date: ',15'
553
Devin Lim49200ec2018-01-19 16:17:41 -0800554 - 'test-station-log-cleanup-CHO'
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800555
556- project:
557 name: check-style
558 project-name: check-style
559
560 <<: *test-free-init-procedure-plate
561 jobs:
562 - 'QA-check-style'
563
564- project:
565 name: delta-test
566 project-name: delta-test
567
568 <<: *test-free-init-procedure-plate
569 jobs:
570 - 'delta-nightly'
Devin Lim7d7cd992018-01-25 14:12:40 -0800571
Devin Lim18f459d2018-01-26 19:20:30 -0800572- project:
573 name: cho-tests
574 project-name: cho-tests
575
576 <<: *test-free-init-procedure-plate
577 jobs:
578 - 'init-CHO'
579 - 'running-CHO'
Devin Lim323c9872018-01-30 19:57:58 -0800580
581- project:
582 name: log-pipeline
583
Devin Lim323c9872018-01-30 19:57:58 -0800584 project-name: 'log-pipeline'
585
586 <<: *test-free-init-procedure-plate
587
Devin Limb2965252018-04-09 17:34:14 -0700588 sr-version:
589 - '1.11'
590 - '1.12'
Devin Limf57a9eb2018-04-13 20:00:46 -0700591
592 sr-versions:
593 - 'master'
Devin Lim7550e022018-04-13 18:31:02 -0700594 - '1.13'
Devin Limb2965252018-04-09 17:34:14 -0700595
Devin Limf57a9eb2018-04-13 20:00:46 -0700596
Devin Lim323c9872018-01-30 19:57:58 -0800597 jobs:
Devin Limb2965252018-04-09 17:34:14 -0700598 - 'SR-log-{sr-version}'
Devin Limf57a9eb2018-04-13 20:00:46 -0700599 - 'SR-log-{sr-versions}'
Devin Limb00d26a2018-02-01 17:27:59 -0800600
601- project:
Devin Limb2965252018-04-09 17:34:14 -0700602 name: personal-station
Devin Limb00d26a2018-02-01 17:27:59 -0800603
Devin Limb2965252018-04-09 17:34:14 -0700604 project-name: 'personal-station'
Devin Limb00d26a2018-02-01 17:27:59 -0800605
606 <<: *test-free-init-procedure-plate
607
608 jobs:
609 - 'test-HA'
Devin Lim157404d2018-02-09 16:44:19 -0800610