blob: 4e4c4c676f2040acb37b793c44133ef49daaf6d3 [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'
15
Devin Lim323c9872018-01-30 19:57:58 -080016- job-free-version-plate: &job-free-version-plate
17 name: job-free-version-plate
18 version:
19 - '1.11'
20 - '1.12'
21 - 'master'
22 - 'manually'
23
Devin Lim49200ec2018-01-19 16:17:41 -080024- test-free-init-procedure-plate: &test-free-init-procedure-plate
25 name: test-free-init-procedure-plate
26 project: OnosSystemTest
27 stream: 'master'
28
29- inject-env-variable-plate: &inject-env-variable-plate
30 name: inject-env-variable-plate
31 wrappers:
32 - inject:
33 properties-file: '/var/jenkins/TestONOS.property'
34 script-content: |
35 echo "ONOSBranch=$ONOSBranch" > /var/jenkins/TestONOS.property
36 echo "TestONBranch=$TestONBranch" >> /var/jenkins/TestONOS.property
37 echo "ONOSTag=$ONOSTag" >> /var/jenkins/TestONOS.property
38 echo "WikiPrefix=$WikiPrefix" >> /var/jenkins/TestONOS.property
39 override-build-parameters: true
40
41# post_Job
42- job-template:
43 name: postjob-{station-type}
44
45 <<: *test-free-job-boiler-plate
46
47 properties:
48
49 - build-discarder:
50 num-to-keep: 1
51
52 parameters:
53
54 - lf-infra-parameters:
55 project: '{project}'
56 branch: '{stream}'
57 stream: '{stream}'
58 lftools-version: '{lftools-version}'
59
60 node: 'TestStation-{station-type}s'
61
62 publishers:
63
Devin Limb00d26a2018-02-01 17:27:59 -080064 - image-gallery:
65 - gallery-type: archived-images-gallery
66 title: 'Test result'
67 includes: '*.jpg'
Devin Lim49200ec2018-01-19 16:17:41 -080068
69 - archive:
70 artifacts: '*.jpg'
71
Devin Lim49200ec2018-01-19 16:17:41 -080072- job-template:
73 name: test-station-log-cleanup-VM
74
75 <<: *test-free-job-boiler-plate
76 <<: *inject-env-variable-plate
77 properties:
78
79 - build-discarder:
80 num-to-keep: 30
81
82 parameters:
83
84 - string:
85 name: 'DAYS_OLD'
86 default: '15'
87
88 - lf-infra-parameters:
89 project: '{project}'
90 branch: '{stream}'
91 stream: '{stream}'
92 lftools-version: '{lftools-version}'
93
94 node: 'TestStation-VMs'
95
Devin Lim9c8fa3e2018-01-24 16:47:15 -080096# triggers:
97# - timed: '01 08 1,15 * *'
Devin Lim49200ec2018-01-19 16:17:41 -080098 builders:
99
Devin Limb00d26a2018-02-01 17:27:59 -0800100 - shell: !include-raw-escape: vm-bm-clean-up.sh
Devin Lim49200ec2018-01-19 16:17:41 -0800101
102- job-template:
103 name: test-station-log-cleanup-BM
104
105 <<: *test-free-job-boiler-plate
106 <<: *inject-env-variable-plate
107 properties:
108
109 - build-discarder:
110 num-to-keep: 30
111
112 parameters:
113
114 - string:
115 name: 'DAYS_OLD'
116 default: '30'
117
118 - lf-infra-parameters:
119 project: '{project}'
120 branch: '{stream}'
121 stream: '{stream}'
122 lftools-version: '{lftools-version}'
123
124 node: 'TestStation-BMs'
125
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800126# triggers:
127# - timed: '01 08 1 * *'
Devin Lim49200ec2018-01-19 16:17:41 -0800128
129 builders:
130
Devin Limb00d26a2018-02-01 17:27:59 -0800131 - shell: !include-raw-escape: vm-bm-clean-up.sh
Devin Lim49200ec2018-01-19 16:17:41 -0800132
133- job-template:
134 name: test-station-log-cleanup-CHO
135
136 <<: *test-free-job-boiler-plate
137 <<: *inject-env-variable-plate
138 properties:
139
140 - build-discarder:
141 num-to-keep: 15
142
143 parameters:
144
145 - string:
146 name: 'DAYS_OLD'
147 default: '15'
148
149 - lf-infra-parameters:
150 project: '{project}'
151 branch: '{stream}'
152 stream: '{stream}'
153 lftools-version: '{lftools-version}'
154
155 node: 'TestStation-CHOs'
156
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800157# triggers:
158# - timed: '@daily'
Devin Lim49200ec2018-01-19 16:17:41 -0800159 builders:
160
Devin Limb00d26a2018-02-01 17:27:59 -0800161 - shell: !include-raw-escape: cho-clean-up.sh
Devin Lim18f459d2018-01-26 19:20:30 -0800162
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800163- job-template:
164 name: QA-check-style
165
166 <<: *test-free-job-boiler-plate
167 properties:
168
169 - build-discarder:
Devin Lim18f459d2018-01-26 19:20:30 -0800170 num-to-keep: 100
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800171
172 parameters:
173
174 - string:
Devin Lim18f459d2018-01-26 19:20:30 -0800175 name: 'GERRIT_CHANGE_NUMBER'
176 default: ''
177 description: '5-digit number that corresponds to the patch set change on Gerrit.'
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800178
179 - lf-infra-parameters:
180 project: '{project}'
181 branch: '{stream}'
182 stream: '{stream}'
183 lftools-version: '{lftools-version}'
184
Devin Lim18f459d2018-01-26 19:20:30 -0800185 concurrent: true
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800186
Devin Lim18f459d2018-01-26 19:20:30 -0800187 node: 'TestStation-Jeremys'
188
Devin Lim323c9872018-01-30 19:57:58 -0800189 triggers:
190 - gerrit:
Devin Lim491d92b2018-02-09 10:41:45 -0800191 server-name: 'OnosSystemTest Project Gerrit'
Devin Lim323c9872018-01-30 19:57:58 -0800192 trigger-on:
193 - patchset-created-event:
194 exclude-drafts: false
195 exclude-trivial-rebase: false
196 exclude-no-code-change: false
197 - draft-published-event
198 - comment-added-contains-event:
199 comment-contains-value: '(?i)^.*recheck$'
200 projects:
201 - project-compare-type: PLAIN
202 project-pattern: '{project}'
203 branches:
204 - branch-compare-type: ANT
Devin Lim491d92b2018-02-09 10:41:45 -0800205 branch-pattern: '**/master'
Devin Limb00d26a2018-02-01 17:27:59 -0800206 - branch-compare-type: ANT
Devin Lim491d92b2018-02-09 10:41:45 -0800207 branch-pattern: '**/onos-1.[11-20]'
Devin Lim323c9872018-01-30 19:57:58 -0800208 wrappers:
209 - lf-infra-wrappers:
210 build-timeout: 1800
211 jenkins-ssh-credential: '{jenkins-ssh-credential}'
212
Devin Lim18f459d2018-01-26 19:20:30 -0800213 builders:
214
Devin Limca864a12018-02-09 11:25:30 -0800215 - shell: !include-raw-escape: pre-check-style.sh
Devin Lime65e71c2018-02-09 15:01:33 -0800216 - shell: !include-raw-escape: check-style.sh
Devin Limca864a12018-02-09 11:25:30 -0800217 - shell: !include-raw-escape: post-check-style.sh
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800218
Devin Limb00d26a2018-02-01 17:27:59 -0800219 publishers:
220 - warnings:
221 workspace-file-scanners:
222 - file-pattern: pep8Result.txt
223 scanner: Pep8
Devin Lime65e71c2018-02-09 15:01:33 -0800224 total-thresholds:
225 unstable:
226 total-all: 1
Devin Lim323c9872018-01-30 19:57:58 -0800227
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800228- job-template:
229 name: delta-nightly
230
231 <<: *test-free-job-boiler-plate
232 properties:
233
234 - build-discarder:
235 num-to-keep: 30
236
237 parameters:
238
239 - string:
240 name: 'NIGHTLY_FILE_NAME'
241 default: ''
242 description: |
243 Name of ONOS nightly build file
244 will be set to the latest file if not specified here
245
246 - string:
247 name: 'ONOS_VERSION'
248 default: '1.11.0'
249 description: 'Version number in ONOS nightly build file'
250
251 - string:
252 name: 'DELTA_PATH'
253 default: '/home/sdn'
254 description: 'Path of DELTA project'
255
256 - string:
257 name: 'WIKI_PREFIX'
258 default: 'master'
259
260 - bool:
261 name: 'CLEANUP'
262 default: true
263
264 - lf-infra-parameters:
265 project: '{project}'
266 branch: '{stream}'
267 stream: '{stream}'
268 lftools-version: '{lftools-version}'
269
270 node: 'TestStation-BMs'
271
272 wrappers:
273 - inject:
274 properties-file: '/var/jenkins/TestONOS.property'
275
276 builders:
277
278 - shell: !include-raw-escape: delta-script.sh
279
Devin Limb00d26a2018-02-01 17:27:59 -0800280 publishers:
281 - plot:
282 - title: 'DELTA Test Results for master'
283 group: 'DELTA-nightly'
284 yaxis: 'Number of test cases'
285 style: line
286 series:
287 - file: 'DELTA-nightly.csv'
288 format: 'csv'
289
290 # Todo : add confluence ( use pipeline for post build ..? )
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800291
Devin Lim18f459d2018-01-26 19:20:30 -0800292- job-template:
293 name: init-CHO
294
295 <<: *test-free-job-boiler-plate
296 properties:
297
298 - build-discarder:
299 num-to-keep: 30
300
301 parameters:
302
303 - string:
304 name: 'ONOSBranch'
305 default: 'master'
306 description: |
307 set onos branch to test. default to "master",
308 but can also be set at "onos-1.2", etc.
309 This parameter is also use to trigger where the test results to be posted
310
311 - string:
312 name: 'ONOSJVMHeap'
313 default: "\"${{JAVA_OPTS:--Xms8G -Xmx8G}}\""
314 description: 'onos cell jvm heap size setting'
315
316 - string:
317 name: 'TestONBranch'
318 default: 'master'
319 description: 'sets TestON branch'
320
321 - string:
322 name: 'ONOSTag'
323 default: ''
324
325 - lf-infra-parameters:
326 project: '{project}'
327 branch: '{stream}'
328 stream: '{stream}'
329 lftools-version: '{lftools-version}'
330
331 node: 'TestStation-CHOs'
332
333 wrappers:
334 - inject:
335 properties-file: '/var/lib/jenkins/TestONOS.property'
336 script-content: |
337 echo "ONOSBranch=$ONOSBranch" > /var/lib/jenkins/TestONOS.property
338 echo "TestONBranch=$TestONBranch" >> /var/lib/jenkins/TestONOS.property
339 echo "ONOSTag=$ONOSTag" >> /var/lib/jenkins/TestONOS.property
340
341 override-build-parameters: true
342
343 builders:
344
345 - shell: !include-raw-escape: cho-init.sh
346
347- job-template:
348 name: running-CHO
349
350 <<: *test-free-job-boiler-plate
351 properties:
352
353 - build-discarder:
354 num-to-keep: 30
355
356 parameters:
357
358 - lf-infra-parameters:
359 project: '{project}'
360 branch: '{stream}'
361 stream: '{stream}'
362 lftools-version: '{lftools-version}'
363
364 node: 'TestStation-CHOs'
365 triggers:
366 - reverse:
367 jobs: 'init-CHO'
368 result: 'failure'
369
370 builders:
371
372 - shell: !include-raw-escape: running-cho.sh
373
374- job-template:
375 name: post-CHO-master
376
377 <<: *test-free-job-boiler-plate
378 properties:
379 - lf-infra-properties:
380 project: '{project}'
381 build-days-to-keep: 7
382
383 parameters:
384
385 - lf-infra-parameters:
386 project: '{project}'
387 branch: '{stream}'
388 stream: '{stream}'
389 lftools-version: '{lftools-version}'
390
391 node: 'TestStation-CHOs'
392# triggers:
393# - timed: 'H/60 * * * *'
394 wrappers:
395 - inject:
396 properties-file: '/var/lib/jenkins/TestONOS.property'
397 builders:
398
399 - shell: !include-raw-escape: cho-post.sh
Devin Limb00d26a2018-02-01 17:27:59 -0800400 publishers:
401 - plot:
402 - title: 'Network, Application and ONOS Events (per hour)'
403 group: 'CHOTestMonkey'
404 num-builds: '72'
405 yaxis: 'Number of Events'
406 style: line
407 logarithmic-yaxis: true
408 series:
409 - file: 'event.csv'
410 format: 'csv'
411 - title: 'Failed Checks (per hour)'
412 group: 'CHOTestMonkey'
413 num-builds: '72'
414 yaxis: 'Number of Failed Checks'
415 style: line
416 logarithmic-yaxis: true
417 series:
418 - file: 'failure.csv'
419 format: 'csv'
420 - title: 'Warnings, Errors and Exceptions from Logs (per hour)'
421 group: 'CHOTestMonkey'
422 num-builds: '72'
423 yaxis: 'Number of Warnings or Errors'
424 style: line
425 logarithmic-yaxis: true
426 series:
427 - file: 'error.csv'
428 format: 'csv'
Devin Lim18f459d2018-01-26 19:20:30 -0800429
Devin Lim323c9872018-01-30 19:57:58 -0800430- job-template:
431 name: 'SR-log-{version}'
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800432
Devin Lim323c9872018-01-30 19:57:58 -0800433 <<: *test-free-job-boiler-plate
434 properties:
435
436 - build-discarder:
437 num-to-keep: 30
438
439 parameters:
440
441 - lf-infra-parameters:
442 project: '{project}'
443 branch: '{stream}'
444 stream: '{stream}'
445 lftools-version: '{lftools-version}'
446
447 node: 'TestStation-VMs'
448 publishers:
449
450 - archive:
Devin Limb00d26a2018-02-01 17:27:59 -0800451 artifacts: '*'
452
453- job-template:
454 name: test-HA
455
456 <<: *test-free-job-boiler-plate
457 properties:
458
459 - build-discarder:
460
461 days-to-keep: 5
462 num-to-keep: 100
463
464 parameters:
465
466 - string:
467 name: 'TEST_NAME'
468 default: 'HAbackupRecover'
469 description: 'The name of the TestON test suite'
470
471 - lf-infra-parameters:
472 project: '{project}'
473 branch: '{stream}'
474 stream: '{stream}'
475 lftools-version: '{lftools-version}'
476
477 node: 'TestStation-Jons'
478 triggers:
479 - reverse:
480 jobs: 'test-HA'
481 result: 'failure'
482
483 builders:
484
485 - shell: !include-raw-escape: test-ha.sh
486
487 publishers:
488 - plot:
489 - title: 'Test job results'
490 group: 'Test-HA'
491 yaxis: 'Number of test cases'
492 style: line
493 series:
494 - file: 'results.csv'
495 format: 'csv'
496
497 - title: 'Timers'
498 group: 'Test-HA'
499 yaxis: 'Time in seconds'
500 style: line
501 series:
502 - file: 'Timers.csv'
503 format: 'csv'
504
505 - post-tasks:
506 - escalate-status: true
507 script: |
508 if [ -e ${{WORKSPACE}}/${{TEST_NAME##*/}}Wiki.txt ] && ! grep -q "FAIL" ${{WORKSPACE}}/${{TEST_NAME##*/}}Wiki.txt
509 then
510 exit 0
511 else
512 exit 1
513 fi
Devin Lim49200ec2018-01-19 16:17:41 -0800514
515- project:
516 name: post-result-jobs
517 project-name: post-result-jobs
518
519 <<: *test-free-init-procedure-plate
520 <<: *init-station-plate
521 jobs:
522 - 'postjob-{station-type}'
523
524- project:
525 name: cleanup-jobs
526 project-name: cleanup-jobs
527
528 <<: *test-free-init-procedure-plate
529 <<: *init-station-plate
530 jobs:
531 - 'test-station-log-cleanup-VM'
532 - 'test-station-log-cleanup-BM'
533 - 'test-station-log-cleanup-CHO'
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800534
535- project:
536 name: check-style
537 project-name: check-style
538
539 <<: *test-free-init-procedure-plate
540 jobs:
541 - 'QA-check-style'
542
543- project:
544 name: delta-test
545 project-name: delta-test
546
547 <<: *test-free-init-procedure-plate
548 jobs:
549 - 'delta-nightly'
Devin Lim7d7cd992018-01-25 14:12:40 -0800550
Devin Lim18f459d2018-01-26 19:20:30 -0800551- project:
552 name: cho-tests
553 project-name: cho-tests
554
555 <<: *test-free-init-procedure-plate
556 jobs:
557 - 'init-CHO'
558 - 'running-CHO'
559 - 'post-CHO-master'
Devin Lim323c9872018-01-30 19:57:58 -0800560
561
562- project:
563 name: log-pipeline
564
565 <<: *job-free-version-plate
566
567 project-name: 'log-pipeline'
568
569 <<: *test-free-init-procedure-plate
570
571 jobs:
572 - 'SR-log-{version}'
Devin Limb00d26a2018-02-01 17:27:59 -0800573
574- project:
575 name: personnel-station
576
577 project-name: 'log-pipeline'
578
579 <<: *test-free-init-procedure-plate
580
581 jobs:
582 - 'test-HA'