blob: 592ab2903cd26c945c7a301942518c7dae9f11a8 [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'
You Wang6eae0a42019-04-22 16:25:24 -070018 - '2.1'
Devin Lim323c9872018-01-30 19:57:58 -080019 - 'master'
20 - 'manually'
21
Devin Lim49200ec2018-01-19 16:17:41 -080022- test-free-init-procedure-plate: &test-free-init-procedure-plate
23 name: test-free-init-procedure-plate
24 project: OnosSystemTest
25 stream: 'master'
26
27- inject-env-variable-plate: &inject-env-variable-plate
28 name: inject-env-variable-plate
29 wrappers:
30 - inject:
31 properties-file: '/var/jenkins/TestONOS.property'
32 script-content: |
33 echo "ONOSBranch=$ONOSBranch" > /var/jenkins/TestONOS.property
34 echo "TestONBranch=$TestONBranch" >> /var/jenkins/TestONOS.property
35 echo "ONOSTag=$ONOSTag" >> /var/jenkins/TestONOS.property
36 echo "WikiPrefix=$WikiPrefix" >> /var/jenkins/TestONOS.property
37 override-build-parameters: true
38
39# post_Job
40- job-template:
41 name: postjob-{station-type}
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -080042 description: |
43 <!-- Managed by Jenkins Job Builder -->
44 Click on the "Last Successful Artifacts" to view all of the graphs (also accessible when logged out).<br />
45 <font color="red">Unless debugging, DO NOT MANUALLY BUILD THIS PIPELINE.</font><br />
46 <br />
47 Created by Devin Lim - devin@opennetworking.org<br />
48 Copyright (c) 2017 Open Networking Foundation (ONF)
Devin Lim49200ec2018-01-19 16:17:41 -080049
50 <<: *test-free-job-boiler-plate
51
52 properties:
53
54 - build-discarder:
55 num-to-keep: 1
56
57 parameters:
58
59 - lf-infra-parameters:
60 project: '{project}'
61 branch: '{stream}'
62 stream: '{stream}'
63 lftools-version: '{lftools-version}'
64
65 node: 'TestStation-{station-type}s'
66
67 publishers:
68
Devin Lim85722c32018-05-15 13:13:50 -070069 - archive:
70 artifacts: '*.jpg'
71
Devin Limb00d26a2018-02-01 17:27:59 -080072 - image-gallery:
73 - gallery-type: archived-images-gallery
74 title: 'Test result'
75 includes: '*.jpg'
Devin Lim49200ec2018-01-19 16:17:41 -080076
Devin Lim49200ec2018-01-19 16:17:41 -080077- job-template:
Devin Lima008a212018-04-09 16:01:55 -070078 name: test-station-log-cleanup-{clean-station-type}
Devin Lim02197b22018-05-10 17:09:38 -070079 id: test-station-log-cleanup
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -080080 description: |
81 <!-- Managed by Jenkins Job Builder -->
Devin Lim02197b22018-05-10 17:09:38 -070082 clean up periodically ~/OnosSystemTest/TestON/logs - delete logs older than {days_remove} days.
Devin Lim49200ec2018-01-19 16:17:41 -080083
84 <<: *test-free-job-boiler-plate
85 <<: *inject-env-variable-plate
86 properties:
87
88 - build-discarder:
89 num-to-keep: 30
90
91 parameters:
92
93 - string:
94 name: 'DAYS_OLD'
Devin Lim02197b22018-05-10 17:09:38 -070095 default: '{days_remove}'
Devin Lim49200ec2018-01-19 16:17:41 -080096
97 - lf-infra-parameters:
98 project: '{project}'
99 branch: '{stream}'
100 stream: '{stream}'
101 lftools-version: '{lftools-version}'
102
Devin Lima008a212018-04-09 16:01:55 -0700103 node: 'TestStation-{clean-station-type}s'
Devin Lim49200ec2018-01-19 16:17:41 -0800104
Devin Lim2b5ef2e2018-02-27 14:05:08 -0800105 triggers:
Devin Lim02197b22018-05-10 17:09:38 -0700106 - timed: '01 08 1{date} * *'
Devin Lim49200ec2018-01-19 16:17:41 -0800107
108 builders:
109
Devin Limb00d26a2018-02-01 17:27:59 -0800110 - shell: !include-raw-escape: vm-bm-clean-up.sh
Devin Lim49200ec2018-01-19 16:17:41 -0800111
112- job-template:
113 name: test-station-log-cleanup-CHO
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -0800114 description: |
115 <!-- Managed by Jenkins Job Builder -->
116
117
Devin Lim49200ec2018-01-19 16:17:41 -0800118
119 <<: *test-free-job-boiler-plate
Devin Limc284c982018-03-30 12:13:00 -0700120 wrappers:
121 - inject:
122 properties-file: '/var/lib/jenkins/TestONOS.property'
123 script-content: |
124 echo "ONOSBranch=$ONOSBranch" > /var/lib/jenkins/TestONOS.property
125 echo "TestONBranch=$TestONBranch" >> /var/lib/jenkins/TestONOS.property
126 echo "ONOSTag=$ONOSTag" >> /var/lib/jenkins/TestONOS.property
127 echo "WikiPrefix=$WikiPrefix" >> /var/lib/jenkins/TestONOS.property
128 override-build-parameters: true
129
130 # post_Job
Devin Lim49200ec2018-01-19 16:17:41 -0800131 properties:
132
133 - build-discarder:
134 num-to-keep: 15
135
136 parameters:
137
138 - string:
139 name: 'DAYS_OLD'
140 default: '15'
141
142 - lf-infra-parameters:
143 project: '{project}'
144 branch: '{stream}'
145 stream: '{stream}'
146 lftools-version: '{lftools-version}'
147
148 node: 'TestStation-CHOs'
149
Devin Lim2b5ef2e2018-02-27 14:05:08 -0800150 triggers:
151 - timed: '@daily'
Devin Lim49200ec2018-01-19 16:17:41 -0800152 builders:
153
Devin Limb00d26a2018-02-01 17:27:59 -0800154 - shell: !include-raw-escape: cho-clean-up.sh
Devin Lim18f459d2018-01-26 19:20:30 -0800155
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800156- job-template:
157 name: QA-check-style
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -0800158 description: |
159 <!-- Managed by Jenkins Job Builder -->
160 <h3>ONOS QA Code Style:</h3>
161 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 />
162 All .py files that are in the most recent patchset will be style checked.<br />
163 <br />
164 Jenkins User will give +1 if all files pass the style check, -1 if there is at least one style check failure.<br />
165 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 />
166 <br />
167 Click on the link in the Gerrit patchset comment to view the results of the style check.<br />
168 Alternatively, you can check the console output to view the files checked and style check raw output.<br />
169 <br />
170 You may also manually run this job by selecting "Build with Parameters", then providing the 5-digit change number from Gerrit.<br />
171 <br />
172 <h3>Important Notes:</h3>
173 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 />
174 Build numbers that are 1 build apart may NOT necessarily correspond to the same patchset!<br />
175 Manually running this job will NOT leave a comment after the most recent patchset in Gerrit.<br />
176 <br />
177 <h3>Style Check PEP8 Exclusions:</h3>
178 This job mainly follows PEP8 style check, but excludes many errors and warnings.<br />
179 The following errors and warnings are excluded from the PEP8 check portion of the job:
180 <ul>
181 <li>E251</li>
182 <li>E201</li>
183 <li>E302</li>
184 <li>E202</li>
185 <li>E126</li>
186 <li>E127</li>
187 <li>E203</li>
188 <li>E226</li>
189 <li>E501</li>
190 <li>W391</li>
191 </ul>
192 <h3>Credits:</h3>
193 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 />
194 The check style portion of the job is modeled from "HA-Jobs/codecheck_test"<br />
195 Created by Jeremy Ronquillo: jeremyr@opennetworking.org or j_ronquillo@u.pacific.edu<br />
196 <br />
197 Copyright (c) 2017 Open Networking Foundation (ONF)
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800198
199 <<: *test-free-job-boiler-plate
200 properties:
201
202 - build-discarder:
Devin Lim18f459d2018-01-26 19:20:30 -0800203 num-to-keep: 100
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800204
205 parameters:
206
207 - string:
Devin Lim18f459d2018-01-26 19:20:30 -0800208 name: 'GERRIT_CHANGE_NUMBER'
209 default: ''
210 description: '5-digit number that corresponds to the patch set change on Gerrit.'
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800211
212 - lf-infra-parameters:
213 project: '{project}'
214 branch: '{stream}'
215 stream: '{stream}'
216 lftools-version: '{lftools-version}'
217
Devin Lim18f459d2018-01-26 19:20:30 -0800218 concurrent: true
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800219
Devin Lim18f459d2018-01-26 19:20:30 -0800220 node: 'TestStation-Jeremys'
221
Devin Lim323c9872018-01-30 19:57:58 -0800222 triggers:
223 - gerrit:
Devin Lim491d92b2018-02-09 10:41:45 -0800224 server-name: 'OnosSystemTest Project Gerrit'
Devin Lim323c9872018-01-30 19:57:58 -0800225 trigger-on:
226 - patchset-created-event:
227 exclude-drafts: false
228 exclude-trivial-rebase: false
229 exclude-no-code-change: false
230 - draft-published-event
231 - comment-added-contains-event:
232 comment-contains-value: '(?i)^.*recheck$'
233 projects:
234 - project-compare-type: PLAIN
235 project-pattern: '{project}'
236 branches:
You Wanga70156d2018-08-07 14:36:46 -0700237 - branch-compare-type: REG_EXP
238 branch-pattern: '(master|onos-1.(1[3-9]|[2-9][0-9]))'
Devin Lim323c9872018-01-30 19:57:58 -0800239 wrappers:
240 - lf-infra-wrappers:
241 build-timeout: 1800
242 jenkins-ssh-credential: '{jenkins-ssh-credential}'
243
Devin Lim18f459d2018-01-26 19:20:30 -0800244 builders:
Devin Lime65e71c2018-02-09 15:01:33 -0800245 - shell: !include-raw-escape: check-style.sh
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800246
Devin Limb00d26a2018-02-01 17:27:59 -0800247 publishers:
248 - warnings:
249 workspace-file-scanners:
250 - file-pattern: pep8Result.txt
251 scanner: Pep8
Devin Lime65e71c2018-02-09 15:01:33 -0800252 total-thresholds:
253 unstable:
254 total-all: 1
Devin Lim323c9872018-01-30 19:57:58 -0800255
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800256- job-template:
257 name: delta-nightly
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -0800258 description: |
259 <!-- Managed by Jenkins Job Builder -->
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800260
261 <<: *test-free-job-boiler-plate
262 properties:
263
264 - build-discarder:
265 num-to-keep: 30
266
267 parameters:
268
269 - string:
270 name: 'NIGHTLY_FILE_NAME'
271 default: ''
272 description: |
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -0800273 Name of ONOS nightly build file <br />
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800274 will be set to the latest file if not specified here
275
276 - string:
277 name: 'ONOS_VERSION'
278 default: '1.11.0'
279 description: 'Version number in ONOS nightly build file'
280
281 - string:
282 name: 'DELTA_PATH'
283 default: '/home/sdn'
284 description: 'Path of DELTA project'
285
286 - string:
287 name: 'WIKI_PREFIX'
288 default: 'master'
289
290 - bool:
291 name: 'CLEANUP'
292 default: true
293
294 - lf-infra-parameters:
295 project: '{project}'
296 branch: '{stream}'
297 stream: '{stream}'
298 lftools-version: '{lftools-version}'
299
300 node: 'TestStation-BMs'
301
302 wrappers:
303 - inject:
304 properties-file: '/var/jenkins/TestONOS.property'
305
306 builders:
307
308 - shell: !include-raw-escape: delta-script.sh
309
Devin Limb00d26a2018-02-01 17:27:59 -0800310 publishers:
311 - plot:
312 - title: 'DELTA Test Results for master'
313 group: 'DELTA-nightly'
314 yaxis: 'Number of test cases'
315 style: line
316 series:
317 - file: 'DELTA-nightly.csv'
318 format: 'csv'
319
320 # Todo : add confluence ( use pipeline for post build ..? )
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800321
Devin Lim18f459d2018-01-26 19:20:30 -0800322- job-template:
323 name: init-CHO
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -0800324 description: |
325 <!-- Managed by Jenkins Job Builder -->
326 1) Set a specific onos branch to test; <br />
327 2) pull and checkout the branch; <br />
328 3) build onos and package to tar.gz <br />
Devin Lim18f459d2018-01-26 19:20:30 -0800329
330 <<: *test-free-job-boiler-plate
331 properties:
332
333 - build-discarder:
334 num-to-keep: 30
335
336 parameters:
337
338 - string:
339 name: 'ONOSBranch'
340 default: 'master'
341 description: |
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -0800342 set onos branch to test. default to "master", <br />
343 but can also be set at "onos-1.2", etc. <br />
Devin Lim18f459d2018-01-26 19:20:30 -0800344 This parameter is also use to trigger where the test results to be posted
345
346 - string:
You Wang8a605bc2019-01-03 10:48:45 -0800347 name: 'ONOSJAVAOPTS'
You Wang2e8ef572019-05-20 16:05:17 -0700348 default: "\"${{JAVA_OPTS:--Xms8G -Xmx8G -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -Dkaraf.log.console=INFO -Dds.lock.timeout.milliseconds=60000}}\""
You Wang8a605bc2019-01-03 10:48:45 -0800349 description: 'onos cell JAVA_OPTS setting'
Devin Lim18f459d2018-01-26 19:20:30 -0800350
351 - string:
352 name: 'TestONBranch'
353 default: 'master'
354 description: 'sets TestON branch'
355
356 - string:
357 name: 'ONOSTag'
358 default: ''
359
360 - lf-infra-parameters:
361 project: '{project}'
362 branch: '{stream}'
363 stream: '{stream}'
364 lftools-version: '{lftools-version}'
365
Devin Lim0e1bac02018-04-24 17:46:59 -0700366 node: 'TestStation-Fabric5s'
Devin Lim18f459d2018-01-26 19:20:30 -0800367
368 wrappers:
369 - inject:
370 properties-file: '/var/lib/jenkins/TestONOS.property'
371 script-content: |
372 echo "ONOSBranch=$ONOSBranch" > /var/lib/jenkins/TestONOS.property
373 echo "TestONBranch=$TestONBranch" >> /var/lib/jenkins/TestONOS.property
374 echo "ONOSTag=$ONOSTag" >> /var/lib/jenkins/TestONOS.property
375
376 override-build-parameters: true
377
378 builders:
379
380 - shell: !include-raw-escape: cho-init.sh
381
382- job-template:
383 name: running-CHO
384
385 <<: *test-free-job-boiler-plate
386 properties:
387
388 - build-discarder:
389 num-to-keep: 30
390
391 parameters:
392
393 - lf-infra-parameters:
394 project: '{project}'
395 branch: '{stream}'
396 stream: '{stream}'
397 lftools-version: '{lftools-version}'
398
Devin Lim0e1bac02018-04-24 17:46:59 -0700399 node: 'TestStation-Fabric5s'
Devin Lim18f459d2018-01-26 19:20:30 -0800400 triggers:
401 - reverse:
402 jobs: 'init-CHO'
403 result: 'failure'
404
405 builders:
406
407 - shell: !include-raw-escape: running-cho.sh
408
409- job-template:
You Wange59d3442018-05-25 14:04:05 -0700410 name: 'SR-log-{version}'
411 id: SR-log-storage
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800412
Devin Lim323c9872018-01-30 19:57:58 -0800413 <<: *test-free-job-boiler-plate
414 properties:
415
416 - build-discarder:
Devin Lim1c4753e2018-03-23 15:31:38 -0700417 num-to-keep: 50
Devin Lim323c9872018-01-30 19:57:58 -0800418
419 parameters:
420
421 - lf-infra-parameters:
422 project: '{project}'
423 branch: '{stream}'
424 stream: '{stream}'
425 lftools-version: '{lftools-version}'
426
You Wange59d3442018-05-25 14:04:05 -0700427 node: 'TestStation-Fabric{fabricOn}s'
Devin Lim323c9872018-01-30 19:57:58 -0800428 publishers:
429
430 - archive:
Devin Limb00d26a2018-02-01 17:27:59 -0800431 artifacts: '*'
432
433- job-template:
434 name: test-HA
435
436 <<: *test-free-job-boiler-plate
437 properties:
438
439 - build-discarder:
440
441 days-to-keep: 5
442 num-to-keep: 100
443
444 parameters:
445
446 - string:
447 name: 'TEST_NAME'
448 default: 'HAbackupRecover'
449 description: 'The name of the TestON test suite'
450
451 - lf-infra-parameters:
452 project: '{project}'
453 branch: '{stream}'
454 stream: '{stream}'
455 lftools-version: '{lftools-version}'
456
457 node: 'TestStation-Jons'
458 triggers:
459 - reverse:
460 jobs: 'test-HA'
461 result: 'failure'
462
463 builders:
464
465 - shell: !include-raw-escape: test-ha.sh
466
467 publishers:
468 - plot:
469 - title: 'Test job results'
470 group: 'Test-HA'
471 yaxis: 'Number of test cases'
472 style: line
473 series:
474 - file: 'results.csv'
475 format: 'csv'
476
477 - title: 'Timers'
478 group: 'Test-HA'
479 yaxis: 'Time in seconds'
480 style: line
481 series:
482 - file: 'Timers.csv'
483 format: 'csv'
484
485 - post-tasks:
486 - escalate-status: true
487 script: |
488 if [ -e ${{WORKSPACE}}/${{TEST_NAME##*/}}Wiki.txt ] && ! grep -q "FAIL" ${{WORKSPACE}}/${{TEST_NAME##*/}}Wiki.txt
489 then
490 exit 0
491 else
492 exit 1
493 fi
Devin Lim49200ec2018-01-19 16:17:41 -0800494
495- project:
496 name: post-result-jobs
497 project-name: post-result-jobs
498
499 <<: *test-free-init-procedure-plate
Devin Lim49200ec2018-01-19 16:17:41 -0800500 jobs:
Devin Lim02197b22018-05-10 17:09:38 -0700501 - 'postjob-{station-type}':
502 station-type:
503 - 'VM'
504 - 'BM'
505 - 'Fabric'
506 - 'Fabric2'
507 - 'Fabric3'
You Wange59d3442018-05-25 14:04:05 -0700508 - 'Fabric4'
Devin Lim02197b22018-05-10 17:09:38 -0700509 - 'Fabric5'
You Wangdc53adf2019-02-07 13:47:33 -0800510 - 'Trellis-POD'
Devin Lim49200ec2018-01-19 16:17:41 -0800511
512- project:
513 name: cleanup-jobs
514 project-name: cleanup-jobs
515
516 <<: *test-free-init-procedure-plate
Devin Lim49200ec2018-01-19 16:17:41 -0800517 jobs:
Devin Lim02197b22018-05-10 17:09:38 -0700518 - 'test-station-log-cleanup':
519 clean-station-type:
520 - 'BM'
521 - 'Fabric'
522 - 'Fabric2'
523 - 'Fabric3'
524 - 'Fabric4'
525 days_remove: '30'
526 date: ''
527
528 - 'test-station-log-cleanup':
529 clean-station-type:
530 - 'VM'
531 - 'Fabric5'
You Wangdc53adf2019-02-07 13:47:33 -0800532 - 'Trellis-POD'
Devin Lim02197b22018-05-10 17:09:38 -0700533 days_remove: '15'
534 date: ',15'
535
Devin Lim49200ec2018-01-19 16:17:41 -0800536 - 'test-station-log-cleanup-CHO'
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800537
538- project:
539 name: check-style
540 project-name: check-style
541
542 <<: *test-free-init-procedure-plate
543 jobs:
544 - 'QA-check-style'
545
546- project:
547 name: delta-test
548 project-name: delta-test
549
550 <<: *test-free-init-procedure-plate
551 jobs:
552 - 'delta-nightly'
Devin Lim7d7cd992018-01-25 14:12:40 -0800553
Devin Lim18f459d2018-01-26 19:20:30 -0800554- project:
555 name: cho-tests
556 project-name: cho-tests
557
558 <<: *test-free-init-procedure-plate
559 jobs:
560 - 'init-CHO'
561 - 'running-CHO'
Devin Lim323c9872018-01-30 19:57:58 -0800562
563- project:
564 name: log-pipeline
565
Devin Lim323c9872018-01-30 19:57:58 -0800566 project-name: 'log-pipeline'
567
568 <<: *test-free-init-procedure-plate
569
You Wang6eae0a42019-04-22 16:25:24 -0700570 sr-version-before-previous: '2.1'
You Wangbefeecf2018-11-09 15:06:57 -0800571 sr-version-previous: '1.15'
You Wang5b70d8c2018-05-25 17:02:59 -0700572 sr-version-current: 'master'
Devin Limf57a9eb2018-04-13 20:00:46 -0700573
Devin Lim323c9872018-01-30 19:57:58 -0800574 jobs:
You Wange59d3442018-05-25 14:04:05 -0700575 - 'SR-log-storage':
576 version: '{sr-version-current}'
577 fabricOn: '4'
578 - 'SR-log-storage':
579 version: '{sr-version-previous}'
580 fabricOn: '2'
581 - 'SR-log-storage':
582 version: '{sr-version-before-previous}'
583 fabricOn: '3'
Devin Limb00d26a2018-02-01 17:27:59 -0800584
585- project:
Devin Limb2965252018-04-09 17:34:14 -0700586 name: personal-station
Devin Limb00d26a2018-02-01 17:27:59 -0800587
Devin Limb2965252018-04-09 17:34:14 -0700588 project-name: 'personal-station'
Devin Limb00d26a2018-02-01 17:27:59 -0800589
590 <<: *test-free-init-procedure-plate
591
592 jobs:
593 - 'test-HA'
Devin Lim157404d2018-02-09 16:44:19 -0800594