Skip to content

Publish results

Sam Gleske edited this page Apr 11, 2018 · 11 revisions

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.
  • junit - Java unit test reports (or junit-compatible XML).
  • cobertura - cobertura code coverage results.

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'

Collect artifacts

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

Clone this wiki locally