diff options
author | Darragh Bailey <daragh.bailey@gmail.com> | 2015-03-20 01:03:00 +0000 |
---|---|---|
committer | Darragh Bailey <daragh.bailey@gmail.com> | 2015-03-21 11:18:02 +0000 |
commit | 09c0224fb2e3f4cbe568716f2becd035e07954ed (patch) | |
tree | 7b9ca67c121558b713739df78e5d6911f6e03e9d | |
parent | f14589b14d31903f2d78cb698425500de925948e (diff) |
Convert all inline publisher examples to tests
Convert all publisher examples to unit tests and use literalinclude to
have sphinx automatically inline the test file contents. Replace
mavendeploy test with more complete version from the code and include
some tests from files that were identical to the inline example.
Enable yaml syntax highlighting for existing examples for consistent
display of docstrings across the publishers module.
In turn fix any python 3 compatibility issues highlighted by the
additional tests executing previously unexercised code paths.
Change-Id: Ic0fd39dee0121c0c22a932fd455dccc5344893b2
Notes
Notes (review):
Verified+2: Jenkins
Code-Review+1: yolanda.robla <info@ysoft.biz>
Code-Review+2: Khai Do <zaro0508@gmail.com>
Workflow+1: Khai Do <zaro0508@gmail.com>
Submitted-by: Jenkins
Submitted-at: Wed, 25 Mar 2015 22:41:45 +0000
Reviewed-on: https://review.openstack.org/166064
Project: openstack-infra/jenkins-job-builder
Branch: refs/heads/master
60 files changed, 1192 insertions, 385 deletions
diff --git a/jenkins_jobs/modules/publishers.py b/jenkins_jobs/modules/publishers.py index 7e0def3..2d98f97 100644 --- a/jenkins_jobs/modules/publishers.py +++ b/jenkins_jobs/modules/publishers.py | |||
@@ -52,7 +52,7 @@ def archive(parser, xml_parent, data): | |||
52 | Example: | 52 | Example: |
53 | 53 | ||
54 | .. literalinclude:: /../../tests/publishers/fixtures/archive001.yaml | 54 | .. literalinclude:: /../../tests/publishers/fixtures/archive001.yaml |
55 | 55 | :language: yaml | |
56 | """ | 56 | """ |
57 | logger = logging.getLogger("%s:archive" % __name__) | 57 | logger = logging.getLogger("%s:archive" % __name__) |
58 | archiver = XML.SubElement(xml_parent, 'hudson.tasks.ArtifactArchiver') | 58 | archiver = XML.SubElement(xml_parent, 'hudson.tasks.ArtifactArchiver') |
@@ -92,7 +92,7 @@ def blame_upstream(parser, xml_parent, data): | |||
92 | Example: | 92 | Example: |
93 | 93 | ||
94 | .. literalinclude:: /../../tests/publishers/fixtures/blame001.yaml | 94 | .. literalinclude:: /../../tests/publishers/fixtures/blame001.yaml |
95 | 95 | :language: yaml | |
96 | """ | 96 | """ |
97 | 97 | ||
98 | XML.SubElement(xml_parent, | 98 | XML.SubElement(xml_parent, |
@@ -117,7 +117,7 @@ def campfire(parser, xml_parent, data): | |||
117 | Example: | 117 | Example: |
118 | 118 | ||
119 | .. literalinclude:: /../../tests/publishers/fixtures/campfire001.yaml | 119 | .. literalinclude:: /../../tests/publishers/fixtures/campfire001.yaml |
120 | 120 | :language: yaml | |
121 | """ | 121 | """ |
122 | 122 | ||
123 | root = XML.SubElement(xml_parent, | 123 | root = XML.SubElement(xml_parent, |
@@ -153,6 +153,7 @@ def emotional_jenkins(parser, xml_parent, data): | |||
153 | Example: | 153 | Example: |
154 | 154 | ||
155 | .. literalinclude:: /../../tests/publishers/fixtures/emotional-jenkins.yaml | 155 | .. literalinclude:: /../../tests/publishers/fixtures/emotional-jenkins.yaml |
156 | :language: yaml | ||
156 | """ | 157 | """ |
157 | XML.SubElement(xml_parent, | 158 | XML.SubElement(xml_parent, |
158 | 'org.jenkinsci.plugins.emotional__jenkins.' | 159 | 'org.jenkinsci.plugins.emotional__jenkins.' |
@@ -194,8 +195,8 @@ def trigger_parameterized_builds(parser, xml_parent, data): | |||
194 | Example: | 195 | Example: |
195 | 196 | ||
196 | .. literalinclude:: | 197 | .. literalinclude:: |
197 | /../../tests/publishers/fixtures/trigger_parameterized_builds001.yaml | 198 | /../../tests/publishers/fixtures/trigger_parameterized_builds001.yaml |
198 | 199 | :language: yaml | |
199 | """ | 200 | """ |
200 | tbuilder = XML.SubElement(xml_parent, | 201 | tbuilder = XML.SubElement(xml_parent, |
201 | 'hudson.plugins.parameterizedtrigger.' | 202 | 'hudson.plugins.parameterizedtrigger.' |
@@ -294,6 +295,7 @@ def trigger(parser, xml_parent, data): | |||
294 | Example: | 295 | Example: |
295 | 296 | ||
296 | .. literalinclude:: /../../tests/publishers/fixtures/trigger_success.yaml | 297 | .. literalinclude:: /../../tests/publishers/fixtures/trigger_success.yaml |
298 | :language: yaml | ||
297 | """ | 299 | """ |
298 | tconfig = XML.SubElement(xml_parent, 'hudson.tasks.BuildTrigger') | 300 | tconfig = XML.SubElement(xml_parent, 'hudson.tasks.BuildTrigger') |
299 | childProjects = XML.SubElement(tconfig, 'childProjects') | 301 | childProjects = XML.SubElement(tconfig, 'childProjects') |
@@ -332,13 +334,14 @@ def clone_workspace(parser, xml_parent, data): | |||
332 | Minimal example: | 334 | Minimal example: |
333 | 335 | ||
334 | .. literalinclude:: | 336 | .. literalinclude:: |
335 | /../../tests/publishers/fixtures/clone-workspace001.yaml | 337 | /../../tests/publishers/fixtures/clone-workspace001.yaml |
338 | :language: yaml | ||
336 | 339 | ||
337 | Full example: | 340 | Full example: |
338 | 341 | ||
339 | .. literalinclude:: | 342 | .. literalinclude:: |
340 | /../../tests/publishers/fixtures/clone-workspace002.yaml | 343 | /../../tests/publishers/fixtures/clone-workspace002.yaml |
341 | 344 | :language: yaml | |
342 | """ | 345 | """ |
343 | 346 | ||
344 | cloneworkspace = XML.SubElement( | 347 | cloneworkspace = XML.SubElement( |
@@ -417,12 +420,13 @@ def cloverphp(parser, xml_parent, data): | |||
417 | 420 | ||
418 | Minimal example: | 421 | Minimal example: |
419 | 422 | ||
420 | .. literalinclude:: /../../tests/publishers/fixtures/cloverphp001.yaml | 423 | .. literalinclude:: /../../tests/publishers/fixtures/cloverphp001.yaml |
424 | :language: yaml | ||
421 | 425 | ||
422 | Full example: | 426 | Full example: |
423 | 427 | ||
424 | .. literalinclude:: /../../tests/publishers/fixtures/cloverphp002.yaml | 428 | .. literalinclude:: /../../tests/publishers/fixtures/cloverphp002.yaml |
425 | 429 | :language: yaml | |
426 | """ | 430 | """ |
427 | cloverphp = XML.SubElement( | 431 | cloverphp = XML.SubElement( |
428 | xml_parent, | 432 | xml_parent, |
@@ -496,10 +500,10 @@ def coverage(parser, xml_parent, data): | |||
496 | Requires the Jenkins :jenkins-wiki:`Cobertura Coverage Plugin | 500 | Requires the Jenkins :jenkins-wiki:`Cobertura Coverage Plugin |
497 | <Cobertura+Plugin>`. | 501 | <Cobertura+Plugin>`. |
498 | 502 | ||
499 | Example:: | 503 | Example: |
500 | 504 | ||
501 | publishers: | 505 | .. literalinclude:: /../../tests/publishers/fixtures/coverage001.yaml |
502 | - coverage | 506 | :language: yaml |
503 | """ | 507 | """ |
504 | logger = logging.getLogger(__name__) | 508 | logger = logging.getLogger(__name__) |
505 | logger.warn("Coverage function is deprecated. Switch to cobertura.") | 509 | logger.warn("Coverage function is deprecated. Switch to cobertura.") |
@@ -589,30 +593,10 @@ def cobertura(parser, xml_parent, data): | |||
589 | * **unhealthy** (`int`): Unhealthy threshold (default 0) | 593 | * **unhealthy** (`int`): Unhealthy threshold (default 0) |
590 | * **failing** (`int`): Failing threshold (default 0) | 594 | * **failing** (`int`): Failing threshold (default 0) |
591 | 595 | ||
592 | Example:: | 596 | Example: |
593 | |||
594 | publishers: | ||
595 | - cobertura: | ||
596 | report-file: "/reports/cobertura/coverage.xml" | ||
597 | only-stable: "true" | ||
598 | fail-no-reports: "true" | ||
599 | fail-unhealthy: "true" | ||
600 | fail-unstable: "true" | ||
601 | health-auto-update: "true" | ||
602 | stability-auto-update: "true" | ||
603 | zoom-coverage-chart: "true" | ||
604 | source-encoding: "Big5" | ||
605 | targets: | ||
606 | - files: | ||
607 | healthy: 10 | ||
608 | unhealthy: 20 | ||
609 | failing: 30 | ||
610 | - method: | ||
611 | healthy: 50 | ||
612 | unhealthy: 40 | ||
613 | failing: 30 | ||
614 | |||
615 | 597 | ||
598 | .. literalinclude:: /../../tests/publishers/fixtures/cobertura001.yaml | ||
599 | :language: yaml | ||
616 | """ | 600 | """ |
617 | cobertura = XML.SubElement(xml_parent, | 601 | cobertura = XML.SubElement(xml_parent, |
618 | 'hudson.plugins.cobertura.CoberturaPublisher') | 602 | 'hudson.plugins.cobertura.CoberturaPublisher') |
@@ -637,7 +621,7 @@ def cobertura(parser, xml_parent, data): | |||
637 | 'class': 'enum-map', | 621 | 'class': 'enum-map', |
638 | 'enum-type': 'hudson.plugins.cobertura.targets.CoverageMetric'}) | 622 | 'enum-type': 'hudson.plugins.cobertura.targets.CoverageMetric'}) |
639 | for item in data['targets']: | 623 | for item in data['targets']: |
640 | item_name = item.keys()[0] | 624 | item_name = next(iter(item.keys())) |
641 | item_values = item.get(item_name, 0) | 625 | item_values = item.get(item_name, 0) |
642 | entry = XML.SubElement(targets, 'entry') | 626 | entry = XML.SubElement(targets, 'entry') |
643 | XML.SubElement(entry, | 627 | XML.SubElement(entry, |
@@ -649,7 +633,7 @@ def cobertura(parser, xml_parent, data): | |||
649 | 'class': 'enum-map', | 633 | 'class': 'enum-map', |
650 | 'enum-type': 'hudson.plugins.cobertura.targets.CoverageMetric'}) | 634 | 'enum-type': 'hudson.plugins.cobertura.targets.CoverageMetric'}) |
651 | for item in data['targets']: | 635 | for item in data['targets']: |
652 | item_name = item.keys()[0] | 636 | item_name = next(iter(item.keys())) |
653 | item_values = item.get(item_name, 0) | 637 | item_values = item.get(item_name, 0) |
654 | entry = XML.SubElement(targets, 'entry') | 638 | entry = XML.SubElement(targets, 'entry') |
655 | XML.SubElement(entry, 'hudson.plugins.cobertura.targets.' | 639 | XML.SubElement(entry, 'hudson.plugins.cobertura.targets.' |
@@ -661,7 +645,7 @@ def cobertura(parser, xml_parent, data): | |||
661 | 'class': 'enum-map', | 645 | 'class': 'enum-map', |
662 | 'enum-type': 'hudson.plugins.cobertura.targets.CoverageMetric'}) | 646 | 'enum-type': 'hudson.plugins.cobertura.targets.CoverageMetric'}) |
663 | for item in data['targets']: | 647 | for item in data['targets']: |
664 | item_name = item.keys()[0] | 648 | item_name = next(iter(item.keys())) |
665 | item_values = item.get(item_name, 0) | 649 | item_values = item.get(item_name, 0) |
666 | entry = XML.SubElement(targets, 'entry') | 650 | entry = XML.SubElement(targets, 'entry') |
667 | XML.SubElement(entry, 'hudson.plugins.cobertura.targets.' | 651 | XML.SubElement(entry, 'hudson.plugins.cobertura.targets.' |
@@ -696,22 +680,10 @@ def jacoco(parser, xml_parent, data): | |||
696 | * **healthy** (`int`): Healthy threshold (default 0) | 680 | * **healthy** (`int`): Healthy threshold (default 0) |
697 | * **unhealthy** (`int`): Unhealthy threshold (default 0) | 681 | * **unhealthy** (`int`): Unhealthy threshold (default 0) |
698 | 682 | ||
699 | Example:: | 683 | Example: |
700 | |||
701 | publishers: | ||
702 | - jacoco: | ||
703 | exec-pattern: "**/**.exec" | ||
704 | class-pattern: "**/classes" | ||
705 | source-pattern: "**/src/main/java" | ||
706 | status-update: true | ||
707 | targets: | ||
708 | - branch: | ||
709 | healthy: 10 | ||
710 | unhealthy: 20 | ||
711 | - method: | ||
712 | healthy: 50 | ||
713 | unhealthy: 40 | ||
714 | 684 | ||
685 | .. literalinclude:: /../../tests/publishers/fixtures/jacoco001.yaml | ||
686 | :language: yaml | ||
715 | """ | 687 | """ |
716 | 688 | ||
717 | jacoco = XML.SubElement(xml_parent, | 689 | jacoco = XML.SubElement(xml_parent, |
@@ -737,7 +709,7 @@ def jacoco(parser, xml_parent, data): | |||
737 | 'class'] | 709 | 'class'] |
738 | 710 | ||
739 | for item in data['targets']: | 711 | for item in data['targets']: |
740 | item_name = item.keys()[0] | 712 | item_name = next(iter(item.keys())) |
741 | if item_name not in itemsList: | 713 | if item_name not in itemsList: |
742 | raise JenkinsJobsException("item entered is not valid must be " | 714 | raise JenkinsJobsException("item entered is not valid must be " |
743 | "one of: %s" % ",".join(itemsList)) | 715 | "one of: %s" % ",".join(itemsList)) |
@@ -812,11 +784,12 @@ def junit(parser, xml_parent, data): | |||
812 | Minimal example using defaults: | 784 | Minimal example using defaults: |
813 | 785 | ||
814 | .. literalinclude:: /../../tests/publishers/fixtures/junit001.yaml | 786 | .. literalinclude:: /../../tests/publishers/fixtures/junit001.yaml |
787 | :language: yaml | ||
815 | 788 | ||
816 | Full example: | 789 | Full example: |
817 | 790 | ||
818 | .. literalinclude:: /../../tests/publishers/fixtures/junit002.yaml | 791 | .. literalinclude:: /../../tests/publishers/fixtures/junit002.yaml |
819 | 792 | :language: yaml | |
820 | """ | 793 | """ |
821 | junitresult = XML.SubElement(xml_parent, | 794 | junitresult = XML.SubElement(xml_parent, |
822 | 'hudson.tasks.junit.JUnitResultArchiver') | 795 | 'hudson.tasks.junit.JUnitResultArchiver') |
@@ -1015,15 +988,10 @@ def violations(parser, xml_parent, data): | |||
1015 | gendarme, jcreport, jslint, pep8, perlcritic, pmd, pylint, | 988 | gendarme, jcreport, jslint, pep8, perlcritic, pmd, pylint, |
1016 | simian, stylecop | 989 | simian, stylecop |
1017 | 990 | ||
1018 | Example:: | 991 | Example: |
1019 | 992 | ||
1020 | publishers: | 993 | .. literalinclude:: /../../tests/publishers/fixtures/violations001.yaml |
1021 | - violations: | 994 | :language: yaml |
1022 | pep8: | ||
1023 | min: 0 | ||
1024 | max: 1 | ||
1025 | unstable: 1 | ||
1026 | pattern: '**/pep8.txt' | ||
1027 | """ | 995 | """ |
1028 | violations = XML.SubElement(xml_parent, | 996 | violations = XML.SubElement(xml_parent, |
1029 | 'hudson.plugins.violations.' | 997 | 'hudson.plugins.violations.' |
@@ -1115,11 +1083,12 @@ def checkstyle(parser, xml_parent, data): | |||
1115 | Example: | 1083 | Example: |
1116 | 1084 | ||
1117 | .. literalinclude:: /../../tests/publishers/fixtures/checkstyle004.yaml | 1085 | .. literalinclude:: /../../tests/publishers/fixtures/checkstyle004.yaml |
1086 | :language: yaml | ||
1118 | 1087 | ||
1119 | Full example: | 1088 | Full example: |
1120 | 1089 | ||
1121 | .. literalinclude:: /../../tests/publishers/fixtures/checkstyle006.yaml | 1090 | .. literalinclude:: /../../tests/publishers/fixtures/checkstyle006.yaml |
1122 | 1091 | :language: yaml | |
1123 | """ | 1092 | """ |
1124 | def convert_settings(lookup, data): | 1093 | def convert_settings(lookup, data): |
1125 | """Helper to convert settings from one key to another | 1094 | """Helper to convert settings from one key to another |
@@ -1198,7 +1167,7 @@ def scp(parser, xml_parent, data): | |||
1198 | Example: | 1167 | Example: |
1199 | 1168 | ||
1200 | .. literalinclude:: /../../tests/publishers/fixtures/scp001.yaml | 1169 | .. literalinclude:: /../../tests/publishers/fixtures/scp001.yaml |
1201 | 1170 | :language: yaml | |
1202 | """ | 1171 | """ |
1203 | site = data['site'] | 1172 | site = data['site'] |
1204 | scp = XML.SubElement(xml_parent, | 1173 | scp = XML.SubElement(xml_parent, |
@@ -1252,7 +1221,6 @@ def ssh(parser, xml_parent, data): | |||
1252 | 1221 | ||
1253 | .. literalinclude:: /../../tests/publishers/fixtures/ssh001.yaml | 1222 | .. literalinclude:: /../../tests/publishers/fixtures/ssh001.yaml |
1254 | :language: yaml | 1223 | :language: yaml |
1255 | |||
1256 | """ | 1224 | """ |
1257 | console_prefix = 'SSH: ' | 1225 | console_prefix = 'SSH: ' |
1258 | plugin_tag = 'jenkins.plugins.publish__over__ssh.BapSshPublisherPlugin' | 1226 | plugin_tag = 'jenkins.plugins.publish__over__ssh.BapSshPublisherPlugin' |
@@ -1284,6 +1252,7 @@ def pipeline(parser, xml_parent, data): | |||
1284 | Example: | 1252 | Example: |
1285 | 1253 | ||
1286 | .. literalinclude:: /../../tests/publishers/fixtures/pipeline002.yaml | 1254 | .. literalinclude:: /../../tests/publishers/fixtures/pipeline002.yaml |
1255 | :language: yaml | ||
1287 | 1256 | ||
1288 | 1257 | ||
1289 | You can build pipeline jobs that are re-usable in different pipelines by | 1258 | You can build pipeline jobs that are re-usable in different pipelines by |
@@ -1352,10 +1321,10 @@ def claim_build(parser, xml_parent, data): | |||
1352 | Claim build failures | 1321 | Claim build failures |
1353 | Requires the Jenkins :jenkins-wiki:`Claim Plugin <Claim+plugin>`. | 1322 | Requires the Jenkins :jenkins-wiki:`Claim Plugin <Claim+plugin>`. |
1354 | 1323 | ||
1355 | Example:: | 1324 | Example: |
1356 | 1325 | ||
1357 | publishers: | 1326 | .. literalinclude:: /../../tests/publishers/fixtures/claim-build001.yaml |
1358 | - claim-build | 1327 | :language: yaml |
1359 | """ | 1328 | """ |
1360 | 1329 | ||
1361 | XML.SubElement(xml_parent, 'hudson.plugins.claim.ClaimPublisher') | 1330 | XML.SubElement(xml_parent, 'hudson.plugins.claim.ClaimPublisher') |
@@ -1443,6 +1412,7 @@ def email_ext(parser, xml_parent, data): | |||
1443 | Example: | 1412 | Example: |
1444 | 1413 | ||
1445 | .. literalinclude:: /../../tests/publishers/fixtures/email-ext001.yaml | 1414 | .. literalinclude:: /../../tests/publishers/fixtures/email-ext001.yaml |
1415 | :language: yaml | ||
1446 | """ | 1416 | """ |
1447 | 1417 | ||
1448 | emailext = XML.SubElement(xml_parent, | 1418 | emailext = XML.SubElement(xml_parent, |
@@ -1529,12 +1499,10 @@ def fingerprint(parser, xml_parent, data): | |||
1529 | :arg bool record-artifacts: fingerprint all archived artifacts | 1499 | :arg bool record-artifacts: fingerprint all archived artifacts |
1530 | (default false) | 1500 | (default false) |
1531 | 1501 | ||
1532 | Example:: | 1502 | Example: |
1533 | 1503 | ||
1534 | publishers: | 1504 | .. literalinclude:: /../../tests/publishers/fixtures/fingerprint001.yaml |
1535 | - fingerprint: | 1505 | :language: yaml |
1536 | files: builddir/test*.xml | ||
1537 | record-artifacts: false | ||
1538 | """ | 1506 | """ |
1539 | finger = XML.SubElement(xml_parent, 'hudson.tasks.Fingerprinter') | 1507 | finger = XML.SubElement(xml_parent, 'hudson.tasks.Fingerprinter') |
1540 | XML.SubElement(finger, 'targets').text = data.get('files', '') | 1508 | XML.SubElement(finger, 'targets').text = data.get('files', '') |
@@ -1548,11 +1516,11 @@ def aggregate_tests(parser, xml_parent, data): | |||
1548 | 1516 | ||
1549 | :arg bool include-failed-builds: whether to include failed builds | 1517 | :arg bool include-failed-builds: whether to include failed builds |
1550 | 1518 | ||
1551 | Example:: | 1519 | Example: |
1552 | 1520 | ||
1553 | publishers: | 1521 | .. literalinclude:: |
1554 | - aggregate-tests: | 1522 | /../../tests/publishers/fixtures/aggregate-tests001.yaml |
1555 | include-failed-builds: true | 1523 | :language: yaml |
1556 | """ | 1524 | """ |
1557 | agg = XML.SubElement(xml_parent, | 1525 | agg = XML.SubElement(xml_parent, |
1558 | 'hudson.tasks.test.AggregatedTestResultPublisher') | 1526 | 'hudson.tasks.test.AggregatedTestResultPublisher') |
@@ -1588,29 +1556,10 @@ def cppcheck(parser, xml_parent, data): | |||
1588 | 1556 | ||
1589 | for more optional parameters see the example | 1557 | for more optional parameters see the example |
1590 | 1558 | ||
1591 | Example:: | 1559 | Example: |
1592 | 1560 | ||
1593 | publishers: | 1561 | .. literalinclude:: /../../tests/publishers/fixtures/cppcheck001.yaml |
1594 | - cppcheck: | 1562 | :language: yaml |
1595 | pattern: "**/cppcheck.xml" | ||
1596 | # the rest is optional | ||
1597 | # build status (new) error count thresholds | ||
1598 | thresholds: | ||
1599 | unstable: 5 | ||
1600 | new-unstable: 5 | ||
1601 | failure: 7 | ||
1602 | new-failure: 3 | ||
1603 | # severities which count towards the threshold, default all true | ||
1604 | severity: | ||
1605 | error: true | ||
1606 | warning: true | ||
1607 | information: false | ||
1608 | graph: | ||
1609 | xysize: [500, 200] | ||
1610 | # which errors to display, default only sum | ||
1611 | display: | ||
1612 | sum: false | ||
1613 | error: true | ||
1614 | """ | 1563 | """ |
1615 | cppextbase = XML.SubElement(xml_parent, | 1564 | cppextbase = XML.SubElement(xml_parent, |
1616 | 'org.jenkinsci.plugins.cppcheck.' | 1565 | 'org.jenkinsci.plugins.cppcheck.' |
@@ -1672,13 +1621,10 @@ def logparser(parser, xml_parent, data): | |||
1672 | :arg bool unstable-on-warning: mark build unstable on warning | 1621 | :arg bool unstable-on-warning: mark build unstable on warning |
1673 | :arg bool fail-on-error: mark build failed on error | 1622 | :arg bool fail-on-error: mark build failed on error |
1674 | 1623 | ||
1675 | Example:: | 1624 | Example: |
1676 | 1625 | ||
1677 | publishers: | 1626 | .. literalinclude:: /../../tests/publishers/fixtures/logparser001.yaml |
1678 | - logparser: | 1627 | :language: yaml |
1679 | parse-rules: "/path/to/parserules" | ||
1680 | unstable-on-warning: true | ||
1681 | fail-on-error: true | ||
1682 | """ | 1628 | """ |
1683 | 1629 | ||
1684 | clog = XML.SubElement(xml_parent, | 1630 | clog = XML.SubElement(xml_parent, |
@@ -1703,15 +1649,11 @@ def copy_to_master(parser, xml_parent, data): | |||
1703 | If left blank they will be copied into the | 1649 | If left blank they will be copied into the |
1704 | workspace of the current job | 1650 | workspace of the current job |
1705 | 1651 | ||
1706 | Example:: | 1652 | Example: |
1707 | 1653 | ||
1708 | publishers: | 1654 | .. literalinclude:: |
1709 | - copy-to-master: | 1655 | /../../tests/publishers/fixtures/copy-to-master001.yaml |
1710 | includes: | 1656 | :language: yaml |
1711 | - file1 | ||
1712 | - file2*.txt | ||
1713 | excludes: | ||
1714 | - file2bad.txt | ||
1715 | """ | 1657 | """ |
1716 | p = 'com.michelin.cio.hudson.plugins.copytoslave.CopyToMasterNotifier' | 1658 | p = 'com.michelin.cio.hudson.plugins.copytoslave.CopyToMasterNotifier' |
1717 | cm = XML.SubElement(xml_parent, p) | 1659 | cm = XML.SubElement(xml_parent, p) |
@@ -1731,10 +1673,10 @@ def jira(parser, xml_parent, data): | |||
1731 | Update relevant JIRA issues | 1673 | Update relevant JIRA issues |
1732 | Requires the Jenkins :jenkins-wiki:`JIRA Plugin <JIRA+Plugin>`. | 1674 | Requires the Jenkins :jenkins-wiki:`JIRA Plugin <JIRA+Plugin>`. |
1733 | 1675 | ||
1734 | Example:: | 1676 | Example: |
1735 | 1677 | ||
1736 | publishers: | 1678 | .. literalinclude:: /../../tests/publishers/fixtures/jira001.yaml |
1737 | - jira | 1679 | :language: yaml |
1738 | """ | 1680 | """ |
1739 | XML.SubElement(xml_parent, 'hudson.plugins.jira.JiraIssueUpdater') | 1681 | XML.SubElement(xml_parent, 'hudson.plugins.jira.JiraIssueUpdater') |
1740 | 1682 | ||
@@ -1747,11 +1689,11 @@ def groovy_postbuild(parser, xml_parent, data): | |||
1747 | 1689 | ||
1748 | :Parameter: the groovy script to execute | 1690 | :Parameter: the groovy script to execute |
1749 | 1691 | ||
1750 | Example:: | 1692 | Example: |
1751 | |||
1752 | publishers: | ||
1753 | - groovy-postbuild: "manager.buildFailure()" | ||
1754 | 1693 | ||
1694 | .. literalinclude:: | ||
1695 | /../../tests/publishers/fixtures/groovy-postbuild001.yaml | ||
1696 | :language: yaml | ||
1755 | """ | 1697 | """ |
1756 | root_tag = 'org.jvnet.hudson.plugins.groovypostbuild.'\ | 1698 | root_tag = 'org.jvnet.hudson.plugins.groovypostbuild.'\ |
1757 | 'GroovyPostbuildRecorder' | 1699 | 'GroovyPostbuildRecorder' |
@@ -1855,6 +1797,7 @@ def cigame(parser, xml_parent, data): | |||
1855 | Example: | 1797 | Example: |
1856 | 1798 | ||
1857 | .. literalinclude:: /../../tests/publishers/fixtures/cigame.yaml | 1799 | .. literalinclude:: /../../tests/publishers/fixtures/cigame.yaml |
1800 | :language: yaml | ||
1858 | """ | 1801 | """ |
1859 | XML.SubElement(xml_parent, 'hudson.plugins.cigame.GamePublisher') | 1802 | XML.SubElement(xml_parent, 'hudson.plugins.cigame.GamePublisher') |
1860 | 1803 | ||
@@ -1881,19 +1824,10 @@ def sonar(parser, xml_parent, data): | |||
1881 | This publisher supports the post-build action exposed by the Jenkins | 1824 | This publisher supports the post-build action exposed by the Jenkins |
1882 | Sonar Plugin, which is triggering a Sonar Analysis with Maven. | 1825 | Sonar Plugin, which is triggering a Sonar Analysis with Maven. |
1883 | 1826 | ||
1884 | Example:: | 1827 | Example: |
1885 | 1828 | ||
1886 | publishers: | 1829 | .. literalinclude:: /../../tests/publishers/fixtures/sonar001.yaml |
1887 | - sonar: | 1830 | :language: yaml |
1888 | jdk: MyJdk | ||
1889 | branch: myBranch | ||
1890 | language: java | ||
1891 | maven-opts: -DskipTests | ||
1892 | additional-properties: -DsonarHostURL=http://example.com/ | ||
1893 | skip-global-triggers: | ||
1894 | skip-when-scm-change: true | ||
1895 | skip-when-upstream-build: true | ||
1896 | skip-when-envvar-defined: SKIP_SONAR | ||
1897 | """ | 1831 | """ |
1898 | sonar = XML.SubElement(xml_parent, 'hudson.plugins.sonar.SonarPublisher') | 1832 | sonar = XML.SubElement(xml_parent, 'hudson.plugins.sonar.SonarPublisher') |
1899 | if 'jdk' in data: | 1833 | if 'jdk' in data: |
@@ -1931,33 +1865,16 @@ def performance(parser, xml_parent, data): | |||
1931 | :(jmeter or junit): (`dict` or `str`): Specify a custom report file | 1865 | :(jmeter or junit): (`dict` or `str`): Specify a custom report file |
1932 | (optional; jmeter default \**/*.jtl, junit default **/TEST-\*.xml) | 1866 | (optional; jmeter default \**/*.jtl, junit default **/TEST-\*.xml) |
1933 | 1867 | ||
1934 | Examples:: | 1868 | Examples: |
1935 | 1869 | ||
1936 | publishers: | 1870 | .. literalinclude:: /../../tests/publishers/fixtures/performance001.yaml |
1937 | - performance: | 1871 | :language: yaml |
1938 | failed-threshold: 85 | 1872 | |
1939 | unstable-threshold: -1 | 1873 | .. literalinclude:: /../../tests/publishers/fixtures/performance002.yaml |
1940 | report: | 1874 | :language: yaml |
1941 | - jmeter: "/special/file.jtl" | 1875 | |
1942 | - junit: "/special/file.xml" | 1876 | .. literalinclude:: /../../tests/publishers/fixtures/performance003.yaml |
1943 | 1877 | :language: yaml | |
1944 | publishers: | ||
1945 | - performance: | ||
1946 | failed-threshold: 85 | ||
1947 | unstable-threshold: -1 | ||
1948 | report: | ||
1949 | - jmeter | ||
1950 | - junit | ||
1951 | |||
1952 | publishers: | ||
1953 | - performance: | ||
1954 | failed-threshold: 85 | ||
1955 | unstable-threshold: -1 | ||
1956 | report: | ||
1957 | - jmeter: "/special/file.jtl" | ||
1958 | - junit: "/special/file.xml" | ||
1959 | - jmeter | ||
1960 | - junit | ||
1961 | """ | 1878 | """ |
1962 | logger = logging.getLogger(__name__) | 1879 | logger = logging.getLogger(__name__) |
1963 | 1880 | ||
@@ -1970,7 +1887,7 @@ def performance(parser, xml_parent, data): | |||
1970 | parsers = XML.SubElement(perf, 'parsers') | 1887 | parsers = XML.SubElement(perf, 'parsers') |
1971 | for item in data['report']: | 1888 | for item in data['report']: |
1972 | if isinstance(item, dict): | 1889 | if isinstance(item, dict): |
1973 | item_name = item.keys()[0] | 1890 | item_name = next(iter(item.keys())) |
1974 | item_values = item.get(item_name, None) | 1891 | item_values = item.get(item_name, None) |
1975 | if item_name == 'jmeter': | 1892 | if item_name == 'jmeter': |
1976 | jmhold = XML.SubElement(parsers, 'hudson.plugins.performance.' | 1893 | jmhold = XML.SubElement(parsers, 'hudson.plugins.performance.' |
@@ -2005,13 +1922,10 @@ def join_trigger(parser, xml_parent, data): | |||
2005 | 1922 | ||
2006 | :arg list projects: list of projects to trigger | 1923 | :arg list projects: list of projects to trigger |
2007 | 1924 | ||
2008 | Example:: | 1925 | Example: |
2009 | 1926 | ||
2010 | publishers: | 1927 | .. literalinclude:: /../../tests/publishers/fixtures/join-trigger001.yaml |
2011 | - join-trigger: | 1928 | :language: yaml |
2012 | projects: | ||
2013 | - project-one | ||
2014 | - project-two | ||
2015 | """ | 1929 | """ |
2016 | jointrigger = XML.SubElement(xml_parent, 'join.JoinTrigger') | 1930 | jointrigger = XML.SubElement(xml_parent, 'join.JoinTrigger') |
2017 | 1931 | ||
@@ -2054,17 +1968,10 @@ def jabber(parser, xml_parent, data): | |||
2054 | * **summary-build** -- Summary and build parameters | 1968 | * **summary-build** -- Summary and build parameters |
2055 | * **summary-scm-fail** -- Summary, SCM changes, and failed tests | 1969 | * **summary-scm-fail** -- Summary, SCM changes, and failed tests |
2056 | 1970 | ||
2057 | Example:: | 1971 | Example: |
2058 | 1972 | ||
2059 | publishers: | 1973 | .. literalinclude:: /../../tests/publishers/fixtures/jabber001.yaml |
2060 | - jabber: | 1974 | :language: yaml |
2061 | notify-on-build-start: true | ||
2062 | group-targets: | ||
2063 | - "foo-room@conference-2-fooserver.foo.com" | ||
2064 | individual-targets: | ||
2065 | - "foo-user@conference-2-fooserver.foo.com" | ||
2066 | strategy: all | ||
2067 | message: summary-scm | ||
2068 | """ | 1975 | """ |
2069 | j = XML.SubElement(xml_parent, 'hudson.plugins.jabber.im.transport.' | 1976 | j = XML.SubElement(xml_parent, 'hudson.plugins.jabber.im.transport.' |
2070 | 'JabberPublisher') | 1977 | 'JabberPublisher') |
@@ -2136,15 +2043,11 @@ def workspace_cleanup(parser, xml_parent, data): | |||
2136 | :arg bool fail-build: Fail the build if the cleanup fails (default: true) | 2043 | :arg bool fail-build: Fail the build if the cleanup fails (default: true) |
2137 | :arg bool clean-parent: Cleanup matrix parent workspace (default: false) | 2044 | :arg bool clean-parent: Cleanup matrix parent workspace (default: false) |
2138 | 2045 | ||
2139 | Example:: | 2046 | Example: |
2140 | 2047 | ||
2141 | publishers: | 2048 | .. literalinclude:: |
2142 | - workspace-cleanup: | 2049 | /../../tests/publishers/fixtures/workspace-cleanup001.yaml |
2143 | include: | 2050 | :language: yaml |
2144 | - "*.zip" | ||
2145 | clean-if: | ||
2146 | - success: true | ||
2147 | - not-built: false | ||
2148 | """ | 2051 | """ |
2149 | 2052 | ||
2150 | p = XML.SubElement(xml_parent, | 2053 | p = XML.SubElement(xml_parent, |
@@ -2168,14 +2071,16 @@ def workspace_cleanup(parser, xml_parent, data): | |||
2168 | XML.SubElement(p, 'cleanupMatrixParent').text = \ | 2071 | XML.SubElement(p, 'cleanupMatrixParent').text = \ |
2169 | str(data.get("clean-parent", False)).lower() | 2072 | str(data.get("clean-parent", False)).lower() |
2170 | 2073 | ||
2171 | mask = {'success': 'cleanWhenSuccess', 'unstable': 'cleanWhenUnstable', | 2074 | mask = [('success', 'cleanWhenSuccess'), |
2172 | 'failure': 'cleanWhenFailure', 'not-built': 'cleanWhenNotBuilt', | 2075 | ('unstable', 'cleanWhenUnstable'), |
2173 | 'aborted': 'cleanWhenAborted'} | 2076 | ('failure', 'cleanWhenFailure'), |
2077 | ('not-built', 'cleanWhenNotBuilt'), | ||
2078 | ('aborted', 'cleanWhenAborted')] | ||
2174 | clean = data.get('clean-if', []) | 2079 | clean = data.get('clean-if', []) |
2175 | cdict = dict() | 2080 | cdict = dict() |
2176 | for d in clean: | 2081 | for d in clean: |
2177 | cdict.update(d) | 2082 | cdict.update(d) |
2178 | for k, v in mask.iteritems(): | 2083 | for k, v in mask: |
2179 | XML.SubElement(p, v).text = str(cdict.pop(k, True)).lower() | 2084 | XML.SubElement(p, v).text = str(cdict.pop(k, True)).lower() |
2180 | 2085 | ||
2181 | if len(cdict) > 0: | 2086 | if len(cdict) > 0: |
@@ -2199,14 +2104,10 @@ def maven_deploy(parser, xml_parent, data): | |||
2199 | (default false) | 2104 | (default false) |
2200 | 2105 | ||
2201 | 2106 | ||
2202 | Example:: | 2107 | Example: |
2203 | 2108 | ||
2204 | publishers: | 2109 | .. literalinclude:: /../../tests/publishers/fixtures/maven-deploy001.yaml |
2205 | - maven-deploy: | 2110 | :language: yaml |
2206 | id: example | ||
2207 | url: http://repo.example.com/maven2/ | ||
2208 | unique-version: true | ||
2209 | deploy-unstable: false | ||
2210 | """ | 2111 | """ |
2211 | 2112 | ||
2212 | p = XML.SubElement(xml_parent, 'hudson.maven.RedeployPublisher') | 2113 | p = XML.SubElement(xml_parent, 'hudson.maven.RedeployPublisher') |
@@ -2238,15 +2139,10 @@ def text_finder(parser, xml_parent, data): | |||
2238 | Set build unstable instead of failing the build (default False) | 2139 | Set build unstable instead of failing the build (default False) |
2239 | 2140 | ||
2240 | 2141 | ||
2241 | Example:: | 2142 | Example: |
2242 | 2143 | ||
2243 | publishers: | 2144 | .. literalinclude:: /../../tests/publishers/fixtures/text-finder001.yaml |
2244 | - text-finder: | 2145 | :language: yaml |
2245 | regexp: "some string" | ||
2246 | fileset: "file.txt" | ||
2247 | also-check-console-output: true | ||
2248 | succeed-if-found: false | ||
2249 | unstable-if-found: false | ||
2250 | """ | 2146 | """ |
2251 | 2147 | ||
2252 | finder = XML.SubElement(xml_parent, | 2148 | finder = XML.SubElement(xml_parent, |
@@ -2276,15 +2172,10 @@ def html_publisher(parser, xml_parent, data): | |||
2276 | :arg bool allow-missing: Allow missing HTML reports (Default False) | 2172 | :arg bool allow-missing: Allow missing HTML reports (Default False) |
2277 | 2173 | ||
2278 | 2174 | ||
2279 | Example:: | 2175 | Example: |
2280 | 2176 | ||
2281 | publishers: | 2177 | .. literalinclude:: /../../tests/publishers/fixtures/html-publisher001.yaml |
2282 | - html-publisher: | 2178 | :language: yaml |
2283 | name: "some name" | ||
2284 | dir: "path/" | ||
2285 | files: "index.html" | ||
2286 | keep-all: true | ||
2287 | allow-missing: true | ||
2288 | """ | 2179 | """ |
2289 | 2180 | ||
2290 | reporter = XML.SubElement(xml_parent, 'htmlpublisher.HtmlPublisher') | 2181 | reporter = XML.SubElement(xml_parent, 'htmlpublisher.HtmlPublisher') |
@@ -2358,12 +2249,10 @@ def tap(parser, xml_parent, data): | |||
2358 | :arg bool todo-is-failure: Handle TODO's as failures (Default True) | 2249 | :arg bool todo-is-failure: Handle TODO's as failures (Default True) |
2359 | 2250 | ||
2360 | 2251 | ||
2361 | Example:: | 2252 | Example: |
2362 | 2253 | ||
2363 | publishers: | 2254 | .. literalinclude:: /../../tests/publishers/fixtures/tap001.yaml |
2364 | - tap: | 2255 | :language: yaml |
2365 | results: puiparts.tap | ||
2366 | todo-is-failure: false | ||
2367 | """ | 2256 | """ |
2368 | 2257 | ||
2369 | tap = XML.SubElement(xml_parent, 'org.tap4j.plugin.TapPublisher') | 2258 | tap = XML.SubElement(xml_parent, 'org.tap4j.plugin.TapPublisher') |
@@ -2412,21 +2301,10 @@ def post_tasks(parser, xml_parent, data): | |||
2412 | (default 'false') | 2301 | (default 'false') |
2413 | :arg str task[script]: Shell script to run (default '') | 2302 | :arg str task[script]: Shell script to run (default '') |
2414 | 2303 | ||
2415 | Example:: | 2304 | Example: |
2416 | 2305 | ||
2417 | publishers: | 2306 | .. literalinclude:: /../../tests/publishers/fixtures/post-tasks001.yaml |
2418 | - post-tasks: | 2307 | :language: yaml |
2419 | - matches: | ||
2420 | - log-text: line to match | ||
2421 | operator: AND | ||
2422 | - log-text: line to match | ||
2423 | operator: OR | ||
2424 | - log-text: line to match | ||
2425 | operator: AND | ||
2426 | escalate-status: false | ||
2427 | run-if-job-successful:false | ||
2428 | script: | | ||
2429 | echo "Here goes the task script" | ||
2430 | """ | 2308 | """ |
2431 | 2309 | ||
2432 | pb_xml = XML.SubElement(xml_parent, | 2310 | pb_xml = XML.SubElement(xml_parent, |
@@ -2482,19 +2360,21 @@ def postbuildscript(parser, xml_parent, data): | |||
2482 | 2360 | ||
2483 | Example: | 2361 | Example: |
2484 | 2362 | ||
2485 | .. literalinclude:: /../../tests/publishers/fixtures/\ | 2363 | .. literalinclude:: |
2486 | postbuildscript001.yaml | 2364 | /../../tests/publishers/fixtures/postbuildscript001.yaml |
2365 | :language: yaml | ||
2487 | 2366 | ||
2488 | You can also execute :doc:`builders </builders>`: | 2367 | You can also execute :doc:`builders </builders>`: |
2489 | 2368 | ||
2490 | .. literalinclude:: /../../tests/publishers/fixtures/\ | 2369 | .. literalinclude:: |
2491 | postbuildscript002.yaml | 2370 | /../../tests/publishers/fixtures/postbuildscript002.yaml |
2371 | :language: yaml | ||
2492 | 2372 | ||
2493 | Run once after the whole matrix (all axes) is built: | 2373 | Run once after the whole matrix (all axes) is built: |
2494 | 2374 | ||
2495 | .. literalinclude:: /../../tests/publishers/fixtures/\ | 2375 | .. literalinclude:: |
2496 | postbuildscript003.yaml | 2376 | /../../tests/publishers/fixtures/postbuildscript003.yaml |
2497 | 2377 | :language: yaml | |
2498 | """ | 2378 | """ |
2499 | 2379 | ||
2500 | pbs_xml = XML.SubElement( | 2380 | pbs_xml = XML.SubElement( |
@@ -2586,11 +2466,10 @@ def xml_summary(parser, xml_parent, data): | |||
2586 | 2466 | ||
2587 | :arg str files: Files to parse (default '') | 2467 | :arg str files: Files to parse (default '') |
2588 | 2468 | ||
2589 | Example:: | 2469 | Example: |
2590 | 2470 | ||
2591 | publishers: | 2471 | .. literalinclude:: /../../tests/publishers/fixtures/xml-summary001.yaml |
2592 | - xml-summary: | 2472 | :language: yaml |
2593 | files: '*_summary_report.xml' | ||
2594 | """ | 2473 | """ |
2595 | 2474 | ||
2596 | summary = XML.SubElement(xml_parent, | 2475 | summary = XML.SubElement(xml_parent, |
@@ -2624,21 +2503,10 @@ def robot(parser, xml_parent, data): | |||
2624 | checking the thresholds (default true) | 2503 | checking the thresholds (default true) |
2625 | :arg list other-files: list other files to archive (default '') | 2504 | :arg list other-files: list other files to archive (default '') |
2626 | 2505 | ||
2627 | Example:: | 2506 | Example: |
2628 | 2507 | ||
2629 | - publishers: | 2508 | .. literalinclude:: /../../tests/publishers/fixtures/robot001.yaml |
2630 | - robot: | 2509 | :language: yaml |
2631 | output-path: reports/robot | ||
2632 | log-file-link: report.html | ||
2633 | report-html: report.html | ||
2634 | log-html: log.html | ||
2635 | output-xml: output.xml | ||
2636 | pass-threshold: 80.0 | ||
2637 | unstable-threshold: 60.0 | ||
2638 | only-critical: false | ||
2639 | other-files: | ||
2640 | - extra-file1.html | ||
2641 | - extra-file2.txt | ||
2642 | """ | 2510 | """ |
2643 | parent = XML.SubElement(xml_parent, 'hudson.plugins.robot.RobotPublisher') | 2511 | parent = XML.SubElement(xml_parent, 'hudson.plugins.robot.RobotPublisher') |
2644 | XML.SubElement(parent, 'outputPath').text = data['output-path'] | 2512 | XML.SubElement(parent, 'outputPath').text = data['output-path'] |
@@ -2756,51 +2624,10 @@ def warnings(parser, xml_parent, data): | |||
2756 | :arg str default-encoding: Default encoding when parsing or showing files | 2624 | :arg str default-encoding: Default encoding when parsing or showing files |
2757 | Leave empty to use default encoding of platform (default '') | 2625 | Leave empty to use default encoding of platform (default '') |
2758 | 2626 | ||
2759 | Example:: | 2627 | Example: |
2760 | 2628 | ||
2761 | publishers: | 2629 | .. literalinclude:: /../../tests/publishers/fixtures/warnings001.yaml |
2762 | - warnings: | 2630 | :language: yaml |
2763 | console-log-parsers: | ||
2764 | - FxCop | ||
2765 | - CodeAnalysis | ||
2766 | workspace-file-scanners: | ||
2767 | - file-pattern: '**/*.out' | ||
2768 | scanner: 'AcuCobol Compiler' | ||
2769 | - file-pattern: '**/*.warnings' | ||
2770 | scanner: FxCop | ||
2771 | files-to-include: '[a-zA-Z]\.java,[a-zA-Z]\.cpp' | ||
2772 | files-to-ignore: '[a-zA-Z]\.html,[a-zA-Z]\.js' | ||
2773 | run-always: true | ||
2774 | detect-modules: true | ||
2775 | resolve-relative-paths: true | ||
2776 | health-threshold-high: 50 | ||
2777 | health-threshold-low: 25 | ||
2778 | health-priorities: high-and-normal | ||
2779 | total-thresholds: | ||
2780 | unstable: | ||
2781 | total-all: 90 | ||
2782 | total-high: 90 | ||
2783 | total-normal: 40 | ||
2784 | total-low: 30 | ||
2785 | failed: | ||
2786 | total-all: 100 | ||
2787 | total-high: 100 | ||
2788 | total-normal: 50 | ||
2789 | total-low: 40 | ||
2790 | new-thresholds: | ||
2791 | unstable: | ||
2792 | new-all: 100 | ||
2793 | new-high: 50 | ||
2794 | new-normal: 30 | ||
2795 | new-low: 10 | ||
2796 | failed: | ||
2797 | new-all: 100 | ||
2798 | new-high: 60 | ||
2799 | new-normal: 50 | ||
2800 | new-low: 40 | ||
2801 | use-delta-for-new-warnings: true | ||
2802 | only-use-stable-builds-as-reference: true | ||
2803 | default-encoding: ISO-8859-9 | ||
2804 | """ | 2631 | """ |
2805 | 2632 | ||
2806 | warnings = XML.SubElement(xml_parent, | 2633 | warnings = XML.SubElement(xml_parent, |
@@ -2887,13 +2714,10 @@ def sloccount(parser, xml_parent, data): | |||
2887 | :arg str charset: The character encoding to be used to read the SLOCCount | 2714 | :arg str charset: The character encoding to be used to read the SLOCCount |
2888 | result files. (default: 'UTF-8') | 2715 | result files. (default: 'UTF-8') |
2889 | 2716 | ||
2890 | Example:: | 2717 | Example: |
2891 | |||
2892 | publishers: | ||
2893 | - sloccount: | ||
2894 | report-files: sloccount.sc | ||
2895 | charset: UTF-8 | ||
2896 | 2718 | ||
2719 | .. literalinclude:: /../../tests/publishers/fixtures/sloccount001.yaml | ||
2720 | :language: yaml | ||
2897 | """ | 2721 | """ |
2898 | top = XML.SubElement(xml_parent, | 2722 | top = XML.SubElement(xml_parent, |
2899 | 'hudson.plugins.sloccount.SloccountPublisher') | 2723 | 'hudson.plugins.sloccount.SloccountPublisher') |
@@ -2964,6 +2788,7 @@ def ircbot(parser, xml_parent, data): | |||
2964 | Example: | 2788 | Example: |
2965 | 2789 | ||
2966 | .. literalinclude:: /../../tests/publishers/fixtures/ircbot001.yaml | 2790 | .. literalinclude:: /../../tests/publishers/fixtures/ircbot001.yaml |
2791 | :language: yaml | ||
2967 | """ | 2792 | """ |
2968 | top = XML.SubElement(xml_parent, 'hudson.plugins.ircbot.IrcPublisher') | 2793 | top = XML.SubElement(xml_parent, 'hudson.plugins.ircbot.IrcPublisher') |
2969 | message_dict = {'summary-scm': 'DefaultBuildToChatNotifier', | 2794 | message_dict = {'summary-scm': 'DefaultBuildToChatNotifier', |
@@ -3079,37 +2904,10 @@ def plot(parser, xml_parent, data): | |||
3079 | Xpath which selects the values that should be plotted. | 2904 | Xpath which selects the values that should be plotted. |
3080 | 2905 | ||
3081 | 2906 | ||
3082 | Example:: | 2907 | Example: |
3083 | |||
3084 | publishers: | ||
3085 | - plot: | ||
3086 | - title: MyPlot | ||
3087 | yaxis: Y | ||
3088 | group: PlotGroup | ||
3089 | num-builds: '' | ||
3090 | style: line | ||
3091 | use-description: false | ||
3092 | series: | ||
3093 | - file: graph-me-second.properties | ||
3094 | label: MyLabel | ||
3095 | format: properties | ||
3096 | - file: graph-me-first.csv | ||
3097 | url: 'http://srv1' | ||
3098 | inclusion-flag: 'off' | ||
3099 | display-table: true | ||
3100 | format: csv | ||
3101 | - title: MyPlot2 | ||
3102 | yaxis: Y | ||
3103 | group: PlotGroup | ||
3104 | style: line | ||
3105 | use-description: false | ||
3106 | series: | ||
3107 | - file: graph-me-third.xml | ||
3108 | url: 'http://srv2' | ||
3109 | format: xml | ||
3110 | xpath-type: 'node' | ||
3111 | xpath: '/*' | ||
3112 | 2908 | ||
2909 | .. literalinclude:: /../../tests/publishers/fixtures/plot004.yaml | ||
2910 | :language: yaml | ||
3113 | """ | 2911 | """ |
3114 | top = XML.SubElement(xml_parent, 'hudson.plugins.plot.PlotPublisher') | 2912 | top = XML.SubElement(xml_parent, 'hudson.plugins.plot.PlotPublisher') |
3115 | plots = XML.SubElement(top, 'plots') | 2913 | plots = XML.SubElement(top, 'plots') |
@@ -3222,30 +3020,10 @@ def git(parser, xml_parent, data): | |||
3222 | (Default: False) | 3020 | (Default: False) |
3223 | 3021 | ||
3224 | 3022 | ||
3225 | Example:: | 3023 | Example: |
3226 | |||
3227 | publishers: | ||
3228 | - git: | ||
3229 | push-merge: true | ||
3230 | push-only-if-success: false | ||
3231 | tags: | ||
3232 | - tag: | ||
3233 | remote: tagremotename | ||
3234 | name: tagname | ||
3235 | message: "some tag message" | ||
3236 | create-tag: true | ||
3237 | update-tag: true | ||
3238 | branches: | ||
3239 | - branch: | ||
3240 | remote: branchremotename | ||
3241 | name: "some/branch" | ||
3242 | notes: | ||
3243 | - note: | ||
3244 | remote: remotename | ||
3245 | message: "some note to push" | ||
3246 | namespace: commits | ||
3247 | replace-note: true | ||
3248 | 3024 | ||
3025 | .. literalinclude:: /../../tests/publishers/fixtures/git001.yaml | ||
3026 | :language: yaml | ||
3249 | """ | 3027 | """ |
3250 | mappings = [('push-merge', 'pushMerge', False), | 3028 | mappings = [('push-merge', 'pushMerge', False), |
3251 | ('push-only-if-success', 'pushOnlyIfSuccess', True)] | 3029 | ('push-only-if-success', 'pushOnlyIfSuccess', True)] |
@@ -3315,6 +3093,7 @@ def github_notifier(parser, xml_parent, data): | |||
3315 | Example: | 3093 | Example: |
3316 | 3094 | ||
3317 | .. literalinclude:: /../../tests/publishers/fixtures/github-notifier.yaml | 3095 | .. literalinclude:: /../../tests/publishers/fixtures/github-notifier.yaml |
3096 | :language: yaml | ||
3318 | """ | 3097 | """ |
3319 | XML.SubElement(xml_parent, | 3098 | XML.SubElement(xml_parent, |
3320 | 'com.cloudbees.jenkins.GitHubCommitNotifier') | 3099 | 'com.cloudbees.jenkins.GitHubCommitNotifier') |
@@ -3337,7 +3116,8 @@ def build_publisher(parser, xml_parent, data): | |||
3337 | Example: | 3116 | Example: |
3338 | 3117 | ||
3339 | .. literalinclude:: | 3118 | .. literalinclude:: |
3340 | /../../tests/publishers/fixtures/build-publisher002.yaml | 3119 | /../../tests/publishers/fixtures/build-publisher002.yaml |
3120 | :language: yaml | ||
3341 | """ | 3121 | """ |
3342 | 3122 | ||
3343 | reporter = XML.SubElement( | 3123 | reporter = XML.SubElement( |
@@ -3380,6 +3160,7 @@ def stash(parser, xml_parent, data): | |||
3380 | Example: | 3160 | Example: |
3381 | 3161 | ||
3382 | .. literalinclude:: /../../tests/publishers/fixtures/stash001.yaml | 3162 | .. literalinclude:: /../../tests/publishers/fixtures/stash001.yaml |
3163 | :language: yaml | ||
3383 | """ | 3164 | """ |
3384 | 3165 | ||
3385 | top = XML.SubElement(xml_parent, | 3166 | top = XML.SubElement(xml_parent, |
@@ -3415,8 +3196,8 @@ def description_setter(parser, xml_parent, data): | |||
3415 | Example: | 3196 | Example: |
3416 | 3197 | ||
3417 | .. literalinclude:: | 3198 | .. literalinclude:: |
3418 | /../../tests/publishers/fixtures/description-setter001.yaml | 3199 | /../../tests/publishers/fixtures/description-setter001.yaml |
3419 | 3200 | :language: yaml | |
3420 | """ | 3201 | """ |
3421 | 3202 | ||
3422 | descriptionsetter = XML.SubElement( | 3203 | descriptionsetter = XML.SubElement( |
@@ -3450,7 +3231,7 @@ def doxygen(parser, xml_parent, data): | |||
3450 | Example: | 3231 | Example: |
3451 | 3232 | ||
3452 | .. literalinclude:: /../../tests/publishers/fixtures/doxygen001.yaml | 3233 | .. literalinclude:: /../../tests/publishers/fixtures/doxygen001.yaml |
3453 | 3234 | :language: yaml | |
3454 | """ | 3235 | """ |
3455 | p = XML.SubElement(xml_parent, 'hudson.plugins.doxygen.DoxygenArchiver') | 3236 | p = XML.SubElement(xml_parent, 'hudson.plugins.doxygen.DoxygenArchiver') |
3456 | if not data['doxyfile']: | 3237 | if not data['doxyfile']: |
@@ -3472,7 +3253,7 @@ def sitemonitor(parser, xml_parent, data): | |||
3472 | Example: | 3253 | Example: |
3473 | 3254 | ||
3474 | .. literalinclude:: /../../tests/publishers/fixtures/sitemonitor001.yaml | 3255 | .. literalinclude:: /../../tests/publishers/fixtures/sitemonitor001.yaml |
3475 | 3256 | :language: yaml | |
3476 | """ | 3257 | """ |
3477 | mon = XML.SubElement(xml_parent, | 3258 | mon = XML.SubElement(xml_parent, |
3478 | 'hudson.plugins.sitemonitor.SiteMonitorRecorder') | 3259 | 'hudson.plugins.sitemonitor.SiteMonitorRecorder') |
@@ -3500,7 +3281,7 @@ def testng(parser, xml_parent, data): | |||
3500 | Example: | 3281 | Example: |
3501 | 3282 | ||
3502 | .. literalinclude:: /../../tests/publishers/fixtures/testng001.yaml | 3283 | .. literalinclude:: /../../tests/publishers/fixtures/testng001.yaml |
3503 | 3284 | :language: yaml | |
3504 | """ | 3285 | """ |
3505 | 3286 | ||
3506 | reporter = XML.SubElement(xml_parent, 'hudson.plugins.testng.Publisher') | 3287 | reporter = XML.SubElement(xml_parent, 'hudson.plugins.testng.Publisher') |
@@ -3542,7 +3323,7 @@ def artifact_deployer(parser, xml_parent, data): | |||
3542 | Example: | 3323 | Example: |
3543 | 3324 | ||
3544 | .. literalinclude:: /../../tests/publishers/fixtures/artifact-dep.yaml | 3325 | .. literalinclude:: /../../tests/publishers/fixtures/artifact-dep.yaml |
3545 | 3326 | :language: yaml | |
3546 | """ | 3327 | """ |
3547 | 3328 | ||
3548 | deployer = XML.SubElement(xml_parent, | 3329 | deployer = XML.SubElement(xml_parent, |
@@ -3671,7 +3452,7 @@ def ruby_metrics(parser, xml_parent, data): | |||
3671 | Example: | 3452 | Example: |
3672 | 3453 | ||
3673 | .. literalinclude:: /../../tests/publishers/fixtures/ruby-metrics.yaml | 3454 | .. literalinclude:: /../../tests/publishers/fixtures/ruby-metrics.yaml |
3674 | 3455 | :language: yaml | |
3675 | """ | 3456 | """ |
3676 | 3457 | ||
3677 | metrics = XML.SubElement( | 3458 | metrics = XML.SubElement( |
@@ -3710,7 +3491,7 @@ def fitnesse(parser, xml_parent, data): | |||
3710 | Example: | 3491 | Example: |
3711 | 3492 | ||
3712 | .. literalinclude:: /../../tests/publishers/fixtures/fitnesse001.yaml | 3493 | .. literalinclude:: /../../tests/publishers/fixtures/fitnesse001.yaml |
3713 | 3494 | :language: yaml | |
3714 | """ | 3495 | """ |
3715 | fitnesse = XML.SubElement( | 3496 | fitnesse = XML.SubElement( |
3716 | xml_parent, | 3497 | xml_parent, |
@@ -3751,7 +3532,7 @@ def valgrind(parser, xml_parent, data): | |||
3751 | Example: | 3532 | Example: |
3752 | 3533 | ||
3753 | .. literalinclude:: /../../tests/publishers/fixtures/valgrind001.yaml | 3534 | .. literalinclude:: /../../tests/publishers/fixtures/valgrind001.yaml |
3754 | 3535 | :language: yaml | |
3755 | """ | 3536 | """ |
3756 | p = XML.SubElement(xml_parent, | 3537 | p = XML.SubElement(xml_parent, |
3757 | 'org.jenkinsci.plugins.valgrind.ValgrindPublisher') | 3538 | 'org.jenkinsci.plugins.valgrind.ValgrindPublisher') |
@@ -3838,11 +3619,12 @@ def pmd(parser, xml_parent, data): | |||
3838 | Example: | 3619 | Example: |
3839 | 3620 | ||
3840 | .. literalinclude:: /../../tests/publishers/fixtures/pmd001.yaml | 3621 | .. literalinclude:: /../../tests/publishers/fixtures/pmd001.yaml |
3622 | :language: yaml | ||
3841 | 3623 | ||
3842 | Full example: | 3624 | Full example: |
3843 | 3625 | ||
3844 | .. literalinclude:: /../../tests/publishers/fixtures/pmd002.yaml | 3626 | .. literalinclude:: /../../tests/publishers/fixtures/pmd002.yaml |
3845 | 3627 | :language: yaml | |
3846 | """ | 3628 | """ |
3847 | 3629 | ||
3848 | xml_element = XML.SubElement(xml_parent, 'hudson.plugins.pmd.PmdPublisher') | 3630 | xml_element = XML.SubElement(xml_parent, 'hudson.plugins.pmd.PmdPublisher') |
@@ -3867,7 +3649,7 @@ def scan_build(parser, xml_parent, data): | |||
3867 | Example: | 3649 | Example: |
3868 | 3650 | ||
3869 | .. literalinclude:: /../../tests/publishers/fixtures/scan-build001.yaml | 3651 | .. literalinclude:: /../../tests/publishers/fixtures/scan-build001.yaml |
3870 | 3652 | :language: yaml | |
3871 | """ | 3653 | """ |
3872 | threshold = str(data.get('threshold', 0)) | 3654 | threshold = str(data.get('threshold', 0)) |
3873 | if not threshold.isdigit(): | 3655 | if not threshold.isdigit(): |
@@ -3941,11 +3723,12 @@ def dry(parser, xml_parent, data): | |||
3941 | Example: | 3723 | Example: |
3942 | 3724 | ||
3943 | .. literalinclude:: /../../tests/publishers/fixtures/dry001.yaml | 3725 | .. literalinclude:: /../../tests/publishers/fixtures/dry001.yaml |
3726 | :language: yaml | ||
3944 | 3727 | ||
3945 | Full example: | 3728 | Full example: |
3946 | 3729 | ||
3947 | .. literalinclude:: /../../tests/publishers/fixtures/dry004.yaml | 3730 | .. literalinclude:: /../../tests/publishers/fixtures/dry004.yaml |
3948 | 3731 | :language: yaml | |
3949 | """ | 3732 | """ |
3950 | 3733 | ||
3951 | xml_element = XML.SubElement(xml_parent, 'hudson.plugins.dry.DryPublisher') | 3734 | xml_element = XML.SubElement(xml_parent, 'hudson.plugins.dry.DryPublisher') |
diff --git a/tests/publishers/fixtures/aggregate-tests001.xml b/tests/publishers/fixtures/aggregate-tests001.xml new file mode 100644 index 0000000..afe312e --- /dev/null +++ b/tests/publishers/fixtures/aggregate-tests001.xml | |||
@@ -0,0 +1,8 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <project> | ||
3 | <publishers> | ||
4 | <hudson.tasks.test.AggregatedTestResultPublisher> | ||
5 | <includeFailedBuilds>true</includeFailedBuilds> | ||
6 | </hudson.tasks.test.AggregatedTestResultPublisher> | ||
7 | </publishers> | ||
8 | </project> | ||
diff --git a/tests/publishers/fixtures/aggregate-tests001.yaml b/tests/publishers/fixtures/aggregate-tests001.yaml new file mode 100644 index 0000000..6069877 --- /dev/null +++ b/tests/publishers/fixtures/aggregate-tests001.yaml | |||
@@ -0,0 +1,3 @@ | |||
1 | publishers: | ||
2 | - aggregate-tests: | ||
3 | include-failed-builds: true | ||
diff --git a/tests/publishers/fixtures/claim-build001.xml b/tests/publishers/fixtures/claim-build001.xml new file mode 100644 index 0000000..8947e88 --- /dev/null +++ b/tests/publishers/fixtures/claim-build001.xml | |||
@@ -0,0 +1,6 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <project> | ||
3 | <publishers> | ||
4 | <hudson.plugins.claim.ClaimPublisher/> | ||
5 | </publishers> | ||
6 | </project> | ||
diff --git a/tests/publishers/fixtures/claim-build001.yaml b/tests/publishers/fixtures/claim-build001.yaml new file mode 100644 index 0000000..eb5fb68 --- /dev/null +++ b/tests/publishers/fixtures/claim-build001.yaml | |||
@@ -0,0 +1,2 @@ | |||
1 | publishers: | ||
2 | - claim-build | ||
diff --git a/tests/publishers/fixtures/cobertura001.xml b/tests/publishers/fixtures/cobertura001.xml new file mode 100644 index 0000000..e475462 --- /dev/null +++ b/tests/publishers/fixtures/cobertura001.xml | |||
@@ -0,0 +1,52 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <project> | ||
3 | <publishers> | ||
4 | <hudson.plugins.cobertura.CoberturaPublisher> | ||
5 | <coberturaReportFile>/reports/cobertura/coverage.xml</coberturaReportFile> | ||
6 | <onlyStable>true</onlyStable> | ||
7 | <failUnhealthy>true</failUnhealthy> | ||
8 | <failUnstable>true</failUnstable> | ||
9 | <autoUpdateHealth>true</autoUpdateHealth> | ||
10 | <autoUpdateStability>true</autoUpdateStability> | ||
11 | <zoomCoverageChart>true</zoomCoverageChart> | ||
12 | <failNoReports>true</failNoReports> | ||
13 | <healthyTarget> | ||
14 | <targets class="enum-map" enum-type="hudson.plugins.cobertura.targets.CoverageMetric"> | ||
15 | <entry> | ||
16 | <hudson.plugins.cobertura.targets.CoverageMetric>FILES</hudson.plugins.cobertura.targets.CoverageMetric> | ||
17 | <int>10</int> | ||
18 | </entry> | ||
19 | <entry> | ||
20 | <hudson.plugins.cobertura.targets.CoverageMetric>METHOD</hudson.plugins.cobertura.targets.CoverageMetric> | ||
21 | <int>50</int> | ||
22 | </entry> | ||
23 | </targets> | ||
24 | </healthyTarget> | ||
25 | <unhealthyTarget> | ||
26 | <targets class="enum-map" enum-type="hudson.plugins.cobertura.targets.CoverageMetric"> | ||
27 | <entry> | ||
28 | <hudson.plugins.cobertura.targets.CoverageMetric>FILES</hudson.plugins.cobertura.targets.CoverageMetric> | ||
29 | <int>20</int> | ||
30 | </entry> | ||
31 | <entry> | ||
32 | <hudson.plugins.cobertura.targets.CoverageMetric>METHOD</hudson.plugins.cobertura.targets.CoverageMetric> | ||
33 | <int>40</int> | ||
34 | </entry> | ||
35 | </targets> | ||
36 | </unhealthyTarget> | ||
37 | <failingTarget> | ||
38 | <targets class="enum-map" enum-type="hudson.plugins.cobertura.targets.CoverageMetric"> | ||
39 | <entry> | ||
40 | <hudson.plugins.cobertura.targets.CoverageMetric>FILES</hudson.plugins.cobertura.targets.CoverageMetric> | ||
41 | <int>30</int> | ||
42 | </entry> | ||
43 | <entry> | ||
44 | <hudson.plugins.cobertura.targets.CoverageMetric>METHOD</hudson.plugins.cobertura.targets.CoverageMetric> | ||
45 | <int>30</int> | ||
46 | </entry> | ||
47 | </targets> | ||
48 | </failingTarget> | ||
49 | <sourceEncoding>Big5</sourceEncoding> | ||
50 | </hudson.plugins.cobertura.CoberturaPublisher> | ||
51 | </publishers> | ||
52 | </project> | ||
diff --git a/tests/publishers/fixtures/cobertura001.yaml b/tests/publishers/fixtures/cobertura001.yaml new file mode 100644 index 0000000..3105293 --- /dev/null +++ b/tests/publishers/fixtures/cobertura001.yaml | |||
@@ -0,0 +1,20 @@ | |||
1 | publishers: | ||
2 | - cobertura: | ||
3 | report-file: "/reports/cobertura/coverage.xml" | ||
4 | only-stable: "true" | ||
5 | fail-no-reports: "true" | ||
6 | fail-unhealthy: "true" | ||
7 | fail-unstable: "true" | ||
8 | health-auto-update: "true" | ||
9 | stability-auto-update: "true" | ||
10 | zoom-coverage-chart: "true" | ||
11 | source-encoding: "Big5" | ||
12 | targets: | ||
13 | - files: | ||
14 | healthy: 10 | ||
15 | unhealthy: 20 | ||
16 | failing: 30 | ||
17 | - method: | ||
18 | healthy: 50 | ||
19 | unhealthy: 40 | ||
20 | failing: 30 | ||
diff --git a/tests/publishers/fixtures/copy-to-master001.xml b/tests/publishers/fixtures/copy-to-master001.xml new file mode 100644 index 0000000..1eef063 --- /dev/null +++ b/tests/publishers/fixtures/copy-to-master001.xml | |||
@@ -0,0 +1,10 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <project> | ||
3 | <publishers> | ||
4 | <com.michelin.cio.hudson.plugins.copytoslave.CopyToMasterNotifier> | ||
5 | <includes>file1,file2*.txt</includes> | ||
6 | <excludes>file2bad.txt</excludes> | ||
7 | <destinationFolder/> | ||
8 | </com.michelin.cio.hudson.plugins.copytoslave.CopyToMasterNotifier> | ||
9 | </publishers> | ||
10 | </project> | ||
diff --git a/tests/publishers/fixtures/copy-to-master001.yaml b/tests/publishers/fixtures/copy-to-master001.yaml new file mode 100644 index 0000000..80581a3 --- /dev/null +++ b/tests/publishers/fixtures/copy-to-master001.yaml | |||
@@ -0,0 +1,7 @@ | |||
1 | publishers: | ||
2 | - copy-to-master: | ||
3 | includes: | ||
4 | - file1 | ||
5 | - file2*.txt | ||
6 | excludes: | ||
7 | - file2bad.txt | ||
diff --git a/tests/publishers/fixtures/coverage001.xml b/tests/publishers/fixtures/coverage001.xml new file mode 100644 index 0000000..7fd110e --- /dev/null +++ b/tests/publishers/fixtures/coverage001.xml | |||
@@ -0,0 +1,58 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <project> | ||
3 | <publishers> | ||
4 | <hudson.plugins.cobertura.CoberturaPublisher> | ||
5 | <coberturaReportFile>**/coverage.xml</coberturaReportFile> | ||
6 | <onlyStable>false</onlyStable> | ||
7 | <healthyTarget> | ||
8 | <targets class="enum-map" enum-type="hudson.plugins.cobertura.targets.CoverageMetric"> | ||
9 | <entry> | ||
10 | <hudson.plugins.cobertura.targets.CoverageMetric>CONDITIONAL</hudson.plugins.cobertura.targets.CoverageMetric> | ||
11 | <int>70</int> | ||
12 | </entry> | ||
13 | <entry> | ||
14 | <hudson.plugins.cobertura.targets.CoverageMetric>LINE</hudson.plugins.cobertura.targets.CoverageMetric> | ||
15 | <int>80</int> | ||
16 | </entry> | ||
17 | <entry> | ||
18 | <hudson.plugins.cobertura.targets.CoverageMetric>METHOD</hudson.plugins.cobertura.targets.CoverageMetric> | ||
19 | <int>80</int> | ||
20 | </entry> | ||
21 | </targets> | ||
22 | </healthyTarget> | ||
23 | <unhealthyTarget> | ||
24 | <targets class="enum-map" enum-type="hudson.plugins.cobertura.targets.CoverageMetric"> | ||
25 | <entry> | ||
26 | <hudson.plugins.cobertura.targets.CoverageMetric>CONDITIONAL</hudson.plugins.cobertura.targets.CoverageMetric> | ||
27 | <int>0</int> | ||
28 | </entry> | ||
29 | <entry> | ||
30 | <hudson.plugins.cobertura.targets.CoverageMetric>LINE</hudson.plugins.cobertura.targets.CoverageMetric> | ||
31 | <int>0</int> | ||
32 | </entry> | ||
33 | <entry> | ||
34 | <hudson.plugins.cobertura.targets.CoverageMetric>METHOD</hudson.plugins.cobertura.targets.CoverageMetric> | ||
35 | <int>0</int> | ||
36 | </entry> | ||
37 | </targets> | ||
38 | </unhealthyTarget> | ||
39 | <failingTarget> | ||
40 | <targets class="enum-map" enum-type="hudson.plugins.cobertura.targets.CoverageMetric"> | ||
41 | <entry> | ||
42 | <hudson.plugins.cobertura.targets.CoverageMetric>CONDITIONAL</hudson.plugins.cobertura.targets.CoverageMetric> | ||
43 | <int>0</int> | ||
44 | </entry> | ||
45 | <entry> | ||
46 | <hudson.plugins.cobertura.targets.CoverageMetric>LINE</hudson.plugins.cobertura.targets.CoverageMetric> | ||
47 | <int>0</int> | ||
48 | </entry> | ||
49 | <entry> | ||
50 | <hudson.plugins.cobertura.targets.CoverageMetric>METHOD</hudson.plugins.cobertura.targets.CoverageMetric> | ||
51 | <int>0</int> | ||
52 | </entry> | ||
53 | </targets> | ||
54 | </failingTarget> | ||
55 | <sourceEncoding>ASCII</sourceEncoding> | ||
56 | </hudson.plugins.cobertura.CoberturaPublisher> | ||
57 | </publishers> | ||
58 | </project> | ||
diff --git a/tests/publishers/fixtures/coverage001.yaml b/tests/publishers/fixtures/coverage001.yaml new file mode 100644 index 0000000..c75d9cb --- /dev/null +++ b/tests/publishers/fixtures/coverage001.yaml | |||
@@ -0,0 +1,2 @@ | |||
1 | publishers: | ||
2 | - coverage | ||
diff --git a/tests/publishers/fixtures/cppcheck001.xml b/tests/publishers/fixtures/cppcheck001.xml new file mode 100644 index 0000000..65b3103 --- /dev/null +++ b/tests/publishers/fixtures/cppcheck001.xml | |||
@@ -0,0 +1,34 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <project> | ||
3 | <publishers> | ||
4 | <org.jenkinsci.plugins.cppcheck.CppcheckPublisher> | ||
5 | <cppcheckConfig> | ||
6 | <pattern>**/cppcheck.xml</pattern> | ||
7 | <ignoreBlankFiles>false</ignoreBlankFiles> | ||
8 | <configSeverityEvaluation> | ||
9 | <threshold>5</threshold> | ||
10 | <newThreshold>5</newThreshold> | ||
11 | <failureThreshold>7</failureThreshold> | ||
12 | <newFailureThreshold>3</newFailureThreshold> | ||
13 | <healthy/> | ||
14 | <unHealthy/> | ||
15 | <severityError>true</severityError> | ||
16 | <severityWarning>true</severityWarning> | ||
17 | <severityStyle>true</severityStyle> | ||
18 | <severityPerformance>true</severityPerformance> | ||
19 | <severityInformation>false</severityInformation> | ||
20 | </configSeverityEvaluation> | ||
21 | <configGraph> | ||
22 | <xSize>500</xSize> | ||
23 | <ySize>200</ySize> | ||
24 | <displayAllErrors>false</displayAllErrors> | ||
25 | <displayErrorSeverity>true</displayErrorSeverity> | ||
26 | <displayWarningSeverity>false</displayWarningSeverity> | ||
27 | <displayStyleSeverity>false</displayStyleSeverity> | ||
28 | <displayPerformanceSeverity>false</displayPerformanceSeverity> | ||
29 | <displayInformationSeverity>false</displayInformationSeverity> | ||
30 | </configGraph> | ||
31 | </cppcheckConfig> | ||
32 | </org.jenkinsci.plugins.cppcheck.CppcheckPublisher> | ||
33 | </publishers> | ||
34 | </project> | ||
diff --git a/tests/publishers/fixtures/cppcheck001.yaml b/tests/publishers/fixtures/cppcheck001.yaml new file mode 100644 index 0000000..34408a7 --- /dev/null +++ b/tests/publishers/fixtures/cppcheck001.yaml | |||
@@ -0,0 +1,21 @@ | |||
1 | publishers: | ||
2 | - cppcheck: | ||
3 | pattern: "**/cppcheck.xml" | ||
4 | # the rest is optional | ||
5 | # build status (new) error count thresholds | ||
6 | thresholds: | ||
7 | unstable: 5 | ||
8 | new-unstable: 5 | ||
9 | failure: 7 | ||
10 | new-failure: 3 | ||
11 | # severities which count towards the threshold, default all true | ||
12 | severity: | ||
13 | error: true | ||
14 | warning: true | ||
15 | information: false | ||
16 | graph: | ||
17 | xysize: [500, 200] | ||
18 | # which errors to display, default only sum | ||
19 | display: | ||
20 | sum: false | ||
21 | error: true | ||
diff --git a/tests/publishers/fixtures/fingerprint001.xml b/tests/publishers/fixtures/fingerprint001.xml new file mode 100644 index 0000000..da6341a --- /dev/null +++ b/tests/publishers/fixtures/fingerprint001.xml | |||
@@ -0,0 +1,9 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <project> | ||
3 | <publishers> | ||
4 | <hudson.tasks.Fingerprinter> | ||
5 | <targets>builddir/test*.xml</targets> | ||
6 | <recordBuildArtifacts>false</recordBuildArtifacts> | ||
7 | </hudson.tasks.Fingerprinter> | ||
8 | </publishers> | ||
9 | </project> | ||
diff --git a/tests/publishers/fixtures/fingerprint001.yaml b/tests/publishers/fixtures/fingerprint001.yaml new file mode 100644 index 0000000..6358d19 --- /dev/null +++ b/tests/publishers/fixtures/fingerprint001.yaml | |||
@@ -0,0 +1,4 @@ | |||
1 | publishers: | ||
2 | - fingerprint: | ||
3 | files: builddir/test*.xml | ||
4 | record-artifacts: false | ||
diff --git a/tests/publishers/fixtures/groovy-postbuild001.xml b/tests/publishers/fixtures/groovy-postbuild001.xml new file mode 100644 index 0000000..1d06d42 --- /dev/null +++ b/tests/publishers/fixtures/groovy-postbuild001.xml | |||
@@ -0,0 +1,8 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <project> | ||
3 | <publishers> | ||
4 | <org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildRecorder> | ||
5 | <groovyScript>manager.buildFailure()</groovyScript> | ||
6 | </org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildRecorder> | ||
7 | </publishers> | ||
8 | </project> | ||
diff --git a/tests/publishers/fixtures/groovy-postbuild001.yaml b/tests/publishers/fixtures/groovy-postbuild001.yaml new file mode 100644 index 0000000..bd17ddc --- /dev/null +++ b/tests/publishers/fixtures/groovy-postbuild001.yaml | |||
@@ -0,0 +1,2 @@ | |||
1 | publishers: | ||
2 | - groovy-postbuild: "manager.buildFailure()" | ||
diff --git a/tests/publishers/fixtures/html-publisher001.xml b/tests/publishers/fixtures/html-publisher001.xml new file mode 100644 index 0000000..f2ac875 --- /dev/null +++ b/tests/publishers/fixtures/html-publisher001.xml | |||
@@ -0,0 +1,17 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <project> | ||
3 | <publishers> | ||
4 | <htmlpublisher.HtmlPublisher> | ||
5 | <reportTargets> | ||
6 | <htmlpublisher.HtmlPublisherTarget> | ||
7 | <reportName>some name</reportName> | ||
8 | <reportDir>path/</reportDir> | ||
9 | <reportFiles>index.html</reportFiles> | ||
10 | <keepAll>true</keepAll> | ||
11 | <allowMissing>true</allowMissing> | ||
12 | <wrapperName>htmlpublisher-wrapper.html</wrapperName> | ||
13 | </htmlpublisher.HtmlPublisherTarget> | ||
14 | </reportTargets> | ||
15 | </htmlpublisher.HtmlPublisher> | ||
16 | </publishers> | ||
17 | </project> | ||
diff --git a/tests/publishers/fixtures/html-publisher001.yaml b/tests/publishers/fixtures/html-publisher001.yaml new file mode 100644 index 0000000..aa85be6 --- /dev/null +++ b/tests/publishers/fixtures/html-publisher001.yaml | |||
@@ -0,0 +1,7 @@ | |||
1 | publishers: | ||
2 | - html-publisher: | ||
3 | name: "some name" | ||
4 | dir: "path/" | ||
5 | files: "index.html" | ||
6 | keep-all: true | ||
7 | allow-missing: true | ||
diff --git a/tests/publishers/fixtures/jabber001.xml b/tests/publishers/fixtures/jabber001.xml new file mode 100644 index 0000000..409e1a0 --- /dev/null +++ b/tests/publishers/fixtures/jabber001.xml | |||
@@ -0,0 +1,24 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <project> | ||
3 | <publishers> | ||
4 | <hudson.plugins.jabber.im.transport.JabberPublisher> | ||
5 | <targets> | ||
6 | <hudson.plugins.im.GroupChatIMMessageTarget> | ||
7 | <name>foo-room@conference-2-fooserver.foo.com</name> | ||
8 | <notificationOnly>false</notificationOnly> | ||
9 | </hudson.plugins.im.GroupChatIMMessageTarget> | ||
10 | <hudson.plugins.im.DefaultIMMessageTarget> | ||
11 | <value>foo-user@conference-2-fooserver.foo.com</value> | ||
12 | </hudson.plugins.im.DefaultIMMessageTarget> | ||
13 | </targets> | ||
14 | <strategy>ALL</strategy> | ||
15 | <notifyOnBuildStart>true</notifyOnBuildStart> | ||
16 | <notifySuspects>false</notifySuspects> | ||
17 | <notifyCulprits>false</notifyCulprits> | ||
18 | <notifyFixers>false</notifyFixers> | ||
19 | <notifyUpstreamCommitters>false</notifyUpstreamCommitters> | ||
20 | <buildToChatNotifier class="hudson.plugins.im.build_notify.DefaultBuildToChatNotifier"/> | ||
21 | <matrixMultiplier>ONLY_CONFIGURATIONS</matrixMultiplier> | ||
22 | </hudson.plugins.jabber.im.transport.JabberPublisher> | ||
23 | </publishers> | ||
24 | </project> | ||
diff --git a/tests/publishers/fixtures/jabber001.yaml b/tests/publishers/fixtures/jabber001.yaml new file mode 100644 index 0000000..31735f9 --- /dev/null +++ b/tests/publishers/fixtures/jabber001.yaml | |||
@@ -0,0 +1,9 @@ | |||
1 | publishers: | ||
2 | - jabber: | ||
3 | notify-on-build-start: true | ||
4 | group-targets: | ||
5 | - "foo-room@conference-2-fooserver.foo.com" | ||
6 | individual-targets: | ||
7 | - "foo-user@conference-2-fooserver.foo.com" | ||
8 | strategy: all | ||
9 | message: summary-scm | ||
diff --git a/tests/publishers/fixtures/jacoco001.xml b/tests/publishers/fixtures/jacoco001.xml new file mode 100644 index 0000000..7077d83 --- /dev/null +++ b/tests/publishers/fixtures/jacoco001.xml | |||
@@ -0,0 +1,17 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <project> | ||
3 | <publishers> | ||
4 | <hudson.plugins.jacoco.JacocoPublisher> | ||
5 | <execPattern>**/**.exec</execPattern> | ||
6 | <classPattern>**/classes</classPattern> | ||
7 | <sourcePattern>**/src/main/java</sourcePattern> | ||
8 | <changeBuildStatus/> | ||
9 | <inclusionPattern/> | ||
10 | <exclusionPattern/> | ||
11 | <maximumBranchCoverage>10</maximumBranchCoverage> | ||
12 | <minimumBranchCoverage>20</minimumBranchCoverage> | ||
13 | <maximumMethodCoverage>50</maximumMethodCoverage> | ||
14 | <minimumMethodCoverage>40</minimumMethodCoverage> | ||
15 | </hudson.plugins.jacoco.JacocoPublisher> | ||
16 | </publishers> | ||
17 | </project> | ||
diff --git a/tests/publishers/fixtures/jacoco001.yaml b/tests/publishers/fixtures/jacoco001.yaml new file mode 100644 index 0000000..6041961 --- /dev/null +++ b/tests/publishers/fixtures/jacoco001.yaml | |||
@@ -0,0 +1,13 @@ | |||
1 | publishers: | ||
2 | - jacoco: | ||
3 | exec-pattern: "**/**.exec" | ||
4 | class-pattern: "**/classes" | ||
5 | source-pattern: "**/src/main/java" | ||
6 | status-update: true | ||
7 | targets: | ||
8 | - branch: | ||
9 | healthy: 10 | ||
10 | unhealthy: 20 | ||
11 | - method: | ||
12 | healthy: 50 | ||
13 | unhealthy: 40 | ||
diff --git a/tests/publishers/fixtures/jira001.xml b/tests/publishers/fixtures/jira001.xml new file mode 100644 index 0000000..d08288a --- /dev/null +++ b/tests/publishers/fixtures/jira001.xml | |||
@@ -0,0 +1,6 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <project> | ||
3 | <publishers> | ||
4 | <hudson.plugins.jira.JiraIssueUpdater/> | ||
5 | </publishers> | ||
6 | </project> | ||
diff --git a/tests/publishers/fixtures/jira001.yaml b/tests/publishers/fixtures/jira001.yaml new file mode 100644 index 0000000..86000ab --- /dev/null +++ b/tests/publishers/fixtures/jira001.yaml | |||
@@ -0,0 +1,2 @@ | |||
1 | publishers: | ||
2 | - jira | ||
diff --git a/tests/publishers/fixtures/join-trigger001.xml b/tests/publishers/fixtures/join-trigger001.xml new file mode 100644 index 0000000..2fdde20 --- /dev/null +++ b/tests/publishers/fixtures/join-trigger001.xml | |||
@@ -0,0 +1,8 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <project> | ||
3 | <publishers> | ||
4 | <join.JoinTrigger> | ||
5 | <joinProjects>project-one,project-two</joinProjects> | ||
6 | </join.JoinTrigger> | ||
7 | </publishers> | ||
8 | </project> | ||
diff --git a/tests/publishers/fixtures/join-trigger001.yaml b/tests/publishers/fixtures/join-trigger001.yaml new file mode 100644 index 0000000..6caf196 --- /dev/null +++ b/tests/publishers/fixtures/join-trigger001.yaml | |||
@@ -0,0 +1,5 @@ | |||
1 | publishers: | ||
2 | - join-trigger: | ||
3 | projects: | ||
4 | - project-one | ||
5 | - project-two | ||
diff --git a/tests/publishers/fixtures/logparser001.xml b/tests/publishers/fixtures/logparser001.xml new file mode 100644 index 0000000..44881b7 --- /dev/null +++ b/tests/publishers/fixtures/logparser001.xml | |||
@@ -0,0 +1,10 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <project> | ||
3 | <publishers> | ||
4 | <hudson.plugins.logparser.LogParserPublisher> | ||
5 | <unstableOnWarning>true</unstableOnWarning> | ||
6 | <failBuildOnError>true</failBuildOnError> | ||
7 | <parsingRulesPath>/path/to/parserules</parsingRulesPath> | ||
8 | </hudson.plugins.logparser.LogParserPublisher> | ||
9 | </publishers> | ||
10 | </project> | ||
diff --git a/tests/publishers/fixtures/logparser001.yaml b/tests/publishers/fixtures/logparser001.yaml new file mode 100644 index 0000000..7749e12 --- /dev/null +++ b/tests/publishers/fixtures/logparser001.yaml | |||
@@ -0,0 +1,5 @@ | |||
1 | publishers: | ||
2 | - logparser: | ||
3 | parse-rules: "/path/to/parserules" | ||
4 | unstable-on-warning: true | ||
5 | fail-on-error: true | ||
diff --git a/tests/publishers/fixtures/mavendeploy001.xml b/tests/publishers/fixtures/maven-deploy001.xml index 327dddc..64e0962 100644 --- a/tests/publishers/fixtures/mavendeploy001.xml +++ b/tests/publishers/fixtures/maven-deploy001.xml | |||
@@ -2,7 +2,8 @@ | |||
2 | <project> | 2 | <project> |
3 | <publishers> | 3 | <publishers> |
4 | <hudson.maven.RedeployPublisher> | 4 | <hudson.maven.RedeployPublisher> |
5 | <url>file:///path/to/repo</url> | 5 | <id>example</id> |
6 | <url>http://repo.example.com/maven2/</url> | ||
6 | <uniqueVersion>true</uniqueVersion> | 7 | <uniqueVersion>true</uniqueVersion> |
7 | <evenIfUnstable>false</evenIfUnstable> | 8 | <evenIfUnstable>false</evenIfUnstable> |
8 | </hudson.maven.RedeployPublisher> | 9 | </hudson.maven.RedeployPublisher> |
diff --git a/tests/publishers/fixtures/maven-deploy001.yaml b/tests/publishers/fixtures/maven-deploy001.yaml new file mode 100644 index 0000000..a8384a8 --- /dev/null +++ b/tests/publishers/fixtures/maven-deploy001.yaml | |||
@@ -0,0 +1,6 @@ | |||
1 | publishers: | ||
2 | - maven-deploy: | ||
3 | id: example | ||
4 | url: http://repo.example.com/maven2/ | ||
5 | unique-version: true | ||
6 | deploy-unstable: false | ||
diff --git a/tests/publishers/fixtures/mavendeploy001.yaml b/tests/publishers/fixtures/mavendeploy001.yaml deleted file mode 100644 index d16b963..0000000 --- a/tests/publishers/fixtures/mavendeploy001.yaml +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | publishers: | ||
2 | - maven-deploy: | ||
3 | url: file:///path/to/repo | ||
4 | |||
diff --git a/tests/publishers/fixtures/performance001.xml b/tests/publishers/fixtures/performance001.xml new file mode 100644 index 0000000..5419d02 --- /dev/null +++ b/tests/publishers/fixtures/performance001.xml | |||
@@ -0,0 +1,17 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <project> | ||
3 | <publishers> | ||
4 | <hudson.plugins.performance.PerformancePublisher> | ||
5 | <errorFailedThreshold>85</errorFailedThreshold> | ||
6 | <errorUnstableThreshold>-1</errorUnstableThreshold> | ||
7 | <parsers> | ||
8 | <hudson.plugins.performance.JMeterParser> | ||
9 | <glob>/special/file.jtl</glob> | ||
10 | </hudson.plugins.performance.JMeterParser> | ||
11 | <hudson.plugins.performance.JUnitParser> | ||
12 | <glob>/special/file.xml</glob> | ||
13 | </hudson.plugins.performance.JUnitParser> | ||
14 | </parsers> | ||
15 | </hudson.plugins.performance.PerformancePublisher> | ||
16 | </publishers> | ||
17 | </project> | ||
diff --git a/tests/publishers/fixtures/performance001.yaml b/tests/publishers/fixtures/performance001.yaml new file mode 100644 index 0000000..5e717cb --- /dev/null +++ b/tests/publishers/fixtures/performance001.yaml | |||
@@ -0,0 +1,7 @@ | |||
1 | publishers: | ||
2 | - performance: | ||
3 | failed-threshold: 85 | ||
4 | unstable-threshold: -1 | ||
5 | report: | ||
6 | - jmeter: "/special/file.jtl" | ||
7 | - junit: "/special/file.xml" | ||
diff --git a/tests/publishers/fixtures/performance002.xml b/tests/publishers/fixtures/performance002.xml new file mode 100644 index 0000000..7f7d5f0 --- /dev/null +++ b/tests/publishers/fixtures/performance002.xml | |||
@@ -0,0 +1,17 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <project> | ||
3 | <publishers> | ||
4 | <hudson.plugins.performance.PerformancePublisher> | ||
5 | <errorFailedThreshold>85</errorFailedThreshold> | ||
6 | <errorUnstableThreshold>-1</errorUnstableThreshold> | ||
7 | <parsers> | ||
8 | <hudson.plugins.performance.JMeterParser> | ||
9 | <glob>**/*.jtl</glob> | ||
10 | </hudson.plugins.performance.JMeterParser> | ||
11 | <hudson.plugins.performance.JUnitParser> | ||
12 | <glob>**/TEST-*.xml</glob> | ||
13 | </hudson.plugins.performance.JUnitParser> | ||
14 | </parsers> | ||
15 | </hudson.plugins.performance.PerformancePublisher> | ||
16 | </publishers> | ||
17 | </project> | ||
diff --git a/tests/publishers/fixtures/performance002.yaml b/tests/publishers/fixtures/performance002.yaml new file mode 100644 index 0000000..b970cd9 --- /dev/null +++ b/tests/publishers/fixtures/performance002.yaml | |||
@@ -0,0 +1,7 @@ | |||
1 | publishers: | ||
2 | - performance: | ||
3 | failed-threshold: 85 | ||
4 | unstable-threshold: -1 | ||
5 | report: | ||
6 | - jmeter | ||
7 | - junit | ||
diff --git a/tests/publishers/fixtures/performance003.xml b/tests/publishers/fixtures/performance003.xml new file mode 100644 index 0000000..b7acfb1 --- /dev/null +++ b/tests/publishers/fixtures/performance003.xml | |||
@@ -0,0 +1,23 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <project> | ||
3 | <publishers> | ||
4 | <hudson.plugins.performance.PerformancePublisher> | ||
5 | <errorFailedThreshold>85</errorFailedThreshold> | ||
6 | <errorUnstableThreshold>-1</errorUnstableThreshold> | ||
7 | <parsers> | ||
8 | <hudson.plugins.performance.JMeterParser> | ||
9 | <glob>/special/file.jtl</glob> | ||
10 | </hudson.plugins.performance.JMeterParser> | ||
11 | <hudson.plugins.performance.JUnitParser> | ||
12 | <glob>/special/file.xml</glob> | ||
13 | </hudson.plugins.performance.JUnitParser> | ||
14 | <hudson.plugins.performance.JMeterParser> | ||
15 | <glob>**/*.jtl</glob> | ||
16 | </hudson.plugins.performance.JMeterParser> | ||
17 | <hudson.plugins.performance.JUnitParser> | ||
18 | <glob>**/TEST-*.xml</glob> | ||
19 | </hudson.plugins.performance.JUnitParser> | ||
20 | </parsers> | ||
21 | </hudson.plugins.performance.PerformancePublisher> | ||
22 | </publishers> | ||
23 | </project> | ||
diff --git a/tests/publishers/fixtures/performance003.yaml b/tests/publishers/fixtures/performance003.yaml new file mode 100644 index 0000000..478c4e2 --- /dev/null +++ b/tests/publishers/fixtures/performance003.yaml | |||
@@ -0,0 +1,9 @@ | |||
1 | publishers: | ||
2 | - performance: | ||
3 | failed-threshold: 85 | ||
4 | unstable-threshold: -1 | ||
5 | report: | ||
6 | - jmeter: "/special/file.jtl" | ||
7 | - junit: "/special/file.xml" | ||
8 | - jmeter | ||
9 | - junit | ||
diff --git a/tests/publishers/fixtures/plot004.xml b/tests/publishers/fixtures/plot004.xml new file mode 100644 index 0000000..ac799a3 --- /dev/null +++ b/tests/publishers/fixtures/plot004.xml | |||
@@ -0,0 +1,51 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <project> | ||
3 | <publishers> | ||
4 | <hudson.plugins.plot.PlotPublisher> | ||
5 | <plots> | ||
6 | <hudson.plugins.plot.Plot> | ||
7 | <title>MyPlot</title> | ||
8 | <yaxis>Y</yaxis> | ||
9 | <csvFileName>myplot.csv</csvFileName> | ||
10 | <series> | ||
11 | <hudson.plugins.plot.PropertiesSeries> | ||
12 | <file>graph-me-second.properties</file> | ||
13 | <label>MyLabel</label> | ||
14 | <fileType>properties</fileType> | ||
15 | </hudson.plugins.plot.PropertiesSeries> | ||
16 | <hudson.plugins.plot.CSVSeries> | ||
17 | <file>graph-me-first.csv</file> | ||
18 | <inclusionFlag>OFF</inclusionFlag> | ||
19 | <exclusionValues/> | ||
20 | <url>http://srv1</url> | ||
21 | <displayTableFlag>false</displayTableFlag> | ||
22 | <fileType>csv</fileType> | ||
23 | </hudson.plugins.plot.CSVSeries> | ||
24 | </series> | ||
25 | <group>PlotGroup</group> | ||
26 | <useDescr>false</useDescr> | ||
27 | <numBuilds/> | ||
28 | <style>line</style> | ||
29 | </hudson.plugins.plot.Plot> | ||
30 | <hudson.plugins.plot.Plot> | ||
31 | <title>MyPlot2</title> | ||
32 | <yaxis>Y</yaxis> | ||
33 | <csvFileName>myplot2.csv</csvFileName> | ||
34 | <series> | ||
35 | <hudson.plugins.plot.XMLSeries> | ||
36 | <file>graph-me-third.xml</file> | ||
37 | <url>http://srv2</url> | ||
38 | <xpathString>/*</xpathString> | ||
39 | <nodeTypeString>NODE</nodeTypeString> | ||
40 | <fileType>xml</fileType> | ||
41 | </hudson.plugins.plot.XMLSeries> | ||
42 | </series> | ||
43 | <group>PlotGroup</group> | ||
44 | <useDescr>false</useDescr> | ||
45 | <numBuilds/> | ||
46 | <style>line</style> | ||
47 | </hudson.plugins.plot.Plot> | ||
48 | </plots> | ||
49 | </hudson.plugins.plot.PlotPublisher> | ||
50 | </publishers> | ||
51 | </project> | ||
diff --git a/tests/publishers/fixtures/plot004.yaml b/tests/publishers/fixtures/plot004.yaml new file mode 100644 index 0000000..2e16c8d --- /dev/null +++ b/tests/publishers/fixtures/plot004.yaml | |||
@@ -0,0 +1,30 @@ | |||
1 | publishers: | ||
2 | - plot: | ||
3 | - title: MyPlot | ||
4 | yaxis: Y | ||
5 | csv-file-name: myplot.csv | ||
6 | group: PlotGroup | ||
7 | num-builds: '' | ||
8 | style: line | ||
9 | use-description: false | ||
10 | series: | ||
11 | - file: graph-me-second.properties | ||
12 | label: MyLabel | ||
13 | format: properties | ||
14 | - file: graph-me-first.csv | ||
15 | url: 'http://srv1' | ||
16 | inclusion-flag: 'off' | ||
17 | display-table: true | ||
18 | format: csv | ||
19 | - title: MyPlot2 | ||
20 | yaxis: Y | ||
21 | csv-file-name: myplot2.csv | ||
22 | group: PlotGroup | ||
23 | style: line | ||
24 | use-description: false | ||
25 | series: | ||
26 | - file: graph-me-third.xml | ||
27 | url: 'http://srv2' | ||
28 | format: xml | ||
29 | xpath-type: 'node' | ||
30 | xpath: '/*' | ||
diff --git a/tests/publishers/fixtures/post-tasks001.xml b/tests/publishers/fixtures/post-tasks001.xml new file mode 100644 index 0000000..a30dc22 --- /dev/null +++ b/tests/publishers/fixtures/post-tasks001.xml | |||
@@ -0,0 +1,29 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <project> | ||
3 | <publishers> | ||
4 | <hudson.plugins.postbuildtask.PostbuildTask> | ||
5 | <tasks> | ||
6 | <hudson.plugins.postbuildtask.TaskProperties> | ||
7 | <logTexts> | ||
8 | <hudson.plugins.postbuildtask.LogProperties> | ||
9 | <logText>line to match</logText> | ||
10 | <operator>AND</operator> | ||
11 | </hudson.plugins.postbuildtask.LogProperties> | ||
12 | <hudson.plugins.postbuildtask.LogProperties> | ||
13 | <logText>line to match</logText> | ||
14 | <operator>OR</operator> | ||
15 | </hudson.plugins.postbuildtask.LogProperties> | ||
16 | <hudson.plugins.postbuildtask.LogProperties> | ||
17 | <logText>line to match</logText> | ||
18 | <operator>AND</operator> | ||
19 | </hudson.plugins.postbuildtask.LogProperties> | ||
20 | </logTexts> | ||
21 | <EscalateStatus>true</EscalateStatus> | ||
22 | <RunIfJobSuccessful>true</RunIfJobSuccessful> | ||
23 | <script>echo "Here goes the task script" | ||
24 | </script> | ||
25 | </hudson.plugins.postbuildtask.TaskProperties> | ||
26 | </tasks> | ||
27 | </hudson.plugins.postbuildtask.PostbuildTask> | ||
28 | </publishers> | ||
29 | </project> | ||
diff --git a/tests/publishers/fixtures/post-tasks001.yaml b/tests/publishers/fixtures/post-tasks001.yaml new file mode 100644 index 0000000..36d0e31 --- /dev/null +++ b/tests/publishers/fixtures/post-tasks001.yaml | |||
@@ -0,0 +1,13 @@ | |||
1 | publishers: | ||
2 | - post-tasks: | ||
3 | - matches: | ||
4 | - log-text: line to match | ||
5 | operator: AND | ||
6 | - log-text: line to match | ||
7 | operator: OR | ||
8 | - log-text: line to match | ||
9 | operator: AND | ||
10 | escalate-status: true | ||
11 | run-if-job-successful: true | ||
12 | script: | | ||
13 | echo "Here goes the task script" | ||
diff --git a/tests/publishers/fixtures/robot001.xml b/tests/publishers/fixtures/robot001.xml new file mode 100644 index 0000000..0560aa4 --- /dev/null +++ b/tests/publishers/fixtures/robot001.xml | |||
@@ -0,0 +1,19 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <project> | ||
3 | <publishers> | ||
4 | <hudson.plugins.robot.RobotPublisher> | ||
5 | <outputPath>reports/robot</outputPath> | ||
6 | <logFileLink>report.html</logFileLink> | ||
7 | <reportFileName>custom-report.html</reportFileName> | ||
8 | <logFileName>custom-log.html</logFileName> | ||
9 | <outputFileName>custom-output.xml</outputFileName> | ||
10 | <passThreshold>80.0</passThreshold> | ||
11 | <unstableThreshold>60.0</unstableThreshold> | ||
12 | <onlyCritical>false</onlyCritical> | ||
13 | <otherFiles> | ||
14 | <string>extra-file1.html</string> | ||
15 | <string>extra-file2.txt</string> | ||
16 | </otherFiles> | ||
17 | </hudson.plugins.robot.RobotPublisher> | ||
18 | </publishers> | ||
19 | </project> | ||
diff --git a/tests/publishers/fixtures/robot001.yaml b/tests/publishers/fixtures/robot001.yaml new file mode 100644 index 0000000..2919344 --- /dev/null +++ b/tests/publishers/fixtures/robot001.yaml | |||
@@ -0,0 +1,13 @@ | |||
1 | publishers: | ||
2 | - robot: | ||
3 | output-path: reports/robot | ||
4 | log-file-link: report.html | ||
5 | report-html: custom-report.html | ||
6 | log-html: custom-log.html | ||
7 | output-xml: custom-output.xml | ||
8 | pass-threshold: 80.0 | ||
9 | unstable-threshold: 60.0 | ||
10 | only-critical: false | ||
11 | other-files: | ||
12 | - extra-file1.html | ||
13 | - extra-file2.txt | ||
diff --git a/tests/publishers/fixtures/sloccount001.xml b/tests/publishers/fixtures/sloccount001.xml new file mode 100644 index 0000000..0e9a22e --- /dev/null +++ b/tests/publishers/fixtures/sloccount001.xml | |||
@@ -0,0 +1,9 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <project> | ||
3 | <publishers> | ||
4 | <hudson.plugins.sloccount.SloccountPublisher> | ||
5 | <pattern>sloccount.sc</pattern> | ||
6 | <encoding>latin-1</encoding> | ||
7 | </hudson.plugins.sloccount.SloccountPublisher> | ||
8 | </publishers> | ||
9 | </project> | ||
diff --git a/tests/publishers/fixtures/sloccount001.yaml b/tests/publishers/fixtures/sloccount001.yaml new file mode 100644 index 0000000..cac1e96 --- /dev/null +++ b/tests/publishers/fixtures/sloccount001.yaml | |||
@@ -0,0 +1,4 @@ | |||
1 | publishers: | ||
2 | - sloccount: | ||
3 | report-files: sloccount.sc | ||
4 | charset: latin-1 | ||
diff --git a/tests/publishers/fixtures/sonar001.xml b/tests/publishers/fixtures/sonar001.xml new file mode 100644 index 0000000..01dca17 --- /dev/null +++ b/tests/publishers/fixtures/sonar001.xml | |||
@@ -0,0 +1,17 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <project> | ||
3 | <publishers> | ||
4 | <hudson.plugins.sonar.SonarPublisher> | ||
5 | <jdk>MyJdk</jdk> | ||
6 | <branch>myBranch</branch> | ||
7 | <language>java</language> | ||
8 | <mavenOpts>-DskipTests</mavenOpts> | ||
9 | <jobAdditionalProperties>-DsonarHostURL=http://example.com/</jobAdditionalProperties> | ||
10 | <triggers> | ||
11 | <skipScmCause>true</skipScmCause> | ||
12 | <skipUpstreamCause>true</skipUpstreamCause> | ||
13 | <envVar>SKIP_SONAR</envVar> | ||
14 | </triggers> | ||
15 | </hudson.plugins.sonar.SonarPublisher> | ||
16 | </publishers> | ||
17 | </project> | ||
diff --git a/tests/publishers/fixtures/sonar001.yaml b/tests/publishers/fixtures/sonar001.yaml new file mode 100644 index 0000000..f5942de --- /dev/null +++ b/tests/publishers/fixtures/sonar001.yaml | |||
@@ -0,0 +1,11 @@ | |||
1 | publishers: | ||
2 | - sonar: | ||
3 | jdk: MyJdk | ||
4 | branch: myBranch | ||
5 | language: java | ||
6 | maven-opts: -DskipTests | ||
7 | additional-properties: -DsonarHostURL=http://example.com/ | ||
8 | skip-global-triggers: | ||
9 | skip-when-scm-change: true | ||
10 | skip-when-upstream-build: true | ||
11 | skip-when-envvar-defined: SKIP_SONAR | ||
diff --git a/tests/publishers/fixtures/tap001.xml b/tests/publishers/fixtures/tap001.xml new file mode 100644 index 0000000..4ac7197 --- /dev/null +++ b/tests/publishers/fixtures/tap001.xml | |||
@@ -0,0 +1,14 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <project> | ||
3 | <publishers> | ||
4 | <org.tap4j.plugin.TapPublisher> | ||
5 | <testResults>puiparts.tap</testResults> | ||
6 | <failIfNoResults>false</failIfNoResults> | ||
7 | <failedTestsMarkBuildAsFailure>false</failedTestsMarkBuildAsFailure> | ||
8 | <outputTapToConsole>true</outputTapToConsole> | ||
9 | <enableSubtests>true</enableSubtests> | ||
10 | <discardOldReports>false</discardOldReports> | ||
11 | <todoIsFailure>false</todoIsFailure> | ||
12 | </org.tap4j.plugin.TapPublisher> | ||
13 | </publishers> | ||
14 | </project> | ||
diff --git a/tests/publishers/fixtures/tap001.yaml b/tests/publishers/fixtures/tap001.yaml new file mode 100644 index 0000000..0d40766 --- /dev/null +++ b/tests/publishers/fixtures/tap001.yaml | |||
@@ -0,0 +1,4 @@ | |||
1 | publishers: | ||
2 | - tap: | ||
3 | results: puiparts.tap | ||
4 | todo-is-failure: false | ||
diff --git a/tests/publishers/fixtures/text-finder001.xml b/tests/publishers/fixtures/text-finder001.xml new file mode 100644 index 0000000..03a388c --- /dev/null +++ b/tests/publishers/fixtures/text-finder001.xml | |||
@@ -0,0 +1,12 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <project> | ||
3 | <publishers> | ||
4 | <hudson.plugins.textfinder.TextFinderPublisher> | ||
5 | <fileSet>file.txt</fileSet> | ||
6 | <regexp>some string</regexp> | ||
7 | <alsoCheckConsoleOutput>true</alsoCheckConsoleOutput> | ||
8 | <succeedIfFound>false</succeedIfFound> | ||
9 | <unstableIfFound>false</unstableIfFound> | ||
10 | </hudson.plugins.textfinder.TextFinderPublisher> | ||
11 | </publishers> | ||
12 | </project> | ||
diff --git a/tests/publishers/fixtures/text-finder001.yaml b/tests/publishers/fixtures/text-finder001.yaml new file mode 100644 index 0000000..3bf4231 --- /dev/null +++ b/tests/publishers/fixtures/text-finder001.yaml | |||
@@ -0,0 +1,7 @@ | |||
1 | publishers: | ||
2 | - text-finder: | ||
3 | regexp: "some string" | ||
4 | fileset: "file.txt" | ||
5 | also-check-console-output: true | ||
6 | succeed-if-found: false | ||
7 | unstable-if-found: false | ||
diff --git a/tests/publishers/fixtures/violations001.xml b/tests/publishers/fixtures/violations001.xml new file mode 100644 index 0000000..d7cb275 --- /dev/null +++ b/tests/publishers/fixtures/violations001.xml | |||
@@ -0,0 +1,195 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <project> | ||
3 | <publishers> | ||
4 | <hudson.plugins.violations.ViolationsPublisher> | ||
5 | <config> | ||
6 | <suppressions class="tree-set"> | ||
7 | <no-comparator/> | ||
8 | </suppressions> | ||
9 | <typeConfigs> | ||
10 | <no-comparator/> | ||
11 | <entry> | ||
12 | <string>checkstyle</string> | ||
13 | <hudson.plugins.violations.TypeConfig> | ||
14 | <type>checkstyle</type> | ||
15 | <min>10</min> | ||
16 | <max>999</max> | ||
17 | <unstable>999</unstable> | ||
18 | <usePattern>false</usePattern> | ||
19 | <pattern/> | ||
20 | </hudson.plugins.violations.TypeConfig> | ||
21 | </entry> | ||
22 | <entry> | ||
23 | <string>codenarc</string> | ||
24 | <hudson.plugins.violations.TypeConfig> | ||
25 | <type>codenarc</type> | ||
26 | <min>10</min> | ||
27 | <max>999</max> | ||
28 | <unstable>999</unstable> | ||
29 | <usePattern>false</usePattern> | ||
30 | <pattern/> | ||
31 | </hudson.plugins.violations.TypeConfig> | ||
32 | </entry> | ||
33 | <entry> | ||
34 | <string>cpd</string> | ||
35 | <hudson.plugins.violations.TypeConfig> | ||
36 | <type>cpd</type> | ||
37 | <min>10</min> | ||
38 | <max>999</max> | ||
39 | <unstable>999</unstable> | ||
40 | <usePattern>false</usePattern> | ||
41 | <pattern/> | ||
42 | </hudson.plugins.violations.TypeConfig> | ||
43 | </entry> | ||
44 | <entry> | ||
45 | <string>cpplint</string> | ||
46 | <hudson.plugins.violations.TypeConfig> | ||
47 | <type>cpplint</type> | ||
48 | <min>10</min> | ||
49 | <max>999</max> | ||
50 | <unstable>999</unstable> | ||
51 | <usePattern>false</usePattern> | ||
52 | <pattern/> | ||
53 | </hudson.plugins.violations.TypeConfig> | ||
54 | </entry> | ||
55 | <entry> | ||
56 | <string>csslint</string> | ||
57 | <hudson.plugins.violations.TypeConfig> | ||
58 | <type>csslint</type> | ||
59 | <min>10</min> | ||
60 | <max>999</max> | ||
61 | <unstable>999</unstable> | ||
62 | <usePattern>false</usePattern> | ||
63 | <pattern/> | ||
64 | </hudson.plugins.violations.TypeConfig> | ||
65 | </entry> | ||
66 | <entry> | ||
67 | <string>findbugs</string> | ||
68 | <hudson.plugins.violations.TypeConfig> | ||
69 | <type>findbugs</type> | ||
70 | <min>10</min> | ||
71 | <max>999</max> | ||
72 | <unstable>999</unstable> | ||
73 | <usePattern>false</usePattern> | ||
74 | <pattern/> | ||
75 | </hudson.plugins.violations.TypeConfig> | ||
76 | </entry> | ||
77 | <entry> | ||
78 | <string>fxcop</string> | ||
79 | <hudson.plugins.violations.TypeConfig> | ||
80 | <type>fxcop</type> | ||
81 | <min>10</min> | ||
82 | <max>999</max> | ||
83 | <unstable>999</unstable> | ||
84 | <usePattern>false</usePattern> | ||
85 | <pattern/> | ||
86 | </hudson.plugins.violations.TypeConfig> | ||
87 | </entry> | ||
88 | <entry> | ||
89 | <string>gendarme</string> | ||
90 | <hudson.plugins.violations.TypeConfig> | ||
91 | <type>gendarme</type> | ||
92 | <min>10</min> | ||
93 | <max>999</max> | ||
94 | <unstable>999</unstable> | ||
95 | <usePattern>false</usePattern> | ||
96 | <pattern/> | ||
97 | </hudson.plugins.violations.TypeConfig> | ||
98 | </entry> | ||
99 | <entry> | ||
100 | <string>jcreport</string> | ||
101 | <hudson.plugins.violations.TypeConfig> | ||
102 | <type>jcreport</type> | ||
103 | <min>10</min> | ||
104 | <max>999</max> | ||
105 | <unstable>999</unstable> | ||
106 | <usePattern>false</usePattern> | ||
107 | <pattern/> | ||
108 | </hudson.plugins.violations.TypeConfig> | ||
109 | </entry> | ||
110 | <entry> | ||
111 | <string>jslint</string> | ||
112 | <hudson.plugins.violations.TypeConfig> | ||
113 | <type>jslint</type> | ||
114 | <min>10</min> | ||
115 | <max>999</max> | ||
116 | <unstable>999</unstable> | ||
117 | <usePattern>false</usePattern> | ||
118 | <pattern/> | ||
119 | </hudson.plugins.violations.TypeConfig> | ||
120 | </entry> | ||
121 | <entry> | ||
122 | <string>pep8</string> | ||
123 | <hudson.plugins.violations.TypeConfig> | ||
124 | <type>pep8</type> | ||
125 | <min>0</min> | ||
126 | <max>1</max> | ||
127 | <unstable>1</unstable> | ||
128 | <usePattern>false</usePattern> | ||
129 | <pattern>**/pep8.txt</pattern> | ||
130 | </hudson.plugins.violations.TypeConfig> | ||
131 | </entry> | ||
132 | <entry> | ||
133 | <string>perlcritic</string> | ||
134 | <hudson.plugins.violations.TypeConfig> | ||
135 | <type>perlcritic</type> | ||
136 | <min>10</min> | ||
137 | <max>999</max> | ||
138 | <unstable>999</unstable> | ||
139 | <usePattern>false</usePattern> | ||
140 | <pattern/> | ||
141 | </hudson.plugins.violations.TypeConfig> | ||
142 | </entry> | ||
143 | <entry> | ||
144 | <string>pmd</string> | ||
145 | <hudson.plugins.violations.TypeConfig> | ||
146 | <type>pmd</type> | ||
147 | <min>10</min> | ||
148 | <max>999</max> | ||
149 | <unstable>999</unstable> | ||
150 | <usePattern>false</usePattern> | ||
151 | <pattern/> | ||
152 | </hudson.plugins.violations.TypeConfig> | ||
153 | </entry> | ||
154 | <entry> | ||
155 | <string>pylint</string> | ||
156 | <hudson.plugins.violations.TypeConfig> | ||
157 | <type>pylint</type> | ||
158 | <min>10</min> | ||
159 | <max>999</max> | ||
160 | <unstable>999</unstable> | ||
161 | <usePattern>false</usePattern> | ||
162 | <pattern/> | ||
163 | </hudson.plugins.violations.TypeConfig> | ||
164 | </entry> | ||
165 | <entry> | ||
166 | <string>simian</string> | ||
167 | <hudson.plugins.violations.TypeConfig> | ||
168 | <type>simian</type> | ||
169 | <min>10</min> | ||
170 | <max>999</max> | ||
171 | <unstable>999</unstable> | ||
172 | <usePattern>false</usePattern> | ||
173 | <pattern/> | ||
174 | </hudson.plugins.violations.TypeConfig> | ||
175 | </entry> | ||
176 | <entry> | ||
177 | <string>stylecop</string> | ||
178 | <hudson.plugins.violations.TypeConfig> | ||
179 | <type>stylecop</type> | ||
180 | <min>10</min> | ||
181 | <max>999</max> | ||
182 | <unstable>999</unstable> | ||
183 | <usePattern>false</usePattern> | ||
184 | <pattern/> | ||
185 | </hudson.plugins.violations.TypeConfig> | ||
186 | </entry> | ||
187 | </typeConfigs> | ||
188 | <limit>100</limit> | ||
189 | <sourcePathPattern/> | ||
190 | <fauxProjectPath/> | ||
191 | <encoding>default</encoding> | ||
192 | </config> | ||
193 | </hudson.plugins.violations.ViolationsPublisher> | ||
194 | </publishers> | ||
195 | </project> | ||
diff --git a/tests/publishers/fixtures/violations001.yaml b/tests/publishers/fixtures/violations001.yaml new file mode 100644 index 0000000..fbc069b --- /dev/null +++ b/tests/publishers/fixtures/violations001.yaml | |||
@@ -0,0 +1,7 @@ | |||
1 | publishers: | ||
2 | - violations: | ||
3 | pep8: | ||
4 | min: 0 | ||
5 | max: 1 | ||
6 | unstable: 1 | ||
7 | pattern: '**/pep8.txt' | ||
diff --git a/tests/publishers/fixtures/warnings001.xml b/tests/publishers/fixtures/warnings001.xml new file mode 100644 index 0000000..0d0f409 --- /dev/null +++ b/tests/publishers/fixtures/warnings001.xml | |||
@@ -0,0 +1,55 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <project> | ||
3 | <publishers> | ||
4 | <hudson.plugins.warnings.WarningsPublisher> | ||
5 | <consoleParsers> | ||
6 | <hudson.plugins.warnings.ConsoleParser> | ||
7 | <parserName>FxCop</parserName> | ||
8 | </hudson.plugins.warnings.ConsoleParser> | ||
9 | <hudson.plugins.warnings.ConsoleParser> | ||
10 | <parserName>CodeAnalysis</parserName> | ||
11 | </hudson.plugins.warnings.ConsoleParser> | ||
12 | </consoleParsers> | ||
13 | <parserConfigurations> | ||
14 | <hudson.plugins.warnings.ParserConfiguration> | ||
15 | <pattern>**/*.out</pattern> | ||
16 | <parserName>AcuCobol Compiler</parserName> | ||
17 | </hudson.plugins.warnings.ParserConfiguration> | ||
18 | <hudson.plugins.warnings.ParserConfiguration> | ||
19 | <pattern>**/*.warnings</pattern> | ||
20 | <parserName>FxCop</parserName> | ||
21 | </hudson.plugins.warnings.ParserConfiguration> | ||
22 | </parserConfigurations> | ||
23 | <includePattern>[a-zA-Z]\.java,[a-zA-Z]\.cpp</includePattern> | ||
24 | <excludePattern>[a-zA-Z]\.html,[a-zA-Z]\.js</excludePattern> | ||
25 | <canRunOnFailed>true</canRunOnFailed> | ||
26 | <shouldDetectModules>true</shouldDetectModules> | ||
27 | <doNotResolveRelativePaths>false</doNotResolveRelativePaths> | ||
28 | <healthy>50</healthy> | ||
29 | <unHealthy>25</unHealthy> | ||
30 | <thresholdLimit>normal</thresholdLimit> | ||
31 | <thresholds> | ||
32 | <unstableTotalAll>90</unstableTotalAll> | ||
33 | <unstableTotalHigh>90</unstableTotalHigh> | ||
34 | <unstableTotalNormal>40</unstableTotalNormal> | ||
35 | <unstableTotalLow>30</unstableTotalLow> | ||
36 | <failedTotalAll>100</failedTotalAll> | ||
37 | <failedTotalHigh>100</failedTotalHigh> | ||
38 | <failedTotalNormal>50</failedTotalNormal> | ||
39 | <failedTotalLow>40</failedTotalLow> | ||
40 | <unstableNewAll>100</unstableNewAll> | ||
41 | <unstableNewHigh>50</unstableNewHigh> | ||
42 | <unstableNewNormal>30</unstableNewNormal> | ||
43 | <unstableNewLow>10</unstableNewLow> | ||
44 | <failedNewAll>100</failedNewAll> | ||
45 | <failedNewHigh>60</failedNewHigh> | ||
46 | <failedNewNormal>50</failedNewNormal> | ||
47 | <failedNewLow>40</failedNewLow> | ||
48 | </thresholds> | ||
49 | <dontComputeNew>false</dontComputeNew> | ||
50 | <useDeltaValues>true</useDeltaValues> | ||
51 | <useStableBuildAsReference>true</useStableBuildAsReference> | ||
52 | <defaultEncoding>ISO-8859-9</defaultEncoding> | ||
53 | </hudson.plugins.warnings.WarningsPublisher> | ||
54 | </publishers> | ||
55 | </project> | ||
diff --git a/tests/publishers/fixtures/warnings001.yaml b/tests/publishers/fixtures/warnings001.yaml new file mode 100644 index 0000000..19f8879 --- /dev/null +++ b/tests/publishers/fixtures/warnings001.yaml | |||
@@ -0,0 +1,43 @@ | |||
1 | publishers: | ||
2 | - warnings: | ||
3 | console-log-parsers: | ||
4 | - FxCop | ||
5 | - CodeAnalysis | ||
6 | workspace-file-scanners: | ||
7 | - file-pattern: '**/*.out' | ||
8 | scanner: 'AcuCobol Compiler' | ||
9 | - file-pattern: '**/*.warnings' | ||
10 | scanner: FxCop | ||
11 | files-to-include: '[a-zA-Z]\.java,[a-zA-Z]\.cpp' | ||
12 | files-to-ignore: '[a-zA-Z]\.html,[a-zA-Z]\.js' | ||
13 | run-always: true | ||
14 | detect-modules: true | ||
15 | resolve-relative-paths: true | ||
16 | health-threshold-high: 50 | ||
17 | health-threshold-low: 25 | ||
18 | health-priorities: high-and-normal | ||
19 | total-thresholds: | ||
20 | unstable: | ||
21 | total-all: 90 | ||
22 | total-high: 90 | ||
23 | total-normal: 40 | ||
24 | total-low: 30 | ||
25 | failed: | ||
26 | total-all: 100 | ||
27 | total-high: 100 | ||
28 | total-normal: 50 | ||
29 | total-low: 40 | ||
30 | new-thresholds: | ||
31 | unstable: | ||
32 | new-all: 100 | ||
33 | new-high: 50 | ||
34 | new-normal: 30 | ||
35 | new-low: 10 | ||
36 | failed: | ||
37 | new-all: 100 | ||
38 | new-high: 60 | ||
39 | new-normal: 50 | ||
40 | new-low: 40 | ||
41 | use-delta-for-new-warnings: true | ||
42 | only-use-stable-builds-as-reference: true | ||
43 | default-encoding: ISO-8859-9 | ||
diff --git a/tests/publishers/fixtures/workspace-cleanup001.xml b/tests/publishers/fixtures/workspace-cleanup001.xml new file mode 100644 index 0000000..dc63715 --- /dev/null +++ b/tests/publishers/fixtures/workspace-cleanup001.xml | |||
@@ -0,0 +1,21 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <project> | ||
3 | <publishers> | ||
4 | <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup@0.14"> | ||
5 | <patterns> | ||
6 | <hudson.plugins.ws__cleanup.Pattern> | ||
7 | <pattern>*.zip</pattern> | ||
8 | <type>INCLUDE</type> | ||
9 | </hudson.plugins.ws__cleanup.Pattern> | ||
10 | </patterns> | ||
11 | <deleteDirs>false</deleteDirs> | ||
12 | <cleanupMatrixParent>false</cleanupMatrixParent> | ||
13 | <cleanWhenSuccess>true</cleanWhenSuccess> | ||
14 | <cleanWhenUnstable>true</cleanWhenUnstable> | ||
15 | <cleanWhenFailure>true</cleanWhenFailure> | ||
16 | <cleanWhenNotBuilt>false</cleanWhenNotBuilt> | ||
17 | <cleanWhenAborted>true</cleanWhenAborted> | ||
18 | <notFailBuild>true</notFailBuild> | ||
19 | </hudson.plugins.ws__cleanup.WsCleanup> | ||
20 | </publishers> | ||
21 | </project> | ||
diff --git a/tests/publishers/fixtures/workspace-cleanup001.yaml b/tests/publishers/fixtures/workspace-cleanup001.yaml new file mode 100644 index 0000000..79caf3b --- /dev/null +++ b/tests/publishers/fixtures/workspace-cleanup001.yaml | |||
@@ -0,0 +1,7 @@ | |||
1 | publishers: | ||
2 | - workspace-cleanup: | ||
3 | include: | ||
4 | - "*.zip" | ||
5 | clean-if: | ||
6 | - success: true | ||
7 | - not-built: false | ||
diff --git a/tests/publishers/fixtures/xml-summary001.xml b/tests/publishers/fixtures/xml-summary001.xml new file mode 100644 index 0000000..e029c95 --- /dev/null +++ b/tests/publishers/fixtures/xml-summary001.xml | |||
@@ -0,0 +1,8 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <project> | ||
3 | <publishers> | ||
4 | <hudson.plugins.summary__report.ACIPluginPublisher> | ||
5 | <name>*_summary_report.xml</name> | ||
6 | </hudson.plugins.summary__report.ACIPluginPublisher> | ||
7 | </publishers> | ||
8 | </project> | ||
diff --git a/tests/publishers/fixtures/xml-summary001.yaml b/tests/publishers/fixtures/xml-summary001.yaml new file mode 100644 index 0000000..6205df4 --- /dev/null +++ b/tests/publishers/fixtures/xml-summary001.yaml | |||
@@ -0,0 +1,3 @@ | |||
1 | publishers: | ||
2 | - xml-summary: | ||
3 | files: '*_summary_report.xml' | ||