Browse Source

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
tags/1.2.0
Darragh Bailey 4 years ago
parent
commit
09c0224fb2
60 changed files with 1192 additions and 385 deletions
  1. 163
    380
      jenkins_jobs/modules/publishers.py
  2. 8
    0
      tests/publishers/fixtures/aggregate-tests001.xml
  3. 3
    0
      tests/publishers/fixtures/aggregate-tests001.yaml
  4. 6
    0
      tests/publishers/fixtures/claim-build001.xml
  5. 2
    0
      tests/publishers/fixtures/claim-build001.yaml
  6. 52
    0
      tests/publishers/fixtures/cobertura001.xml
  7. 20
    0
      tests/publishers/fixtures/cobertura001.yaml
  8. 10
    0
      tests/publishers/fixtures/copy-to-master001.xml
  9. 7
    0
      tests/publishers/fixtures/copy-to-master001.yaml
  10. 58
    0
      tests/publishers/fixtures/coverage001.xml
  11. 2
    0
      tests/publishers/fixtures/coverage001.yaml
  12. 34
    0
      tests/publishers/fixtures/cppcheck001.xml
  13. 21
    0
      tests/publishers/fixtures/cppcheck001.yaml
  14. 9
    0
      tests/publishers/fixtures/fingerprint001.xml
  15. 4
    0
      tests/publishers/fixtures/fingerprint001.yaml
  16. 8
    0
      tests/publishers/fixtures/groovy-postbuild001.xml
  17. 2
    0
      tests/publishers/fixtures/groovy-postbuild001.yaml
  18. 17
    0
      tests/publishers/fixtures/html-publisher001.xml
  19. 7
    0
      tests/publishers/fixtures/html-publisher001.yaml
  20. 24
    0
      tests/publishers/fixtures/jabber001.xml
  21. 9
    0
      tests/publishers/fixtures/jabber001.yaml
  22. 17
    0
      tests/publishers/fixtures/jacoco001.xml
  23. 13
    0
      tests/publishers/fixtures/jacoco001.yaml
  24. 6
    0
      tests/publishers/fixtures/jira001.xml
  25. 2
    0
      tests/publishers/fixtures/jira001.yaml
  26. 8
    0
      tests/publishers/fixtures/join-trigger001.xml
  27. 5
    0
      tests/publishers/fixtures/join-trigger001.yaml
  28. 10
    0
      tests/publishers/fixtures/logparser001.xml
  29. 5
    0
      tests/publishers/fixtures/logparser001.yaml
  30. 2
    1
      tests/publishers/fixtures/maven-deploy001.xml
  31. 6
    0
      tests/publishers/fixtures/maven-deploy001.yaml
  32. 0
    4
      tests/publishers/fixtures/mavendeploy001.yaml
  33. 17
    0
      tests/publishers/fixtures/performance001.xml
  34. 7
    0
      tests/publishers/fixtures/performance001.yaml
  35. 17
    0
      tests/publishers/fixtures/performance002.xml
  36. 7
    0
      tests/publishers/fixtures/performance002.yaml
  37. 23
    0
      tests/publishers/fixtures/performance003.xml
  38. 9
    0
      tests/publishers/fixtures/performance003.yaml
  39. 51
    0
      tests/publishers/fixtures/plot004.xml
  40. 30
    0
      tests/publishers/fixtures/plot004.yaml
  41. 29
    0
      tests/publishers/fixtures/post-tasks001.xml
  42. 13
    0
      tests/publishers/fixtures/post-tasks001.yaml
  43. 19
    0
      tests/publishers/fixtures/robot001.xml
  44. 13
    0
      tests/publishers/fixtures/robot001.yaml
  45. 9
    0
      tests/publishers/fixtures/sloccount001.xml
  46. 4
    0
      tests/publishers/fixtures/sloccount001.yaml
  47. 17
    0
      tests/publishers/fixtures/sonar001.xml
  48. 11
    0
      tests/publishers/fixtures/sonar001.yaml
  49. 14
    0
      tests/publishers/fixtures/tap001.xml
  50. 4
    0
      tests/publishers/fixtures/tap001.yaml
  51. 12
    0
      tests/publishers/fixtures/text-finder001.xml
  52. 7
    0
      tests/publishers/fixtures/text-finder001.yaml
  53. 195
    0
      tests/publishers/fixtures/violations001.xml
  54. 7
    0
      tests/publishers/fixtures/violations001.yaml
  55. 55
    0
      tests/publishers/fixtures/warnings001.xml
  56. 43
    0
      tests/publishers/fixtures/warnings001.yaml
  57. 21
    0
      tests/publishers/fixtures/workspace-cleanup001.xml
  58. 7
    0
      tests/publishers/fixtures/workspace-cleanup001.yaml
  59. 8
    0
      tests/publishers/fixtures/xml-summary001.xml
  60. 3
    0
      tests/publishers/fixtures/xml-summary001.yaml

+ 163
- 380
jenkins_jobs/modules/publishers.py
File diff suppressed because it is too large
View File


+ 8
- 0
tests/publishers/fixtures/aggregate-tests001.xml View File

@@ -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>

+ 3
- 0
tests/publishers/fixtures/aggregate-tests001.yaml View File

@@ -0,0 +1,3 @@
1
+publishers:
2
+  - aggregate-tests:
3
+      include-failed-builds: true

+ 6
- 0
tests/publishers/fixtures/claim-build001.xml View File

@@ -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>

+ 2
- 0
tests/publishers/fixtures/claim-build001.yaml View File

@@ -0,0 +1,2 @@
1
+publishers:
2
+  - claim-build

+ 52
- 0
tests/publishers/fixtures/cobertura001.xml View File

@@ -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>

+ 20
- 0
tests/publishers/fixtures/cobertura001.yaml View File

@@ -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

+ 10
- 0
tests/publishers/fixtures/copy-to-master001.xml View File

@@ -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>

+ 7
- 0
tests/publishers/fixtures/copy-to-master001.yaml View File

@@ -0,0 +1,7 @@
1
+publishers:
2
+  - copy-to-master:
3
+      includes:
4
+        - file1
5
+        - file2*.txt
6
+      excludes:
7
+        - file2bad.txt

+ 58
- 0
tests/publishers/fixtures/coverage001.xml View File

@@ -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>

+ 2
- 0
tests/publishers/fixtures/coverage001.yaml View File

@@ -0,0 +1,2 @@
1
+publishers:
2
+  - coverage

+ 34
- 0
tests/publishers/fixtures/cppcheck001.xml View File

@@ -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>

+ 21
- 0
tests/publishers/fixtures/cppcheck001.yaml View File

@@ -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

+ 9
- 0
tests/publishers/fixtures/fingerprint001.xml View File

@@ -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>

+ 4
- 0
tests/publishers/fixtures/fingerprint001.yaml View File

@@ -0,0 +1,4 @@
1
+publishers:
2
+  - fingerprint:
3
+      files: builddir/test*.xml
4
+      record-artifacts: false

+ 8
- 0
tests/publishers/fixtures/groovy-postbuild001.xml View File

@@ -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>

+ 2
- 0
tests/publishers/fixtures/groovy-postbuild001.yaml View File

@@ -0,0 +1,2 @@
1
+publishers:
2
+  - groovy-postbuild: "manager.buildFailure()"

+ 17
- 0
tests/publishers/fixtures/html-publisher001.xml View File

@@ -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>

+ 7
- 0
tests/publishers/fixtures/html-publisher001.yaml View File

@@ -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

+ 24
- 0
tests/publishers/fixtures/jabber001.xml View File

@@ -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>

+ 9
- 0
tests/publishers/fixtures/jabber001.yaml View File

@@ -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

+ 17
- 0
tests/publishers/fixtures/jacoco001.xml View File

@@ -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>

+ 13
- 0
tests/publishers/fixtures/jacoco001.yaml View File

@@ -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

+ 6
- 0
tests/publishers/fixtures/jira001.xml View File

@@ -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>

+ 2
- 0
tests/publishers/fixtures/jira001.yaml View File

@@ -0,0 +1,2 @@
1
+publishers:
2
+  - jira

+ 8
- 0
tests/publishers/fixtures/join-trigger001.xml View File

@@ -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>

+ 5
- 0
tests/publishers/fixtures/join-trigger001.yaml View File

@@ -0,0 +1,5 @@
1
+publishers:
2
+  - join-trigger:
3
+      projects:
4
+        - project-one
5
+        - project-two

+ 10
- 0
tests/publishers/fixtures/logparser001.xml View File

@@ -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>

+ 5
- 0
tests/publishers/fixtures/logparser001.yaml View File

@@ -0,0 +1,5 @@
1
+publishers:
2
+  - logparser:
3
+      parse-rules: "/path/to/parserules"
4
+      unstable-on-warning: true
5
+      fail-on-error: true

tests/publishers/fixtures/mavendeploy001.xml → tests/publishers/fixtures/maven-deploy001.xml View File

@@ -2,7 +2,8 @@
2 2
 <project>
3 3
   <publishers>
4 4
     <hudson.maven.RedeployPublisher>
5
-      <url>file:///path/to/repo</url>
5
+      <id>example</id>
6
+      <url>http://repo.example.com/maven2/</url>
6 7
       <uniqueVersion>true</uniqueVersion>
7 8
       <evenIfUnstable>false</evenIfUnstable>
8 9
     </hudson.maven.RedeployPublisher>

+ 6
- 0
tests/publishers/fixtures/maven-deploy001.yaml View File

@@ -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

+ 0
- 4
tests/publishers/fixtures/mavendeploy001.yaml View File

@@ -1,4 +0,0 @@
1
-publishers:
2
-  - maven-deploy:
3
-      url: file:///path/to/repo
4
-

+ 17
- 0
tests/publishers/fixtures/performance001.xml View File

@@ -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>

+ 7
- 0
tests/publishers/fixtures/performance001.yaml View File

@@ -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"

+ 17
- 0
tests/publishers/fixtures/performance002.xml View File

@@ -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>

+ 7
- 0
tests/publishers/fixtures/performance002.yaml View File

@@ -0,0 +1,7 @@
1
+publishers:
2
+  - performance:
3
+      failed-threshold: 85
4
+      unstable-threshold: -1
5
+      report:
6
+        - jmeter
7
+        - junit

+ 23
- 0
tests/publishers/fixtures/performance003.xml View File

@@ -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>

+ 9
- 0
tests/publishers/fixtures/performance003.yaml View File

@@ -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

+ 51
- 0
tests/publishers/fixtures/plot004.xml View File

@@ -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>

+ 30
- 0
tests/publishers/fixtures/plot004.yaml View File

@@ -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: '/*'

+ 29
- 0
tests/publishers/fixtures/post-tasks001.xml View File

@@ -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 &quot;Here goes the task script&quot;
24
+</script>
25
+        </hudson.plugins.postbuildtask.TaskProperties>
26
+      </tasks>
27
+    </hudson.plugins.postbuildtask.PostbuildTask>
28
+  </publishers>
29
+</project>

+ 13
- 0
tests/publishers/fixtures/post-tasks001.yaml View File

@@ -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"

+ 19
- 0
tests/publishers/fixtures/robot001.xml View File

@@ -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>

+ 13
- 0
tests/publishers/fixtures/robot001.yaml View File

@@ -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

+ 9
- 0
tests/publishers/fixtures/sloccount001.xml View File

@@ -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>

+ 4
- 0
tests/publishers/fixtures/sloccount001.yaml View File

@@ -0,0 +1,4 @@
1
+publishers:
2
+  - sloccount:
3
+      report-files: sloccount.sc
4
+      charset: latin-1

+ 17
- 0
tests/publishers/fixtures/sonar001.xml View File

@@ -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>

+ 11
- 0
tests/publishers/fixtures/sonar001.yaml View File

@@ -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

+ 14
- 0
tests/publishers/fixtures/tap001.xml View File

@@ -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>

+ 4
- 0
tests/publishers/fixtures/tap001.yaml View File

@@ -0,0 +1,4 @@
1
+publishers:
2
+  - tap:
3
+      results: puiparts.tap
4
+      todo-is-failure: false

+ 12
- 0
tests/publishers/fixtures/text-finder001.xml View File

@@ -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>

+ 7
- 0
tests/publishers/fixtures/text-finder001.yaml View File

@@ -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

+ 195
- 0
tests/publishers/fixtures/violations001.xml View File

@@ -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>

+ 7
- 0
tests/publishers/fixtures/violations001.yaml View File

@@ -0,0 +1,7 @@
1
+publishers:
2
+  - violations:
3
+      pep8:
4
+        min: 0
5
+        max: 1
6
+        unstable: 1
7
+        pattern: '**/pep8.txt'

+ 55
- 0
tests/publishers/fixtures/warnings001.xml View File

@@ -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>

+ 43
- 0
tests/publishers/fixtures/warnings001.yaml View File

@@ -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

+ 21
- 0
tests/publishers/fixtures/workspace-cleanup001.xml View File

@@ -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>

+ 7
- 0
tests/publishers/fixtures/workspace-cleanup001.yaml View File

@@ -0,0 +1,7 @@
1
+publishers:
2
+  - workspace-cleanup:
3
+      include:
4
+        - "*.zip"
5
+      clean-if:
6
+        - success: true
7
+        - not-built: false

+ 8
- 0
tests/publishers/fixtures/xml-summary001.xml View File

@@ -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>

+ 3
- 0
tests/publishers/fixtures/xml-summary001.yaml View File

@@ -0,0 +1,3 @@
1
+publishers:
2
+  - xml-summary:
3
+      files: '*_summary_report.xml'

Loading…
Cancel
Save