blob: 1d2cbc75c1de567e8c2456dc2bd4b0fe116092ba [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'
Jeremy Ronquillob3ddd592019-08-14 15:19:45 -070019 - '2.2'
Devin Lim323c9872018-01-30 19:57:58 -080020 - 'master'
21 - 'manually'
22
Devin Lim49200ec2018-01-19 16:17:41 -080023- test-free-init-procedure-plate: &test-free-init-procedure-plate
24 name: test-free-init-procedure-plate
25 project: OnosSystemTest
26 stream: 'master'
27
28- inject-env-variable-plate: &inject-env-variable-plate
29 name: inject-env-variable-plate
30 wrappers:
31 - inject:
32 properties-file: '/var/jenkins/TestONOS.property'
33 script-content: |
34 echo "ONOSBranch=$ONOSBranch" > /var/jenkins/TestONOS.property
35 echo "TestONBranch=$TestONBranch" >> /var/jenkins/TestONOS.property
36 echo "ONOSTag=$ONOSTag" >> /var/jenkins/TestONOS.property
37 echo "WikiPrefix=$WikiPrefix" >> /var/jenkins/TestONOS.property
38 override-build-parameters: true
39
40# post_Job
41- job-template:
42 name: postjob-{station-type}
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -080043 description: |
44 <!-- Managed by Jenkins Job Builder -->
45 Click on the "Last Successful Artifacts" to view all of the graphs (also accessible when logged out).<br />
46 <font color="red">Unless debugging, DO NOT MANUALLY BUILD THIS PIPELINE.</font><br />
47 <br />
48 Created by Devin Lim - devin@opennetworking.org<br />
49 Copyright (c) 2017 Open Networking Foundation (ONF)
Devin Lim49200ec2018-01-19 16:17:41 -080050
51 <<: *test-free-job-boiler-plate
52
53 properties:
54
55 - build-discarder:
56 num-to-keep: 1
57
58 parameters:
59
60 - lf-infra-parameters:
61 project: '{project}'
62 branch: '{stream}'
63 stream: '{stream}'
64 lftools-version: '{lftools-version}'
65
66 node: 'TestStation-{station-type}s'
67
68 publishers:
69
Devin Lim85722c32018-05-15 13:13:50 -070070 - archive:
71 artifacts: '*.jpg'
72
Devin Limb00d26a2018-02-01 17:27:59 -080073 - image-gallery:
74 - gallery-type: archived-images-gallery
75 title: 'Test result'
76 includes: '*.jpg'
Devin Lim49200ec2018-01-19 16:17:41 -080077
Devin Lim49200ec2018-01-19 16:17:41 -080078- job-template:
Devin Lima008a212018-04-09 16:01:55 -070079 name: test-station-log-cleanup-{clean-station-type}
Devin Lim02197b22018-05-10 17:09:38 -070080 id: test-station-log-cleanup
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -080081 description: |
82 <!-- Managed by Jenkins Job Builder -->
Devin Lim02197b22018-05-10 17:09:38 -070083 clean up periodically ~/OnosSystemTest/TestON/logs - delete logs older than {days_remove} days.
Devin Lim49200ec2018-01-19 16:17:41 -080084
85 <<: *test-free-job-boiler-plate
86 <<: *inject-env-variable-plate
87 properties:
88
89 - build-discarder:
90 num-to-keep: 30
91
92 parameters:
93
94 - string:
95 name: 'DAYS_OLD'
Devin Lim02197b22018-05-10 17:09:38 -070096 default: '{days_remove}'
Devin Lim49200ec2018-01-19 16:17:41 -080097
98 - lf-infra-parameters:
99 project: '{project}'
100 branch: '{stream}'
101 stream: '{stream}'
102 lftools-version: '{lftools-version}'
103
Devin Lima008a212018-04-09 16:01:55 -0700104 node: 'TestStation-{clean-station-type}s'
Devin Lim49200ec2018-01-19 16:17:41 -0800105
Devin Lim2b5ef2e2018-02-27 14:05:08 -0800106 triggers:
Devin Lim02197b22018-05-10 17:09:38 -0700107 - timed: '01 08 1{date} * *'
Devin Lim49200ec2018-01-19 16:17:41 -0800108
109 builders:
110
Devin Limb00d26a2018-02-01 17:27:59 -0800111 - shell: !include-raw-escape: vm-bm-clean-up.sh
Devin Lim49200ec2018-01-19 16:17:41 -0800112
113- job-template:
114 name: test-station-log-cleanup-CHO
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -0800115 description: |
116 <!-- Managed by Jenkins Job Builder -->
117
118
Devin Lim49200ec2018-01-19 16:17:41 -0800119
120 <<: *test-free-job-boiler-plate
Devin Limc284c982018-03-30 12:13:00 -0700121 wrappers:
122 - inject:
123 properties-file: '/var/lib/jenkins/TestONOS.property'
124 script-content: |
125 echo "ONOSBranch=$ONOSBranch" > /var/lib/jenkins/TestONOS.property
126 echo "TestONBranch=$TestONBranch" >> /var/lib/jenkins/TestONOS.property
127 echo "ONOSTag=$ONOSTag" >> /var/lib/jenkins/TestONOS.property
128 echo "WikiPrefix=$WikiPrefix" >> /var/lib/jenkins/TestONOS.property
129 override-build-parameters: true
130
131 # post_Job
Devin Lim49200ec2018-01-19 16:17:41 -0800132 properties:
133
134 - build-discarder:
135 num-to-keep: 15
136
137 parameters:
138
139 - string:
140 name: 'DAYS_OLD'
141 default: '15'
142
143 - lf-infra-parameters:
144 project: '{project}'
145 branch: '{stream}'
146 stream: '{stream}'
147 lftools-version: '{lftools-version}'
148
149 node: 'TestStation-CHOs'
150
Devin Lim2b5ef2e2018-02-27 14:05:08 -0800151 triggers:
152 - timed: '@daily'
Devin Lim49200ec2018-01-19 16:17:41 -0800153 builders:
154
Devin Limb00d26a2018-02-01 17:27:59 -0800155 - shell: !include-raw-escape: cho-clean-up.sh
Devin Lim18f459d2018-01-26 19:20:30 -0800156
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800157- job-template:
158 name: QA-check-style
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -0800159 description: |
160 <!-- Managed by Jenkins Job Builder -->
161 <h3>ONOS QA Code Style:</h3>
162 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 />
163 All .py files that are in the most recent patchset will be style checked.<br />
164 <br />
165 Jenkins User will give +1 if all files pass the style check, -1 if there is at least one style check failure.<br />
166 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 />
167 <br />
168 Click on the link in the Gerrit patchset comment to view the results of the style check.<br />
169 Alternatively, you can check the console output to view the files checked and style check raw output.<br />
170 <br />
171 You may also manually run this job by selecting "Build with Parameters", then providing the 5-digit change number from Gerrit.<br />
172 <br />
173 <h3>Important Notes:</h3>
174 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 />
175 Build numbers that are 1 build apart may NOT necessarily correspond to the same patchset!<br />
176 Manually running this job will NOT leave a comment after the most recent patchset in Gerrit.<br />
177 <br />
178 <h3>Style Check PEP8 Exclusions:</h3>
179 This job mainly follows PEP8 style check, but excludes many errors and warnings.<br />
180 The following errors and warnings are excluded from the PEP8 check portion of the job:
181 <ul>
182 <li>E251</li>
183 <li>E201</li>
184 <li>E302</li>
185 <li>E202</li>
186 <li>E126</li>
187 <li>E127</li>
188 <li>E203</li>
189 <li>E226</li>
190 <li>E501</li>
191 <li>W391</li>
192 </ul>
193 <h3>Credits:</h3>
194 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 />
195 The check style portion of the job is modeled from "HA-Jobs/codecheck_test"<br />
196 Created by Jeremy Ronquillo: jeremyr@opennetworking.org or j_ronquillo@u.pacific.edu<br />
197 <br />
198 Copyright (c) 2017 Open Networking Foundation (ONF)
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800199
200 <<: *test-free-job-boiler-plate
201 properties:
202
203 - build-discarder:
Devin Lim18f459d2018-01-26 19:20:30 -0800204 num-to-keep: 100
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800205
206 parameters:
207
208 - string:
Devin Lim18f459d2018-01-26 19:20:30 -0800209 name: 'GERRIT_CHANGE_NUMBER'
210 default: ''
211 description: '5-digit number that corresponds to the patch set change on Gerrit.'
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800212
213 - lf-infra-parameters:
214 project: '{project}'
215 branch: '{stream}'
216 stream: '{stream}'
217 lftools-version: '{lftools-version}'
218
Devin Lim18f459d2018-01-26 19:20:30 -0800219 concurrent: true
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800220
Jeremy Ronquillo1929ca22019-07-24 14:59:15 -0700221 node: 'check-style'
Devin Lim18f459d2018-01-26 19:20:30 -0800222
Devin Lim323c9872018-01-30 19:57:58 -0800223 triggers:
224 - gerrit:
Zack Williamsf708d362019-08-20 11:53:23 -0700225 server-name: 'ONOS Project Gerrit'
Devin Lim323c9872018-01-30 19:57:58 -0800226 trigger-on:
227 - patchset-created-event:
228 exclude-drafts: false
229 exclude-trivial-rebase: false
230 exclude-no-code-change: false
231 - draft-published-event
232 - comment-added-contains-event:
233 comment-contains-value: '(?i)^.*recheck$'
234 projects:
235 - project-compare-type: PLAIN
236 project-pattern: '{project}'
237 branches:
You Wanga70156d2018-08-07 14:36:46 -0700238 - branch-compare-type: REG_EXP
239 branch-pattern: '(master|onos-1.(1[3-9]|[2-9][0-9]))'
Devin Lim323c9872018-01-30 19:57:58 -0800240 wrappers:
241 - lf-infra-wrappers:
242 build-timeout: 1800
243 jenkins-ssh-credential: '{jenkins-ssh-credential}'
244
Devin Lim18f459d2018-01-26 19:20:30 -0800245 builders:
Devin Lime65e71c2018-02-09 15:01:33 -0800246 - shell: !include-raw-escape: check-style.sh
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800247
Devin Limb00d26a2018-02-01 17:27:59 -0800248 publishers:
249 - warnings:
250 workspace-file-scanners:
251 - file-pattern: pep8Result.txt
252 scanner: Pep8
Devin Lime65e71c2018-02-09 15:01:33 -0800253 total-thresholds:
254 unstable:
255 total-all: 1
Devin Lim323c9872018-01-30 19:57:58 -0800256
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800257- job-template:
258 name: delta-nightly
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -0800259 description: |
260 <!-- Managed by Jenkins Job Builder -->
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800261
262 <<: *test-free-job-boiler-plate
263 properties:
264
265 - build-discarder:
266 num-to-keep: 30
267
268 parameters:
269
270 - string:
271 name: 'NIGHTLY_FILE_NAME'
272 default: ''
273 description: |
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -0800274 Name of ONOS nightly build file <br />
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800275 will be set to the latest file if not specified here
276
277 - string:
278 name: 'ONOS_VERSION'
279 default: '1.11.0'
280 description: 'Version number in ONOS nightly build file'
281
282 - string:
283 name: 'DELTA_PATH'
284 default: '/home/sdn'
285 description: 'Path of DELTA project'
286
287 - string:
288 name: 'WIKI_PREFIX'
289 default: 'master'
290
291 - bool:
292 name: 'CLEANUP'
293 default: true
294
295 - lf-infra-parameters:
296 project: '{project}'
297 branch: '{stream}'
298 stream: '{stream}'
299 lftools-version: '{lftools-version}'
300
301 node: 'TestStation-BMs'
302
303 wrappers:
304 - inject:
305 properties-file: '/var/jenkins/TestONOS.property'
306
307 builders:
308
309 - shell: !include-raw-escape: delta-script.sh
310
Devin Limb00d26a2018-02-01 17:27:59 -0800311 publishers:
312 - plot:
313 - title: 'DELTA Test Results for master'
314 group: 'DELTA-nightly'
315 yaxis: 'Number of test cases'
316 style: line
317 series:
318 - file: 'DELTA-nightly.csv'
319 format: 'csv'
320
321 # Todo : add confluence ( use pipeline for post build ..? )
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800322
Devin Lim18f459d2018-01-26 19:20:30 -0800323- job-template:
324 name: init-CHO
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -0800325 description: |
326 <!-- Managed by Jenkins Job Builder -->
327 1) Set a specific onos branch to test; <br />
328 2) pull and checkout the branch; <br />
329 3) build onos and package to tar.gz <br />
Devin Lim18f459d2018-01-26 19:20:30 -0800330
331 <<: *test-free-job-boiler-plate
332 properties:
333
334 - build-discarder:
335 num-to-keep: 30
336
337 parameters:
338
339 - string:
340 name: 'ONOSBranch'
341 default: 'master'
342 description: |
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -0800343 set onos branch to test. default to "master", <br />
344 but can also be set at "onos-1.2", etc. <br />
Devin Lim18f459d2018-01-26 19:20:30 -0800345 This parameter is also use to trigger where the test results to be posted
346
347 - string:
You Wang8a605bc2019-01-03 10:48:45 -0800348 name: 'ONOSJAVAOPTS'
You Wang2e8ef572019-05-20 16:05:17 -0700349 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 -0800350 description: 'onos cell JAVA_OPTS setting'
Devin Lim18f459d2018-01-26 19:20:30 -0800351
352 - string:
353 name: 'TestONBranch'
354 default: 'master'
355 description: 'sets TestON branch'
356
357 - string:
358 name: 'ONOSTag'
359 default: ''
360
361 - lf-infra-parameters:
362 project: '{project}'
363 branch: '{stream}'
364 stream: '{stream}'
365 lftools-version: '{lftools-version}'
366
Devin Lim0e1bac02018-04-24 17:46:59 -0700367 node: 'TestStation-Fabric5s'
Devin Lim18f459d2018-01-26 19:20:30 -0800368
369 wrappers:
370 - inject:
371 properties-file: '/var/lib/jenkins/TestONOS.property'
372 script-content: |
373 echo "ONOSBranch=$ONOSBranch" > /var/lib/jenkins/TestONOS.property
374 echo "TestONBranch=$TestONBranch" >> /var/lib/jenkins/TestONOS.property
375 echo "ONOSTag=$ONOSTag" >> /var/lib/jenkins/TestONOS.property
376
377 override-build-parameters: true
378
379 builders:
380
381 - shell: !include-raw-escape: cho-init.sh
382
383- job-template:
384 name: running-CHO
385
386 <<: *test-free-job-boiler-plate
387 properties:
388
389 - build-discarder:
390 num-to-keep: 30
391
392 parameters:
393
394 - lf-infra-parameters:
395 project: '{project}'
396 branch: '{stream}'
397 stream: '{stream}'
398 lftools-version: '{lftools-version}'
399
Devin Lim0e1bac02018-04-24 17:46:59 -0700400 node: 'TestStation-Fabric5s'
Devin Lim18f459d2018-01-26 19:20:30 -0800401 triggers:
402 - reverse:
403 jobs: 'init-CHO'
404 result: 'failure'
405
406 builders:
407
408 - shell: !include-raw-escape: running-cho.sh
409
410- job-template:
You Wange59d3442018-05-25 14:04:05 -0700411 name: 'SR-log-{version}'
412 id: SR-log-storage
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800413
Devin Lim323c9872018-01-30 19:57:58 -0800414 <<: *test-free-job-boiler-plate
415 properties:
416
417 - build-discarder:
Devin Lim1c4753e2018-03-23 15:31:38 -0700418 num-to-keep: 50
Devin Lim323c9872018-01-30 19:57:58 -0800419
420 parameters:
421
422 - lf-infra-parameters:
423 project: '{project}'
424 branch: '{stream}'
425 stream: '{stream}'
426 lftools-version: '{lftools-version}'
427
You Wange59d3442018-05-25 14:04:05 -0700428 node: 'TestStation-Fabric{fabricOn}s'
Devin Lim323c9872018-01-30 19:57:58 -0800429 publishers:
430
431 - archive:
Devin Limb00d26a2018-02-01 17:27:59 -0800432 artifacts: '*'
433
434- job-template:
435 name: test-HA
436
437 <<: *test-free-job-boiler-plate
438 properties:
439
440 - build-discarder:
441
442 days-to-keep: 5
443 num-to-keep: 100
444
445 parameters:
446
447 - string:
448 name: 'TEST_NAME'
449 default: 'HAbackupRecover'
450 description: 'The name of the TestON test suite'
451
452 - lf-infra-parameters:
453 project: '{project}'
454 branch: '{stream}'
455 stream: '{stream}'
456 lftools-version: '{lftools-version}'
457
458 node: 'TestStation-Jons'
459 triggers:
460 - reverse:
461 jobs: 'test-HA'
462 result: 'failure'
463
464 builders:
465
466 - shell: !include-raw-escape: test-ha.sh
467
468 publishers:
469 - plot:
470 - title: 'Test job results'
471 group: 'Test-HA'
472 yaxis: 'Number of test cases'
473 style: line
474 series:
475 - file: 'results.csv'
476 format: 'csv'
477
478 - title: 'Timers'
479 group: 'Test-HA'
480 yaxis: 'Time in seconds'
481 style: line
482 series:
483 - file: 'Timers.csv'
484 format: 'csv'
485
486 - post-tasks:
487 - escalate-status: true
488 script: |
489 if [ -e ${{WORKSPACE}}/${{TEST_NAME##*/}}Wiki.txt ] && ! grep -q "FAIL" ${{WORKSPACE}}/${{TEST_NAME##*/}}Wiki.txt
490 then
491 exit 0
492 else
493 exit 1
494 fi
Devin Lim49200ec2018-01-19 16:17:41 -0800495
496- project:
497 name: post-result-jobs
498 project-name: post-result-jobs
499
500 <<: *test-free-init-procedure-plate
Devin Lim49200ec2018-01-19 16:17:41 -0800501 jobs:
Devin Lim02197b22018-05-10 17:09:38 -0700502 - 'postjob-{station-type}':
503 station-type:
504 - 'VM'
505 - 'BM'
506 - 'Fabric'
Jeremy Ronquillo1929ca22019-07-24 14:59:15 -0700507 - 'Fabric2'
508 - 'Fabric3'
509 - 'Fabric4'
Devin Lim02197b22018-05-10 17:09:38 -0700510 - 'Fabric5'
You Wangdc53adf2019-02-07 13:47:33 -0800511 - 'Trellis-POD'
Devin Lim49200ec2018-01-19 16:17:41 -0800512
513- project:
514 name: cleanup-jobs
515 project-name: cleanup-jobs
516
517 <<: *test-free-init-procedure-plate
Devin Lim49200ec2018-01-19 16:17:41 -0800518 jobs:
Devin Lim02197b22018-05-10 17:09:38 -0700519 - 'test-station-log-cleanup':
520 clean-station-type:
521 - 'BM'
522 - 'Fabric'
523 - 'Fabric2'
524 - 'Fabric3'
525 - 'Fabric4'
526 days_remove: '30'
527 date: ''
528
529 - 'test-station-log-cleanup':
530 clean-station-type:
531 - 'VM'
532 - 'Fabric5'
You Wangdc53adf2019-02-07 13:47:33 -0800533 - 'Trellis-POD'
Devin Lim02197b22018-05-10 17:09:38 -0700534 days_remove: '15'
535 date: ',15'
536
Devin Lim49200ec2018-01-19 16:17:41 -0800537 - 'test-station-log-cleanup-CHO'
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800538
539- project:
540 name: check-style
541 project-name: check-style
542
543 <<: *test-free-init-procedure-plate
544 jobs:
545 - 'QA-check-style'
546
547- project:
548 name: delta-test
549 project-name: delta-test
550
551 <<: *test-free-init-procedure-plate
552 jobs:
553 - 'delta-nightly'
Devin Lim7d7cd992018-01-25 14:12:40 -0800554
Devin Lim18f459d2018-01-26 19:20:30 -0800555- project:
556 name: cho-tests
557 project-name: cho-tests
558
559 <<: *test-free-init-procedure-plate
560 jobs:
561 - 'init-CHO'
562 - 'running-CHO'
Devin Lim323c9872018-01-30 19:57:58 -0800563
564- project:
565 name: log-pipeline
566
Devin Lim323c9872018-01-30 19:57:58 -0800567 project-name: 'log-pipeline'
568
569 <<: *test-free-init-procedure-plate
570
You Wang7466fdc2019-08-29 11:45:06 -0700571 sr-version-before-previous: '2.2'
You Wangbefeecf2018-11-09 15:06:57 -0800572 sr-version-previous: '1.15'
You Wang5b70d8c2018-05-25 17:02:59 -0700573 sr-version-current: 'master'
Devin Limf57a9eb2018-04-13 20:00:46 -0700574
Devin Lim323c9872018-01-30 19:57:58 -0800575 jobs:
You Wange59d3442018-05-25 14:04:05 -0700576 - 'SR-log-storage':
577 version: '{sr-version-current}'
578 fabricOn: '4'
579 - 'SR-log-storage':
580 version: '{sr-version-previous}'
581 fabricOn: '2'
582 - 'SR-log-storage':
583 version: '{sr-version-before-previous}'
584 fabricOn: '3'
Devin Limb00d26a2018-02-01 17:27:59 -0800585
586- project:
Devin Limb2965252018-04-09 17:34:14 -0700587 name: personal-station
Devin Limb00d26a2018-02-01 17:27:59 -0800588
Devin Limb2965252018-04-09 17:34:14 -0700589 project-name: 'personal-station'
Devin Limb00d26a2018-02-01 17:27:59 -0800590
591 <<: *test-free-init-procedure-plate
592
593 jobs:
594 - 'test-HA'