The following plugin provides functionality available through
Pipeline-compatible steps. Read more about how to integrate steps into your
Pipeline in the
Steps
section of the
Pipeline Syntax
page.
For a list of other such plugins, see the
Pipeline Steps Reference
page.
JaCoCo plugin
jacoco
: Record JaCoCo coverage report
Allows to configure various aspects of the JaCoCo code coverage report. The paths define where the various types of files can be found in the workspace, inclusions and exclusions allow to exclude certain class files. And the coverage thresholds allow to configure how much coverage is necessary to make the build green (if changing the build status is enabled).
buildOverBuild
(optional)
Check this to set the build status to failure if the delta coverage thresholds are violated. Delta coverage is the difference between coverage of last successful and current build.
changeBuildStatus
(optional)
Check this to set the build status to unstable if coverage thresholds are violated.
classPattern
(optional)
Path to the Java class directories that should be included in coverage reporting. Ant path wildcards are understood.
deltaBranchCoverage
(optional)
Change build status if coverage degrades. The build status degrades to unstable (or failed) if branch coverage decreases by more than this delta threshold compared to the previous build.
deltaClassCoverage
(optional)
Change build status if coverage degrades. The build status degrades to unstable (or failed) if class coverage decreases by more than this delta threshold compared to the previous build.
deltaComplexityCoverage
(optional)
Change build status if coverage degrades. The build status degrades to unstable (or failed) if complexity coverage decreases by more than this delta threshold compared to the previous build.
deltaInstructionCoverage
(optional)
Change build status if coverage degrades. The build status degrades to unstable (or failed) if instruction coverage decreases by more than this delta threshold compared to the previous build.
deltaLineCoverage
(optional)
Change build status if coverage degrades. The build status degrades to unstable (or failed) if line coverage decreases by more than this delta threshold compared to the previous build.
deltaMethodCoverage
(optional)
Change build status if coverage degrades. The build status degrades to unstable (or failed) if method coverage decreases by more than this delta threshold compared to the previous build.
exclusionPattern
(optional)
Path to the Java class files that should be excluded from coverage reporting. Ant path wildcards are understood.
execPattern
(optional)
Path to the exec files generated by JaCoCo. Ant path wildcards are understood.
inclusionPattern
(optional)
Path to the Java class files that should be included in coverage reporting. Ant path wildcards are understood.
maximumBranchCoverage
(optional)
Change build status based on coverage results.
- The build fails if the branch coverage is below
minimumBranchCoverage
- The build is unstable if the branch coverage is above
minimumBranchCoverage
and below maximumBranchCoverage
- The build succeeds if the branch coverage is above
maximumBranchCoverage
maximumClassCoverage
(optional)
Change build status based on coverage results.
- The build fails if the class coverage is below
minimumClassCoverage
- The build is unstable if the class coverage is above
minimumClassCoverage
and below maximumClassCoverage
- The build succeeds if the class coverage is above
maximumClassCoverage
maximumComplexityCoverage
(optional)
Change build status based on coverage results.
- The build fails if the complexity coverage is below
minimumComplexityCoverage
- The build is unstable if the complexity coverage is above
minimumComplexityCoverage
and below maximumComplexityCoverage
- The build succeeds if the complexity coverage is above
maximumComplexityCoverage
maximumInstructionCoverage
(optional)
Change build status based on coverage results.
- The build fails if the instruction coverage is below
minimumInstructionCoverage
- The build is unstable if the instruction coverage is above
minimumInstructionCoverage
and below maximumInstructionCoverage
- The build succeeds if the instruction coverage is above
maximumInstructionCoverage
maximumLineCoverage
(optional)
Change build status based on coverage results.
- The build fails if the line coverage is below
minimumLineCoverage
- The build is unstable if the line coverage is above
minimumLineCoverage
and below maximumLineCoverage
- The build succeeds if the line coverage is above
maximumLineCoverage
maximumMethodCoverage
(optional)
Change build status based on coverage results.
- The build fails if the method coverage is below
minimumMethodCoverage
- The build is unstable if the method coverage is above
minimumMethodCoverage
and below maximumMethodCoverage
- The build succeeds if the method coverage is above
maximumMethodCoverage
minimumBranchCoverage
(optional)
Change build status based on coverage results.
- The build fails if the branch coverage is below
minimumBranchCoverage
- The build is unstable if the branch coverage is above
minimumBranchCoverage
and below maximumBranchCoverage
- The build succeeds if the branch coverage is above
maximumBranchCoverage
minimumClassCoverage
(optional)
Change build status based on coverage results.
- The build fails if the class coverage is below
minimumClassCoverage
- The build is unstable if the class coverage is above
minimumClassCoverage
and below maximumClassCoverage
- The build succeeds if the class coverage is above
maximumClassCoverage
minimumComplexityCoverage
(optional)
Change build status based on coverage results.
- The build fails if the complexity coverage is below
minimumComplexityCoverage
- The build is unstable if the complexity coverage is above
minimumComplexityCoverage
and below maximumComplexityCoverage
- The build succeeds if the complexity coverage is above
maximumComplexityCoverage
minimumInstructionCoverage
(optional)
Change build status based on coverage results.
- The build fails if the instruction coverage is below
minimumInstructionCoverage
- The build is unstable if the instruction coverage is above
minimumInstructionCoverage
and below maximumInstructionCoverage
- The build succeeds if the instruction coverage is above
maximumInstructionCoverage
minimumLineCoverage
(optional)
Change build status based on coverage results.
- The build fails if the line coverage is below
minimumLineCoverage
- The build is unstable if the line coverage is above
minimumLineCoverage
and below maximumLineCoverage
- The build succeeds if the line coverage is above
maximumLineCoverage
minimumMethodCoverage
(optional)
Change build status based on coverage results.
- The build fails if the method coverage is below
minimumMethodCoverage
- The build is unstable if the method coverage is above
minimumMethodCoverage
and below maximumMethodCoverage
- The build succeeds if the method coverage is above
maximumMethodCoverage
runAlways
(optional)
Run coverage collection even if the build fails or is aborted.
skipCopyOfSrcFiles
(optional)
Check this to disable display of source files for each line coverage
sourceExclusionPattern
(optional)
Path to the Java source files that should be excluded from coverage reporting. Ant path wildcards are understood.
sourceInclusionPattern
(optional)
Path to the Java source files that should be included in coverage reporting. Ant path wildcards are understood.
sourcePattern
(optional)
Path to the Java source directories that should be included in coverage reporting. Ant path wildcards are understood.
Was this page helpful?
Please submit your feedback about this page through this
quick form.
Alternatively, if you don't wish to complete the quick form, you can simply
indicate if you found this page helpful?
See existing feedback here.