Update dependency_check plugin

- update docstring
- update test cases

Change-Id: I825950ea54977d5ccef7359535a14d67a374bbd8
This commit is contained in:
Dong Ma 2017-06-26 21:43:28 +08:00
parent de631d49d3
commit ee912cbf46
6 changed files with 93 additions and 18 deletions

@ -4499,10 +4499,16 @@ def dependency_check(registry, xml_parent, data):
build from the reference build.
(default false)
Example:
Minimal Example:
.. literalinclude::
/../../tests/publishers/fixtures/dependency-check001.yaml
/../../tests/publishers/fixtures/dependency-check-minimal.yaml
:language: yaml
Full Example:
.. literalinclude::
/../../tests/publishers/fixtures/dependency-check-full.yaml
:language: yaml
"""

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<project>
<publishers>
<org.jenkinsci.plugins.DependencyCheck.DependencyCheckPublisher>
<healthy>0</healthy>
<unHealthy>100</unHealthy>
<thresholdLimit>high</thresholdLimit>
<pluginName>[DEPENDENCYCHECK] </pluginName>
<defaultEncoding>utf-8</defaultEncoding>
<canRunOnFailed>true</canRunOnFailed>
<useStableBuildAsReference>true</useStableBuildAsReference>
<usePreviousBuildAsReference>true</usePreviousBuildAsReference>
<useDeltaValues>true</useDeltaValues>
<thresholds>
<unstableTotalAll>90</unstableTotalAll>
<unstableTotalHigh>80</unstableTotalHigh>
<unstableTotalNormal>70</unstableTotalNormal>
<unstableTotalLow>60</unstableTotalLow>
<unstableNewAll>50</unstableNewAll>
<unstableNewHigh>40</unstableNewHigh>
<unstableNewNormal>30</unstableNewNormal>
<unstableNewLow>20</unstableNewLow>
<failedTotalAll>91</failedTotalAll>
<failedTotalHigh>81</failedTotalHigh>
<failedTotalNormal>71</failedTotalNormal>
<failedTotalLow>61</failedTotalLow>
<failedNewAll>51</failedNewAll>
<failedNewHigh>41</failedNewHigh>
<failedNewNormal>31</failedNewNormal>
<failedNewLow>21</failedNewLow>
</thresholds>
<shouldDetectModules>true</shouldDetectModules>
<dontComputeNew>false</dontComputeNew>
<doNotResolveRelativePaths>true</doNotResolveRelativePaths>
<pattern>**/dependency-check-report.xml</pattern>
</org.jenkinsci.plugins.DependencyCheck.DependencyCheckPublisher>
</publishers>
</project>

@ -0,0 +1,33 @@
publishers:
- dependency-check:
pattern: '**/dependency-check-report.xml'
can-run-on-failed: true
should-detect-modules: true
healthy: 0
unhealthy: 100
health-threshold: 'high'
thresholds:
unstable:
total-all: 90
total-high: 80
total-normal: 70
total-low: 60
new-all: 50
new-high: 40
new-normal: 30
new-low: 20
failed:
total-all: 91
total-high: 81
total-normal: 71
total-low: 61
new-all: 51
new-high: 41
new-normal: 31
new-low: 21
default-encoding: 'utf-8'
do-not-resolve-relative-paths: true
dont-compute-new: false
use-previous-build-as-reference: true
use-stable-build-as-reference: true
use-delta-values: true

@ -8,7 +8,7 @@
<pluginName>[DEPENDENCYCHECK] </pluginName>
<defaultEncoding/>
<canRunOnFailed>false</canRunOnFailed>
<useStableBuildAsReference>true</useStableBuildAsReference>
<useStableBuildAsReference>false</useStableBuildAsReference>
<usePreviousBuildAsReference>false</usePreviousBuildAsReference>
<useDeltaValues>false</useDeltaValues>
<thresholds>
@ -24,7 +24,7 @@
<shouldDetectModules>false</shouldDetectModules>
<dontComputeNew>true</dontComputeNew>
<doNotResolveRelativePaths>false</doNotResolveRelativePaths>
<pattern>**/dependency-check-report.xml</pattern>
<pattern/>
</org.jenkinsci.plugins.DependencyCheck.DependencyCheckPublisher>
</publishers>
</project>

@ -0,0 +1,2 @@
publishers:
- dependency-check

@ -1,4 +0,0 @@
publishers:
- dependency-check:
pattern: '**/dependency-check-report.xml'
use-stable-build-as-reference: true