blob: e1b0607fa55c38fdb1cfcfc8668b3fdeaf0d985c [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
216 - shell:
217 command: |
218 #!/bin/bash
219 cd
220 cd $WORKSPACE/OnosSystemTest/
221 modifiedFiles=$(git diff-tree --no-commit-id --name-only -r HEAD | grep \.py) || modifiedFiles=""
222 if [ -n "$modifiedFiles" ]
223 then
224 pep8 --repeat --show-source --show-pep8 --ignore=E251,E201,E302,E202,E126,E127,E203,E226,E501,W391 $modifiedFiles > $WORKSPACE/pep8Result.txt
225 else
226 touch $WORKSPACE/pep8Result.txt
227 rm -rf $WORKSPACE/OnosSystemTest/
228 echo "There were no files to code check, failing test so Jenkins doesn't comment."
229 exit 2
230 fi
231 unstable-return: 1
232 - shell: !include-raw-escape: post-check-style.sh
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800233
Devin Limb00d26a2018-02-01 17:27:59 -0800234 publishers:
235 - warnings:
236 workspace-file-scanners:
237 - file-pattern: pep8Result.txt
238 scanner: Pep8
Devin Limca864a12018-02-09 11:25:30 -0800239 messages-to-ignore: |
240 Skipping
241 file
242 of
243 module
244 /var/lib/jenkins/workspace/TestON_Style_Check/pep8Result.txt
245 because
246 it's
247 empty.
Devin Lim323c9872018-01-30 19:57:58 -0800248
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800249- job-template:
250 name: delta-nightly
251
252 <<: *test-free-job-boiler-plate
253 properties:
254
255 - build-discarder:
256 num-to-keep: 30
257
258 parameters:
259
260 - string:
261 name: 'NIGHTLY_FILE_NAME'
262 default: ''
263 description: |
264 Name of ONOS nightly build file
265 will be set to the latest file if not specified here
266
267 - string:
268 name: 'ONOS_VERSION'
269 default: '1.11.0'
270 description: 'Version number in ONOS nightly build file'
271
272 - string:
273 name: 'DELTA_PATH'
274 default: '/home/sdn'
275 description: 'Path of DELTA project'
276
277 - string:
278 name: 'WIKI_PREFIX'
279 default: 'master'
280
281 - bool:
282 name: 'CLEANUP'
283 default: true
284
285 - lf-infra-parameters:
286 project: '{project}'
287 branch: '{stream}'
288 stream: '{stream}'
289 lftools-version: '{lftools-version}'
290
291 node: 'TestStation-BMs'
292
293 wrappers:
294 - inject:
295 properties-file: '/var/jenkins/TestONOS.property'
296
297 builders:
298
299 - shell: !include-raw-escape: delta-script.sh
300
Devin Limb00d26a2018-02-01 17:27:59 -0800301 publishers:
302 - plot:
303 - title: 'DELTA Test Results for master'
304 group: 'DELTA-nightly'
305 yaxis: 'Number of test cases'
306 style: line
307 series:
308 - file: 'DELTA-nightly.csv'
309 format: 'csv'
310
311 # Todo : add confluence ( use pipeline for post build ..? )
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800312
Devin Lim18f459d2018-01-26 19:20:30 -0800313- job-template:
314 name: init-CHO
315
316 <<: *test-free-job-boiler-plate
317 properties:
318
319 - build-discarder:
320 num-to-keep: 30
321
322 parameters:
323
324 - string:
325 name: 'ONOSBranch'
326 default: 'master'
327 description: |
328 set onos branch to test. default to "master",
329 but can also be set at "onos-1.2", etc.
330 This parameter is also use to trigger where the test results to be posted
331
332 - string:
333 name: 'ONOSJVMHeap'
334 default: "\"${{JAVA_OPTS:--Xms8G -Xmx8G}}\""
335 description: 'onos cell jvm heap size setting'
336
337 - string:
338 name: 'TestONBranch'
339 default: 'master'
340 description: 'sets TestON branch'
341
342 - string:
343 name: 'ONOSTag'
344 default: ''
345
346 - lf-infra-parameters:
347 project: '{project}'
348 branch: '{stream}'
349 stream: '{stream}'
350 lftools-version: '{lftools-version}'
351
352 node: 'TestStation-CHOs'
353
354 wrappers:
355 - inject:
356 properties-file: '/var/lib/jenkins/TestONOS.property'
357 script-content: |
358 echo "ONOSBranch=$ONOSBranch" > /var/lib/jenkins/TestONOS.property
359 echo "TestONBranch=$TestONBranch" >> /var/lib/jenkins/TestONOS.property
360 echo "ONOSTag=$ONOSTag" >> /var/lib/jenkins/TestONOS.property
361
362 override-build-parameters: true
363
364 builders:
365
366 - shell: !include-raw-escape: cho-init.sh
367
368- job-template:
369 name: running-CHO
370
371 <<: *test-free-job-boiler-plate
372 properties:
373
374 - build-discarder:
375 num-to-keep: 30
376
377 parameters:
378
379 - lf-infra-parameters:
380 project: '{project}'
381 branch: '{stream}'
382 stream: '{stream}'
383 lftools-version: '{lftools-version}'
384
385 node: 'TestStation-CHOs'
386 triggers:
387 - reverse:
388 jobs: 'init-CHO'
389 result: 'failure'
390
391 builders:
392
393 - shell: !include-raw-escape: running-cho.sh
394
395- job-template:
396 name: post-CHO-master
397
398 <<: *test-free-job-boiler-plate
399 properties:
400 - lf-infra-properties:
401 project: '{project}'
402 build-days-to-keep: 7
403
404 parameters:
405
406 - lf-infra-parameters:
407 project: '{project}'
408 branch: '{stream}'
409 stream: '{stream}'
410 lftools-version: '{lftools-version}'
411
412 node: 'TestStation-CHOs'
413# triggers:
414# - timed: 'H/60 * * * *'
415 wrappers:
416 - inject:
417 properties-file: '/var/lib/jenkins/TestONOS.property'
418 builders:
419
420 - shell: !include-raw-escape: cho-post.sh
Devin Limb00d26a2018-02-01 17:27:59 -0800421 publishers:
422 - plot:
423 - title: 'Network, Application and ONOS Events (per hour)'
424 group: 'CHOTestMonkey'
425 num-builds: '72'
426 yaxis: 'Number of Events'
427 style: line
428 logarithmic-yaxis: true
429 series:
430 - file: 'event.csv'
431 format: 'csv'
432 - title: 'Failed Checks (per hour)'
433 group: 'CHOTestMonkey'
434 num-builds: '72'
435 yaxis: 'Number of Failed Checks'
436 style: line
437 logarithmic-yaxis: true
438 series:
439 - file: 'failure.csv'
440 format: 'csv'
441 - title: 'Warnings, Errors and Exceptions from Logs (per hour)'
442 group: 'CHOTestMonkey'
443 num-builds: '72'
444 yaxis: 'Number of Warnings or Errors'
445 style: line
446 logarithmic-yaxis: true
447 series:
448 - file: 'error.csv'
449 format: 'csv'
Devin Lim18f459d2018-01-26 19:20:30 -0800450
Devin Lim323c9872018-01-30 19:57:58 -0800451- job-template:
452 name: 'SR-log-{version}'
Devin Lim9c8fa3e2018-01-24 16:47:15 -0800453
Devin Lim323c9872018-01-30 19:57:58 -0800454 <<: *test-free-job-boiler-plate
455 properties:
456
457 - build-discarder:
458 num-to-keep: 30
459
460 parameters:
461
462 - lf-infra-parameters:
463 project: '{project}'
464 branch: '{stream}'
465 stream: '{stream}'
466 lftools-version: '{lftools-version}'
467
468 node: 'TestStation-VMs'
469 publishers:
470
471 - archive:
Devin Limb00d26a2018-02-01 17:27:59 -0800472 artifacts: '*'
473
474- job-template:
475 name: test-HA
476
477 <<: *test-free-job-boiler-plate
478 properties:
479
480 - build-discarder:
481
482 days-to-keep: 5
483 num-to-keep: 100
484
485 parameters:
486
487 - string:
488 name: 'TEST_NAME'
489 default: 'HAbackupRecover'
490 description: 'The name of the TestON test suite'
491
492 - lf-infra-parameters:
493 project: '{project}'
494 branch: '{stream}'
495 stream: '{stream}'
496 lftools-version: '{lftools-version}'
497
498 node: 'TestStation-Jons'
499 triggers:
500 - reverse:
501 jobs: 'test-HA'
502 result: 'failure'
503
504 builders:
505
506 - shell: !include-raw-escape: test-ha.sh
507
508 publishers:
509 - plot:
510 - title: 'Test job results'
511 group: 'Test-HA'
512 yaxis: 'Number of test cases'
513 style: line
514 series:
515 - file: 'results.csv'
516 format: 'csv'
517
518 - title: 'Timers'
519 group: 'Test-HA'
520 yaxis: 'Time in seconds'
521 style: line
522 series:
523 - file: 'Timers.csv'
524 format: 'csv'
525
526 - post-tasks:
527 - escalate-status: true
528 script: |
529 if [ -e ${{WORKSPACE}}/${{TEST_NAME##*/}}Wiki.txt ] && ! grep -q "FAIL" ${{WORKSPACE}}/${{TEST_NAME##*/}}Wiki.txt
530 then
531 exit 0
532 else
533 exit 1
534 fi
Devin Lim49200ec2018-01-19 16:17:41 -0800535
536- project:
537 name: post-result-jobs
538 project-name: post-result-jobs
539
540 <<: *test-free-init-procedure-plate
541 <<: *init-station-plate
542 jobs:
543 - 'postjob-{station-type}'
544
545- project:
546 name: cleanup-jobs
547 project-name: cleanup-jobs
548
549 <<: *test-free-init-procedure-plate
550 <<: *init-station-plate
551 jobs:
552 - 'test-station-log-cleanup-VM'
553 - 'test-station-log-cleanup-BM'
554 - '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'
580 - 'post-CHO-master'
Devin Lim323c9872018-01-30 19:57:58 -0800581
582
583- project:
584 name: log-pipeline
585
586 <<: *job-free-version-plate
587
588 project-name: 'log-pipeline'
589
590 <<: *test-free-init-procedure-plate
591
592 jobs:
593 - 'SR-log-{version}'
Devin Limb00d26a2018-02-01 17:27:59 -0800594
595- project:
596 name: personnel-station
597
598 project-name: 'log-pipeline'
599
600 <<: *test-free-init-procedure-plate
601
602 jobs:
603 - 'test-HA'