blob: 4b515ecbb7671690f9238d1eed59c3cc87378f5d [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'
Devin Lim323c9872018-01-30 19:57:58 -080017 - 'master'
18 - 'manually'
19
Devin Lim49200ec2018-01-19 16:17:41 -080020- test-free-init-procedure-plate: &test-free-init-procedure-plate
21 name: test-free-init-procedure-plate
22 project: OnosSystemTest
23 stream: 'master'
24
25- inject-env-variable-plate: &inject-env-variable-plate
26 name: inject-env-variable-plate
27 wrappers:
28 - inject:
29 properties-file: '/var/jenkins/TestONOS.property'
30 script-content: |
31 echo "ONOSBranch=$ONOSBranch" > /var/jenkins/TestONOS.property
32 echo "TestONBranch=$TestONBranch" >> /var/jenkins/TestONOS.property
33 echo "ONOSTag=$ONOSTag" >> /var/jenkins/TestONOS.property
34 echo "WikiPrefix=$WikiPrefix" >> /var/jenkins/TestONOS.property
35 override-build-parameters: true
36
37# post_Job
38- job-template:
39 name: postjob-{station-type}
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -080040 description: |
41 <!-- Managed by Jenkins Job Builder -->
42 Click on the "Last Successful Artifacts" to view all of the graphs (also accessible when logged out).<br />
43 <font color="red">Unless debugging, DO NOT MANUALLY BUILD THIS PIPELINE.</font><br />
44 <br />
45 Created by Devin Lim - devin@opennetworking.org<br />
46 Copyright (c) 2017 Open Networking Foundation (ONF)
Devin Lim49200ec2018-01-19 16:17:41 -080047
48 <<: *test-free-job-boiler-plate
49
50 properties:
51
52 - build-discarder:
53 num-to-keep: 1
54
55 parameters:
56
57 - lf-infra-parameters:
58 project: '{project}'
59 branch: '{stream}'
60 stream: '{stream}'
61 lftools-version: '{lftools-version}'
62
63 node: 'TestStation-{station-type}s'
64
65 publishers:
66
Devin Lim85722c32018-05-15 13:13:50 -070067 - archive:
68 artifacts: '*.jpg'
69
Devin Limb00d26a2018-02-01 17:27:59 -080070 - image-gallery:
71 - gallery-type: archived-images-gallery
72 title: 'Test result'
73 includes: '*.jpg'
Devin Lim49200ec2018-01-19 16:17:41 -080074
Devin Lim49200ec2018-01-19 16:17:41 -080075- job-template:
Devin Lima008a212018-04-09 16:01:55 -070076 name: test-station-log-cleanup-{clean-station-type}
Devin Lim02197b22018-05-10 17:09:38 -070077 id: test-station-log-cleanup
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -080078 description: |
79 <!-- Managed by Jenkins Job Builder -->
Devin Lim02197b22018-05-10 17:09:38 -070080 clean up periodically ~/OnosSystemTest/TestON/logs - delete logs older than {days_remove} days.
Devin Lim49200ec2018-01-19 16:17:41 -080081
82 <<: *test-free-job-boiler-plate
83 <<: *inject-env-variable-plate
84 properties:
85
86 - build-discarder:
87 num-to-keep: 30
88
89 parameters:
90
91 - string:
92 name: 'DAYS_OLD'
Devin Lim02197b22018-05-10 17:09:38 -070093 default: '{days_remove}'
Devin Lim49200ec2018-01-19 16:17:41 -080094
95 - lf-infra-parameters:
96 project: '{project}'
97 branch: '{stream}'
98 stream: '{stream}'
99 lftools-version: '{lftools-version}'
100
Devin Lima008a212018-04-09 16:01:55 -0700101 node: 'TestStation-{clean-station-type}s'
Devin Lim49200ec2018-01-19 16:17:41 -0800102
Devin Lim2b5ef2e2018-02-27 14:05:08 -0800103 triggers:
Devin Lim02197b22018-05-10 17:09:38 -0700104 - timed: '01 08 1{date} * *'
Devin Lim49200ec2018-01-19 16:17:41 -0800105
106 builders:
107
Devin Limb00d26a2018-02-01 17:27:59 -0800108 - shell: !include-raw-escape: vm-bm-clean-up.sh
Devin Lim49200ec2018-01-19 16:17:41 -0800109
110- job-template:
111 name: test-station-log-cleanup-CHO
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -0800112 description: |
113 <!-- Managed by Jenkins Job Builder -->
114
115
Devin Lim49200ec2018-01-19 16:17:41 -0800116
117 <<: *test-free-job-boiler-plate
Devin Limc284c982018-03-30 12:13:00 -0700118 wrappers:
119 - inject:
120 properties-file: '/var/lib/jenkins/TestONOS.property'
121 script-content: |
122 echo "ONOSBranch=$ONOSBranch" > /var/lib/jenkins/TestONOS.property
123 echo "TestONBranch=$TestONBranch" >> /var/lib/jenkins/TestONOS.property
124 echo "ONOSTag=$ONOSTag" >> /var/lib/jenkins/TestONOS.property
125 echo "WikiPrefix=$WikiPrefix" >> /var/lib/jenkins/TestONOS.property
126 override-build-parameters: true
127
128 # post_Job
Devin Lim49200ec2018-01-19 16:17:41 -0800129 properties:
130
131 - build-discarder:
132 num-to-keep: 15
133
134 parameters:
135
136 - string:
137 name: 'DAYS_OLD'
138 default: '15'
139
140 - lf-infra-parameters:
141 project: '{project}'
142 branch: '{stream}'
143 stream: '{stream}'
144 lftools-version: '{lftools-version}'
145
146 node: 'TestStation-CHOs'
147
Devin Lim2b5ef2e2018-02-27 14:05:08 -0800148 triggers:
149 - timed: '@daily'
Devin Lim49200ec2018-01-19 16:17:41 -0800150 builders:
151
Devin Limb00d26a2018-02-01 17:27:59 -0800152 - shell: !include-raw-escape: cho-clean-up.sh
Devin Lim18f459d2018-01-26 19:20:30 -0800153
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800154- job-template:
155 name: QA-check-style
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -0800156 description: |
157 <!-- Managed by Jenkins Job Builder -->
158 <h3>ONOS QA Code Style:</h3>
159 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 />
160 All .py files that are in the most recent patchset will be style checked.<br />
161 <br />
162 Jenkins User will give +1 if all files pass the style check, -1 if there is at least one style check failure.<br />
163 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 />
164 <br />
165 Click on the link in the Gerrit patchset comment to view the results of the style check.<br />
166 Alternatively, you can check the console output to view the files checked and style check raw output.<br />
167 <br />
168 You may also manually run this job by selecting "Build with Parameters", then providing the 5-digit change number from Gerrit.<br />
169 <br />
170 <h3>Important Notes:</h3>
171 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 />
172 Build numbers that are 1 build apart may NOT necessarily correspond to the same patchset!<br />
173 Manually running this job will NOT leave a comment after the most recent patchset in Gerrit.<br />
174 <br />
175 <h3>Style Check PEP8 Exclusions:</h3>
176 This job mainly follows PEP8 style check, but excludes many errors and warnings.<br />
177 The following errors and warnings are excluded from the PEP8 check portion of the job:
178 <ul>
179 <li>E251</li>
180 <li>E201</li>
181 <li>E302</li>
182 <li>E202</li>
183 <li>E126</li>
184 <li>E127</li>
185 <li>E203</li>
186 <li>E226</li>
187 <li>E501</li>
188 <li>W391</li>
189 </ul>
190 <h3>Credits:</h3>
191 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 />
192 The check style portion of the job is modeled from "HA-Jobs/codecheck_test"<br />
193 Created by Jeremy Ronquillo: jeremyr@opennetworking.org or j_ronquillo@u.pacific.edu<br />
194 <br />
195 Copyright (c) 2017 Open Networking Foundation (ONF)
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800196
197 <<: *test-free-job-boiler-plate
198 properties:
199
200 - build-discarder:
Devin Lim18f459d2018-01-26 19:20:30 -0800201 num-to-keep: 100
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800202
203 parameters:
204
205 - string:
Devin Lim18f459d2018-01-26 19:20:30 -0800206 name: 'GERRIT_CHANGE_NUMBER'
207 default: ''
208 description: '5-digit number that corresponds to the patch set change on Gerrit.'
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800209
210 - lf-infra-parameters:
211 project: '{project}'
212 branch: '{stream}'
213 stream: '{stream}'
214 lftools-version: '{lftools-version}'
215
Devin Lim18f459d2018-01-26 19:20:30 -0800216 concurrent: true
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800217
Devin Lim18f459d2018-01-26 19:20:30 -0800218 node: 'TestStation-Jeremys'
219
Devin Lim323c9872018-01-30 19:57:58 -0800220 triggers:
221 - gerrit:
Devin Lim491d92b2018-02-09 10:41:45 -0800222 server-name: 'OnosSystemTest Project Gerrit'
Devin Lim323c9872018-01-30 19:57:58 -0800223 trigger-on:
224 - patchset-created-event:
225 exclude-drafts: false
226 exclude-trivial-rebase: false
227 exclude-no-code-change: false
228 - draft-published-event
229 - comment-added-contains-event:
230 comment-contains-value: '(?i)^.*recheck$'
231 projects:
232 - project-compare-type: PLAIN
233 project-pattern: '{project}'
234 branches:
You Wanga70156d2018-08-07 14:36:46 -0700235 - branch-compare-type: REG_EXP
236 branch-pattern: '(master|onos-1.(1[3-9]|[2-9][0-9]))'
Devin Lim323c9872018-01-30 19:57:58 -0800237 wrappers:
238 - lf-infra-wrappers:
239 build-timeout: 1800
240 jenkins-ssh-credential: '{jenkins-ssh-credential}'
241
Devin Lim18f459d2018-01-26 19:20:30 -0800242 builders:
Devin Lime65e71c2018-02-09 15:01:33 -0800243 - shell: !include-raw-escape: check-style.sh
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800244
Devin Limb00d26a2018-02-01 17:27:59 -0800245 publishers:
246 - warnings:
247 workspace-file-scanners:
248 - file-pattern: pep8Result.txt
249 scanner: Pep8
Devin Lime65e71c2018-02-09 15:01:33 -0800250 total-thresholds:
251 unstable:
252 total-all: 1
Devin Lim323c9872018-01-30 19:57:58 -0800253
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800254- job-template:
255 name: delta-nightly
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -0800256 description: |
257 <!-- Managed by Jenkins Job Builder -->
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800258
259 <<: *test-free-job-boiler-plate
260 properties:
261
262 - build-discarder:
263 num-to-keep: 30
264
265 parameters:
266
267 - string:
268 name: 'NIGHTLY_FILE_NAME'
269 default: ''
270 description: |
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -0800271 Name of ONOS nightly build file <br />
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800272 will be set to the latest file if not specified here
273
274 - string:
275 name: 'ONOS_VERSION'
276 default: '1.11.0'
277 description: 'Version number in ONOS nightly build file'
278
279 - string:
280 name: 'DELTA_PATH'
281 default: '/home/sdn'
282 description: 'Path of DELTA project'
283
284 - string:
285 name: 'WIKI_PREFIX'
286 default: 'master'
287
288 - bool:
289 name: 'CLEANUP'
290 default: true
291
292 - lf-infra-parameters:
293 project: '{project}'
294 branch: '{stream}'
295 stream: '{stream}'
296 lftools-version: '{lftools-version}'
297
298 node: 'TestStation-BMs'
299
300 wrappers:
301 - inject:
302 properties-file: '/var/jenkins/TestONOS.property'
303
304 builders:
305
306 - shell: !include-raw-escape: delta-script.sh
307
Devin Limb00d26a2018-02-01 17:27:59 -0800308 publishers:
309 - plot:
310 - title: 'DELTA Test Results for master'
311 group: 'DELTA-nightly'
312 yaxis: 'Number of test cases'
313 style: line
314 series:
315 - file: 'DELTA-nightly.csv'
316 format: 'csv'
317
318 # Todo : add confluence ( use pipeline for post build ..? )
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800319
Devin Lim18f459d2018-01-26 19:20:30 -0800320- job-template:
321 name: init-CHO
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -0800322 description: |
323 <!-- Managed by Jenkins Job Builder -->
324 1) Set a specific onos branch to test; <br />
325 2) pull and checkout the branch; <br />
326 3) build onos and package to tar.gz <br />
Devin Lim18f459d2018-01-26 19:20:30 -0800327
328 <<: *test-free-job-boiler-plate
329 properties:
330
331 - build-discarder:
332 num-to-keep: 30
333
334 parameters:
335
336 - string:
337 name: 'ONOSBranch'
338 default: 'master'
339 description: |
Jeremy Ronquillo34e993b2018-02-07 10:43:15 -0800340 set onos branch to test. default to "master", <br />
341 but can also be set at "onos-1.2", etc. <br />
Devin Lim18f459d2018-01-26 19:20:30 -0800342 This parameter is also use to trigger where the test results to be posted
343
344 - string:
345 name: 'ONOSJVMHeap'
346 default: "\"${{JAVA_OPTS:--Xms8G -Xmx8G}}\""
347 description: 'onos cell jvm heap size setting'
348
349 - string:
350 name: 'TestONBranch'
351 default: 'master'
352 description: 'sets TestON branch'
353
354 - string:
355 name: 'ONOSTag'
356 default: ''
357
358 - lf-infra-parameters:
359 project: '{project}'
360 branch: '{stream}'
361 stream: '{stream}'
362 lftools-version: '{lftools-version}'
363
Devin Lim0e1bac02018-04-24 17:46:59 -0700364 node: 'TestStation-Fabric5s'
Devin Lim18f459d2018-01-26 19:20:30 -0800365
366 wrappers:
367 - inject:
368 properties-file: '/var/lib/jenkins/TestONOS.property'
369 script-content: |
370 echo "ONOSBranch=$ONOSBranch" > /var/lib/jenkins/TestONOS.property
371 echo "TestONBranch=$TestONBranch" >> /var/lib/jenkins/TestONOS.property
372 echo "ONOSTag=$ONOSTag" >> /var/lib/jenkins/TestONOS.property
373
374 override-build-parameters: true
375
376 builders:
377
378 - shell: !include-raw-escape: cho-init.sh
379
380- job-template:
381 name: running-CHO
382
383 <<: *test-free-job-boiler-plate
384 properties:
385
386 - build-discarder:
387 num-to-keep: 30
388
389 parameters:
390
391 - lf-infra-parameters:
392 project: '{project}'
393 branch: '{stream}'
394 stream: '{stream}'
395 lftools-version: '{lftools-version}'
396
Devin Lim0e1bac02018-04-24 17:46:59 -0700397 node: 'TestStation-Fabric5s'
Devin Lim18f459d2018-01-26 19:20:30 -0800398 triggers:
399 - reverse:
400 jobs: 'init-CHO'
401 result: 'failure'
402
403 builders:
404
405 - shell: !include-raw-escape: running-cho.sh
406
407- job-template:
You Wange59d3442018-05-25 14:04:05 -0700408 name: 'SR-log-{version}'
409 id: SR-log-storage
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
You Wange59d3442018-05-25 14:04:05 -0700425 node: 'TestStation-Fabric{fabricOn}s'
Devin Lim323c9872018-01-30 19:57:58 -0800426 publishers:
427
428 - archive:
Devin Limb00d26a2018-02-01 17:27:59 -0800429 artifacts: '*'
430
431- job-template:
432 name: test-HA
433
434 <<: *test-free-job-boiler-plate
435 properties:
436
437 - build-discarder:
438
439 days-to-keep: 5
440 num-to-keep: 100
441
442 parameters:
443
444 - string:
445 name: 'TEST_NAME'
446 default: 'HAbackupRecover'
447 description: 'The name of the TestON test suite'
448
449 - lf-infra-parameters:
450 project: '{project}'
451 branch: '{stream}'
452 stream: '{stream}'
453 lftools-version: '{lftools-version}'
454
455 node: 'TestStation-Jons'
456 triggers:
457 - reverse:
458 jobs: 'test-HA'
459 result: 'failure'
460
461 builders:
462
463 - shell: !include-raw-escape: test-ha.sh
464
465 publishers:
466 - plot:
467 - title: 'Test job results'
468 group: 'Test-HA'
469 yaxis: 'Number of test cases'
470 style: line
471 series:
472 - file: 'results.csv'
473 format: 'csv'
474
475 - title: 'Timers'
476 group: 'Test-HA'
477 yaxis: 'Time in seconds'
478 style: line
479 series:
480 - file: 'Timers.csv'
481 format: 'csv'
482
483 - post-tasks:
484 - escalate-status: true
485 script: |
486 if [ -e ${{WORKSPACE}}/${{TEST_NAME##*/}}Wiki.txt ] && ! grep -q "FAIL" ${{WORKSPACE}}/${{TEST_NAME##*/}}Wiki.txt
487 then
488 exit 0
489 else
490 exit 1
491 fi
Devin Lim49200ec2018-01-19 16:17:41 -0800492
493- project:
494 name: post-result-jobs
495 project-name: post-result-jobs
496
497 <<: *test-free-init-procedure-plate
Devin Lim49200ec2018-01-19 16:17:41 -0800498 jobs:
Devin Lim02197b22018-05-10 17:09:38 -0700499 - 'postjob-{station-type}':
500 station-type:
501 - 'VM'
502 - 'BM'
503 - 'Fabric'
504 - 'Fabric2'
505 - 'Fabric3'
You Wange59d3442018-05-25 14:04:05 -0700506 - 'Fabric4'
Devin Lim02197b22018-05-10 17:09:38 -0700507 - 'Fabric5'
Devin Lim49200ec2018-01-19 16:17:41 -0800508
509- project:
510 name: cleanup-jobs
511 project-name: cleanup-jobs
512
513 <<: *test-free-init-procedure-plate
Devin Lim49200ec2018-01-19 16:17:41 -0800514 jobs:
Devin Lim02197b22018-05-10 17:09:38 -0700515 - 'test-station-log-cleanup':
516 clean-station-type:
517 - 'BM'
518 - 'Fabric'
519 - 'Fabric2'
520 - 'Fabric3'
521 - 'Fabric4'
522 days_remove: '30'
523 date: ''
524
525 - 'test-station-log-cleanup':
526 clean-station-type:
527 - 'VM'
528 - 'Fabric5'
529 days_remove: '15'
530 date: ',15'
531
Devin Lim49200ec2018-01-19 16:17:41 -0800532 - 'test-station-log-cleanup-CHO'
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800533
534- project:
535 name: check-style
536 project-name: check-style
537
538 <<: *test-free-init-procedure-plate
539 jobs:
540 - 'QA-check-style'
541
542- project:
543 name: delta-test
544 project-name: delta-test
545
546 <<: *test-free-init-procedure-plate
547 jobs:
548 - 'delta-nightly'
Devin Lim7d7cd992018-01-25 14:12:40 -0800549
Devin Lim18f459d2018-01-26 19:20:30 -0800550- project:
551 name: cho-tests
552 project-name: cho-tests
553
554 <<: *test-free-init-procedure-plate
555 jobs:
556 - 'init-CHO'
557 - 'running-CHO'
Devin Lim323c9872018-01-30 19:57:58 -0800558
559- project:
560 name: log-pipeline
561
Devin Lim323c9872018-01-30 19:57:58 -0800562 project-name: 'log-pipeline'
563
564 <<: *test-free-init-procedure-plate
565
You Wang7ab523d2018-08-20 15:03:43 -0700566 sr-version-before-previous: '1.14'
You Wangbefeecf2018-11-09 15:06:57 -0800567 sr-version-previous: '1.15'
You Wang5b70d8c2018-05-25 17:02:59 -0700568 sr-version-current: 'master'
Devin Limf57a9eb2018-04-13 20:00:46 -0700569
Devin Lim323c9872018-01-30 19:57:58 -0800570 jobs:
You Wange59d3442018-05-25 14:04:05 -0700571 - 'SR-log-storage':
572 version: '{sr-version-current}'
573 fabricOn: '4'
574 - 'SR-log-storage':
575 version: '{sr-version-previous}'
576 fabricOn: '2'
577 - 'SR-log-storage':
578 version: '{sr-version-before-previous}'
579 fabricOn: '3'
Devin Limb00d26a2018-02-01 17:27:59 -0800580
581- project:
Devin Limb2965252018-04-09 17:34:14 -0700582 name: personal-station
Devin Limb00d26a2018-02-01 17:27:59 -0800583
Devin Limb2965252018-04-09 17:34:14 -0700584 project-name: 'personal-station'
Devin Limb00d26a2018-02-01 17:27:59 -0800585
586 <<: *test-free-init-procedure-plate
587
588 jobs:
589 - 'test-HA'
Devin Lim157404d2018-02-09 16:44:19 -0800590