-
Notifications
You must be signed in to change notification settings - Fork 45
Publish results
Publishing the results of a build could be a number of different types of artifacts. The settings for collecting results are grouped under jenkins
> collect
in the YAML.
Currently, the existing supported results collected are:
-
artifacts
- Binary artifacts. -
cobertura
- cobertura code coverage results. -
html
- publish an HTML report. -
junit
- Java unit test reports (or junit-compatible XML).
There is a short and long format for publishing results. The following is example YAML of short format for publishing results.
jenkins:
collect:
artifacts: 'file file pattern'
junit: 'file pattern to JUnit XML'
cobertura: 'path to coverage.xml'
Short form example:
jenkins:
collect:
artifacts: 'build/libs/*.jar'
The short form assumes defaults from the long form YAML. The following is the long form example including defaults for each value when the short form is used.
jenkins:
collect:
artifacts:
path: 'build/libs/*.jar'
excludes: ''
allowEmptyArchive: false
caseSensitive: true
defaultExcludes: true
The options are documented in the Jenkins source code in the following places.
-
artifacts
path
. -
artifacts
excludes
. -
artifacts
allowEmptyArchive
. -
artifacts
caseSensitive
. -
artifacts
defaultExcludes
.
Short form example:
jenkins:
collect:
junit: 'build/test-results/*.xml'
Customize behavior using the long form. The following has defaults defined for the short form:
jenkins:
collect:
junit:
path: 'build/test-results/*.xml'
allowEmptyResults: false
healthScaleFactor: 1.0
keepLongStdio: false
The options are documented in the Jenkins source code in the following places.
Short form example:
jenkins:
collect:
cobertura: 'build/reports/cobertura/coverage.xml'
Customize behavior using the long form. The following has defaults defined for the short form:
jenkins:
collect:
cobertura:
path: 'build/reports/cobertura/coverage.xml'
autoUpdateHealth: false
autoUpdateStability: false
failNoReports: false
failUnhealthy: false
failUnstable: false
maxNumberOfBuilds: 0
onlyStable: false
sourceEncoding: 'ASCII'
zoomCoverageChart: false
methodCoverageTargets: '80, 0, 0'
lineCoverageTargets: '80, 0, 0'
conditionalCoverageTargets: '70, 0, 0'
The options are documented in the Jenkins source code cobertura plugin.
- Build overview
- Supported languages
- Supported build tools
- Publish results
- Additional topics:
- Quickstart
- Background information
- Knowledge checklist
- Required Jenkins Plugins
- Labels for Jenkins Agents
- Key security concepts
- Operationalize Jenkins
- High availability
- Disaster recovery
- Pipeline support
- Extending support