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.

Code Coverage API Plugin

publishCoverage: Publish Coverage Report

  • adapters (optional)
      Array / List of Nested Choice of Objects
    • antPath
      • path
        • Type: String
    • dListingAdapter
      • path
        • Type: String
      • mergeToOneReport (optional)
        • Type: boolean
      • thresholds (optional)
          Array / List of Nested Object
        • thresholdTarget
          • Type: String
        • failUnhealthy (optional)
          • Type: boolean
        • unhealthyThreshold (optional)
          • Type: float
        • unstableThreshold (optional)
          • Type: float
    • istanbulCoberturaAdapter
      • path
        • Type: String
      • mergeToOneReport (optional)
        • Type: boolean
      • thresholds (optional)
          Array / List of Nested Object
        • thresholdTarget
          • Type: String
        • failUnhealthy (optional)
          • Type: boolean
        • unhealthyThreshold (optional)
          • Type: float
        • unstableThreshold (optional)
          • Type: float
    • jacocoAdapter
      • path
        • Type: String
      • mergeToOneReport (optional)
        • Type: boolean
      • thresholds (optional)
          Array / List of Nested Object
        • thresholdTarget
          • Type: String
        • failUnhealthy (optional)
          • Type: boolean
        • unhealthyThreshold (optional)
          • Type: float
        • unstableThreshold (optional)
          • Type: float
    • llvmAdapter
      • path
        • Type: String
      • mergeToOneReport (optional)
        • Type: boolean
      • thresholds (optional)
          Array / List of Nested Object
        • thresholdTarget
          • Type: String
        • failUnhealthy (optional)
          • Type: boolean
        • unhealthyThreshold (optional)
          • Type: float
        • unstableThreshold (optional)
          • Type: float
    • opencoverAdapter
      • path
        • Type: String
      • mergeToOneReport (optional)
        • Type: boolean
      • thresholds (optional)
          Array / List of Nested Object
        • thresholdTarget
          • Type: String
        • failUnhealthy (optional)
          • Type: boolean
        • unhealthyThreshold (optional)
          • Type: float
        • unstableThreshold (optional)
          • Type: float
    • sonarGenericCoverageAdapter
      • path
        • Type: String
      • mergeToOneReport (optional)
        • Type: boolean
      • thresholds (optional)
          Array / List of Nested Object
        • thresholdTarget
          • Type: String
        • failUnhealthy (optional)
          • Type: boolean
        • unhealthyThreshold (optional)
          • Type: float
        • unstableThreshold (optional)
          • Type: float
    • coberturaAdapter
      • path
        • Type: String
      • mergeToOneReport (optional)
        • Type: boolean
      • thresholds (optional)
          Array / List of Nested Object
        • thresholdTarget
          • Type: String
        • failUnhealthy (optional)
          • Type: boolean
        • unhealthyThreshold (optional)
          • Type: float
        • unstableThreshold (optional)
          • Type: float
    • cobertura
      • path
        • Type: String
      • mergeToOneReport (optional)
        • Type: boolean
      • thresholds (optional)
          Array / List of Nested Object
        • thresholdTarget
          • Type: String
        • failUnhealthy (optional)
          • Type: boolean
        • unhealthyThreshold (optional)
          • Type: float
        • unstableThreshold (optional)
          • Type: float
  • applyThresholdRecursively (optional)
    By default, this plugins will only apply threshold at report level. If this option is set to true, it will apply threshold to all levels. For example, if this option is true, and if you have specified a `Line` threshold, this plugin will check all modules, directories, files...
    • Type: boolean
  • calculateDiffForChangeRequests (optional)
    If it is a change request build, calculate code coverage diff with a target branch build
    • Type: boolean
  • failBuildIfCoverageDecreasedInChangeRequest (optional)
    Fail the build in case if code coverage decreased in comparison with the target branch
    • Type: boolean
  • failNoReports (optional)
    Fail the build if no coverage reports found.
    • Type: boolean
  • failUnhealthy (optional)
    Fail the build if coverage is lower than healthy threshold.
    • Type: boolean
  • failUnstable (optional)
    Fail the build if coverage is lower than stable threshold.
    • Type: boolean
  • globalThresholds (optional)
      Array / List of Nested Object
    • thresholdTarget
      • Type: String
    • failUnhealthy (optional)
      • Type: boolean
    • unhealthyThreshold (optional)
      • Type: float
    • unstableThreshold (optional)
      • Type: float
  • scm (optional)
    • Type: String
  • skipPublishingChecks (optional)
    If unchecked, the plugin will automatically publish the coverage to corresponding SCM platforms. For example, if you are using this feature for a GitHub organization project, the coverage will be published to GitHub through the Checks API.
    • Type: boolean
  • sourceCodeEncoding (optional)
    In order to correctly show all your affected source code files in the detail views, the plugin must open these files with the correct character encoding (UTF-8, ISO-8859-1, etc.). If you leave this field empty then the default encoding of the platform will be used. This might work but is not recommended.
    • Type: String
  • sourceDirectories (optional)
    Since the plugin also reads the affected source code files it needs to copy these files from the agent to the controller. If these files are not part of the workspace (or checked out into a sub folder of the workspace) they are not automatically found. So you can add one or more source code directories where the plugin tries to find these files. Note, that due to security restrictions additional paths outside the workspace need to be registered in Jenkins system configuration before they can be used here.
      Array / List of Nested Object
    • path
      This plugin copies source code files to Jenkins' build folder so that these files can be rendered in the user interface together with the plugin results. If these files are referenced with relative paths then they cannot be found by the plugin. In these cases you need to specify one or more relative paths within the workspace where the plugin can locate them. Alternatively, you can also specify absolute paths if the source code files are stored outside the workspace (in a directory on the agent). All absolute paths must be additionally approved by an administrator in Jenkins' global configuration page.
      • Type: String
  • sourceFileResolver (optional)
      Nested Object
    • level
      • Values: NEVER_STORE, STORE_LAST_BUILD, STORE_ALL_BUILD
  • tag (optional)
    • Type: String

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.