Publishers

Publishers define actions that the Jenkins job should perform after the build is complete.

Component: publishers
Macro:publisher
Entry Point:jenkins_jobs.publishers
aggregate-flow-tests

Aggregate downstream test results in a Build Flow job. Requires the Jenkins Build Flow Test Aggregator Plugin.

Parameters:show-test-results-trend (bool) – whether to show test results trend graph (default true)

Example:

publishers:
  - aggregate-flow-tests:
      show-test-results-trend: false
aggregate-tests

Aggregate downstream test results

Parameters:include-failed-builds (bool) – whether to include failed builds (default false)

Example:

publishers:
  - aggregate-tests:
      include-failed-builds: true
allure

Publish Allure report for the build. Requires the Jenkins Allure Plugin.

Parameters:
  • jdk (str) – String identifier for a JDK installation in Jenkins
  • commandline (str) – String identifier for a Allure-commandline tool installation
  • report-build-policy (str) – String identifier for a report build policy enum. Possible values: ‘ALWAYS’, ‘UNSTABLE’, ‘UNSUCCESSFUL’. (By default is ‘ALWAYS’)
  • include-properties (bool) – Flag to include specified properties
  • results-paths (list) – List of results directories
  • properties (list) – List of key:value property pairs

Minimal Example:

publishers:
  - allure:
      results-paths:
       - path: 'build/allure-results'

Full Example:

publishers:
  - allure:
      results-paths:
       - path: 'build/allure-results1'
       - path: 'build/allure-results2'
      properties:
       - key: 'allure.link.issue.pattern'
         value: 'http://test.tms/{}'
      jdk: openjdk1.8
      commandline: allure2
      report-build-policy: UNSTABLE
      include-properties: true
archive

Archive build artifacts

Parameters:
  • artifacts (str) – path specifier for artifacts to archive
  • excludes (str) – path specifier for artifacts to exclude (optional)
  • latest-only (bool) – only keep the artifacts from the latest successful build
  • allow-empty (bool) – pass the build if no artifacts are found (default false)
  • only-if-success (bool) – archive artifacts only if build is successful (default false)
  • fingerprint (bool) – fingerprint all archived artifacts (default false)
  • default-excludes (bool) – This option allows you to enable or disable the default Ant exclusions. (default true)
  • case-sensitive (bool) – Treat include and exclude patterns as case sensitive. (default true)

Example:

publishers:
  - archive:
      artifacts: '*.tar.gz'
      allow-empty: 'true'
      fingerprint: true
      default-excludes: false
artifact-deployer

This plugin makes it possible to copy artifacts to remote locations.

Requires the Jenkins ArtifactDeployer Plugin.

Parameters:
  • entries (list) –
    entries:
    • files (str) - files to deploy
    • basedir (str) - the dir from files are deployed
    • excludes (str) - the mask to exclude files
    • remote (str) - a remote output directory
    • flatten (bool) - ignore the source directory structure (default false)
    • delete-remote (bool) - clean-up remote directory before deployment (default false)
    • delete-remote-artifacts (bool) - delete remote artifacts when the build is deleted (default false)
    • fail-no-files (bool) - fail build if there are no files (default false)
    • groovy-script (str) - execute a Groovy script before a build is deleted
  • deploy-if-fail (bool) – Deploy if the build is failed (default false)

Example:

publishers:
  - artifact-deployer:
      entries:
        - files: '*.tar.gz'
          basedir: '/opt/data'
          excludes: '*tmp*'
          remote: '/home/test/'
          flatten: true
          delete-remote: true
          delete-remote-artifacts: true
          fail-no-files: true
          groovy-script: 'print 123'
      deploy-if-fail: true
artifactory

Uses/requires the Artifactory plugin to deploy artifacts to Artifactory Server.

Requires the Jenkins Artifactory Plugin.

Parameters:
  • url (str) – Artifactory server url (default ‘’)
  • name (str) – Artifactory user with permissions use for connected to the selected Artifactory Server (default ‘’)
  • release-repo-key (str) – Release repository name (default ‘’)
  • snapshot-repo-key (str) – Snapshots repository name (default ‘’)
  • publish-build-info (bool) – Push build metadata with artifacts (default false)
  • discard-old-builds (bool) – Remove older build info from Artifactory (default false)
  • discard-build-artifacts (bool) – Remove older build artifacts from Artifactory (default false)
  • even-if-unstable (bool) – Deploy artifacts even when the build is unstable (default false)
  • run-checks (bool) – Run automatic license scanning check after the build is complete (default false)
  • include-publish-artifacts (bool) – Include the build’s published module artifacts in the license violation checks if they are also used as dependencies for other modules in this build (default false)
  • pass-identified-downstream (bool) – When true, a build parameter named ARTIFACTORY_BUILD_ROOT with a value of ${JOB_NAME}-${BUILD_NUMBER} will be sent to downstream builds (default false)
  • license-auto-discovery (bool) – Tells Artifactory not to try and automatically analyze and tag the build’s dependencies with license information upon deployment (default true)
  • enable-issue-tracker-integration (bool) – When the Jenkins JIRA plugin is enabled, synchronize information about JIRA issues to Artifactory and attach issue information to build artifacts (default false)
  • aggregate-build-issues (bool) – When the Jenkins JIRA plugin is enabled, include all issues from previous builds up to the latest build status defined in “Aggregation Build Status” (default false)
  • allow-promotion-of-non-staged-builds (bool) – The build promotion operation will be available to all successful builds instead of only staged ones (default false)
  • filter-excluded-artifacts-from-build (bool) – Add the excluded files to the excludedArtifacts list and remove them from the artifacts list in the build info (default false)
  • scopes (str) – A list of dependency scopes/configurations to run license violation checks on. If left empty all dependencies from all scopes will be checked (default ‘’)
  • violation-recipients (str) – Recipients that need to be notified of license violations in the build info (default ‘’)
  • matrix-params (list) – Semicolon-separated list of properties to attach to all deployed artifacts in addition to the default ones: build.name, build.number, and vcs.revision (default [])
  • black-duck-app-name (str) – The existing Black Duck Code Center application name (default ‘’)
  • black-duck-app-version (str) – The existing Black Duck Code Center application version (default ‘’)
  • black-duck-report-recipients (str) – Recipients that will be emailed a report after the automatic Black Duck Code Center compliance checks finished (default ‘’)
  • black-duck-scopes (str) – A list of dependency scopes/configurations to run Black Duck Code Center compliance checks on. If left empty all dependencies from all scopes will be checked (default ‘’)
  • black-duck-run-checks (bool) – Automatic Black Duck Code Center compliance checks will occur after the build completes (default false)
  • black-duck-include-published-artifacts (bool) – Include the build’s published module artifacts in the license violation checks if they are also used as dependencies for other modules in this build (default false)
  • auto-create-missing-component-requests (bool) – Auto create missing components in Black Duck Code Center application after the build is completed and deployed in Artifactory (default true)
  • auto-discard-stale-component-requests (bool) – Auto discard stale components in Black Duck Code Center application after the build is completed and deployed in Artifactory (default true)
  • deploy-artifacts (bool) – Push artifacts to the Artifactory Server. Use deployment-include-patterns and deployment-exclude-patterns to filter deploy artifacts. (default true)
  • deployment-include-patterns (list) – New line or comma separated mappings of build artifacts to published artifacts. Supports Ant-style wildcards mapping to target directories. E.g.: /.zip=>dir (default [])
  • deployment-exclude-patterns (list) – New line or comma separated patterns for excluding artifacts from deployment to Artifactory (default [])
  • env-vars-include (bool) – Include all environment variables accessible by the build process. Jenkins-specific env variables are always included. Use env-vars-include-patterns and env-vars-exclude-patterns to filter variables to publish, (default false)
  • env-vars-include-patterns (list) – Comma or space-separated list of environment variables that will be included as part of the published build info. Environment variables may contain the * and the ? wildcards (default [])
  • env-vars-exclude-patterns (list) – Comma or space-separated list of environment variables that will be excluded from the published build info (default [])

Example:

publishers:
  - artifactory:
      url: http://artifactory.example.net/artifactory
      name: 'test'
      release-repo-key: libs-release-local
      snapshot-repo-key: libs-snapshot-local
publishers:
  - artifactory:
      url: http://artifactory.example.net/artifactory
      name: 'test'
      release-repo-key: libs-release-local
      snapshot-repo-key: libs-snapshot-local
      publish-build-info: true
      discard-old-builds: true
      discard-build-artifacts: true
      even-if-unstable: true
      run-checks: true
      include-publish-artifacts: true
      pass-identified-downstream: true
      license-auto-discovery: true
      aggregate-build-issues: true
      allow-promotion-of-non-staged-builds: true
      filter-excluded-artifacts-from-build: true
      violation-recipients: myfake@email.com
      matrix-params: []
      black-duck-app-name: myapp
      black-duck-app-version: '1.0'
      black-duck-report-recipients: myfake@email.com
      black-duck-scopes: []
      black-duck-run-checks: true
      black-duck-include-published-artifacts: true
      auto-create-missing-component-requests: false
      auto-discard-stale-component-requests: false
      deploy-artifacts: true
      deployment-include-patterns: []
      deployment-exclude-patterns: []
      env-vars-include: true
      env-vars-include-patterns: []
      env-vars-exclude-patterns: []
blame-upstream

Notify upstream committers when build fails Requires the Jenkins Blame upstream committers Plugin.

Example:

publishers:
  - blame-upstream
build-publisher

This plugin allows records from one Jenkins to be published on another Jenkins.

Requires the Jenkins Build Publisher Plugin.

Parameters:
  • publish-unstable-builds (bool) – publish unstable builds (default true)
  • publish-failed-builds (bool) – publish failed builds (default true)
  • days-to-keep (int) – days to keep when publishing results (optional)
  • num-to-keep (int) – number of jobs to keep in the published results (optional)

Minimal Example:

publishers:
  - build-publisher

Full Example:

publishers:
  - build-publisher:
      publish-unstable-builds: false
      publish-failed-builds: false
      days-to-keep: -1
      num-to-keep: 100
campfire

Send build notifications to Campfire rooms. Requires the Jenkins Campfire Plugin.

Campfire notifications global default values must be configured for the Jenkins instance. Default values will be used if no specific values are specified for each job, so all config params are optional.

Parameters:
  • subdomain (str) – override the default campfire subdomain
  • token (str) – override the default API token
  • ssl (bool) – override the default ‘use SSL’
  • room (str) – override the default room name

Example:

publishers:
    - campfire:
        subdomain: 'sub'
        ssl: true
        token: 'TOKEN'
        room: 'room'
checkstyle

Publish trend reports with Checkstyle. Requires the Jenkins Checkstyle Plugin.

The checkstyle component accepts a dictionary with the following values:

Parameters:
  • pattern (str) – Report filename pattern (default ‘’)
  • can-run-on-failed (bool) – Also runs for failed builds, instead of just stable or unstable builds (default false)
  • should-detect-modules (bool) – Determines if Ant or Maven modules should be detected for all files that contain warnings (default false)
  • healthy (int) – Sunny threshold (default ‘’)
  • unhealthy (int) – Stormy threshold (default ‘’)
  • health-threshold (str) – Threshold priority for health status (‘low’, ‘normal’ or ‘high’) (default ‘low’)
  • thresholds (dict) –

    Mark build as failed or unstable if the number of errors exceeds a threshold. (optional)

    thresholds:
    • unstable (dict)
      unstable:
      • total-all (int)
      • total-high (int)
      • total-normal (int)
      • total-low (int)
      • new-all (int)
      • new-high (int)
      • new-normal (int)
      • new-low (int)
    • failed (dict)
      failed:
      • total-all (int)
      • total-high (int)
      • total-normal (int)
      • total-low (int)
      • new-all (int)
      • new-high (int)
      • new-normal (int)
      • new-low (int)
  • default-encoding (str) – Encoding for parsing or showing files (default ‘’)
  • do-not-resolve-relative-paths (bool) – (default false)
  • dont-compute-new (bool) – If set to false, computes new warnings based on the reference build (default true)
  • use-previous-build-as-reference (bool) – determines whether to always use the previous build as the reference build (default false)
  • use-stable-build-as-reference (bool) – The number of new warnings will be calculated based on the last stable build, allowing reverts of unstable builds where the number of warnings was decreased. (default false)
  • use-delta-values (bool) – If set then the number of new warnings is calculated by subtracting the total number of warnings of the current build from the reference build. (default false)

Example:

publishers:
 - checkstyle:
    pattern: '**/checkstyle-result.xml'
    healthy: 0
    unhealthy: 100
    health-threshold: 'high'
    thresholds:
        unstable:
            total-high: 10
        failed:
            total-high: 1

Full example:

publishers:
 - checkstyle:
    pattern: '**/checkstyle-result.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-stable-build-as-reference: true
    use-delta-values: true
chuck-norris

Displays a picture of Chuck Norris (instead of Jenkins the butler) and a random Chuck Norris ‘The Programmer’ fact on each build page. Requires the Jenkins ChuckNorris Plugin.

Example:

publishers:
  - chuck-norris
cifs

Upload files via CIFS. Requires the Jenkins Publish over CIFS Plugin.

Parameters:
  • site (str) – name of the cifs site/share (required)
  • target (str) – destination directory (required)
  • target-is-date-format (bool) – whether target is a date format. If true, raw text should be quoted (default false)
  • clean-remote (bool) – should the remote directory be deleted before transferring files (default false)
  • source (str) – source path specifier (required)
  • excludes (str) – excluded file pattern (default ‘’)
  • remove-prefix (str) – prefix to remove from uploaded file paths (default ‘’)
  • fail-on-error (bool) – fail the build if an error occurs (default false).
  • flatten (bool) – only create files on the server, don’t create directories (default false).
  • verbose (bool) – adds lots of detail useful for debug to the console but generally should be left off (default false)
  • retries (int) – the number of times to retry this server in the event of failure (optional)
  • retry-delay (int) – the time to wait, in milliseconds, before attempting another transfer (default 10000)

Minimal Example:

publishers:
  - cifs:
      site: 'cifs.share'
      target: 'dest/dir'
      source: 'base/source/dir/**'

Full Example:

publishers:
  - cifs:
      site: 'cifs.share'
      target: "'dest/dir/'yyyyMMddHHmmss"
      target-is-date-format: true
      clean-remote: true
      source: 'base/source/dir/**'
      excludes: '**/*.excludedfiletype'
      remove-prefix: 'base/source/dir'
      fail-on-error: true
      flatten: true
      verbose: true
      retries: 99
      retry-delay: 12345
cigame

This plugin introduces a game where users get points for improving the builds. Requires the Jenkins The Continuous Integration Game plugin.

Example:

publishers:
  - cigame
claim-build

Claim build failures Requires the Jenkins Claim Plugin.

Example:

publishers:
  - claim-build
clamav

Check files with ClamAV, an open source antivirus engine. Requires the Jenkins ClamAV Plugin.

Parameters:
  • includes (str) – Comma separated list of files that should be scanned. Must be set for ClamAV to check for artifacts. (default ‘’)
  • excludes (str) – Comma separated list of files that should be ignored (default ‘’)

Full Example:

publishers:
  - clamav:
      includes: '*.zip'
      excludes: 'foo.zip'

Minimal Example:

publishers:
  - clamav
clone-workspace

Archive the workspace from builds of one project and reuse them as the SCM source for another project. Requires the Jenkins Clone Workspace SCM Plugin.

Parameters:
  • workspace-glob (str) – Files to include in cloned workspace (default ‘’)
  • workspace-exclude-glob (str) – Files to exclude from cloned workspace
  • criteria (str) – Criteria for build to be archived. Can be ‘any’, ‘not failed’, or ‘successful’. (default ‘any’)
  • archive-method (str) – Choose the method to use for archiving the workspace. Can be ‘tar’ or ‘zip’. (default ‘tar’)
  • override-default-excludes (bool) – Override default ant excludes. (default false)

Minimal example:

publishers:
  - clone-workspace

Full example:

publishers:
  - clone-workspace:
      criteria: "Any"
      archive-method: "TAR"
      override-default-excludes: false
      workspace-glob: "**/*.zip"
      workspace-exclude-glob: "**/*.tgz"
cloudfoundry

Pushes a project to Cloud Foundry or a CF-based platform (e.g. Stackato) at the end of a build. Requires the Jenkins Cloud Foundry Plugin.

Parameters:
  • target (str) – The API endpoint of the platform you want to push to. This is the URL you use to access the platform, possibly with “.api” added. (required)
  • organization (str) – An org is a development account that an individual or multiple collaborators can own and use (required)
  • space (str) – Provide users with access to a shared location for application development, deployment, and maintenance (required)
  • credentials-id (str) – credentials-id of the user (required)
  • self-signed (bool) – Allow self-signed SSL certificates from the target (default false)
  • reset-app (bool) – Delete app before pushing app’s configurations (default false)
  • plugin-timeout (int) – The time in seconds before the Cloud Foundry plugin stops fetching logs and marks the build a failure (default 120)
  • create-services (list) –

    Create services automatically (default ‘’)

    create-services:
     
    • name (‘str’) – Service name (default ‘’)
    • type (‘str’) – Service type (default ‘’)
    • plan (‘str’) – Service plan (default ‘’)
    • reset-service (‘bool’) – Delete the service before creating
      the new one (default false)
  • value (str) – Select to read configuration from manifest file or to enter configuration in Jenkins (default ‘manifestFile’)
  • manifest-file (str) – Path to manifest file (default ‘manifest.yml’)
  • app-name (str) – The application’s name. Default to Jenkins build name. (default ‘’)
  • memory (int) – The application’s memory usage in MB (default 512)
  • host-name (str) – The hostname of the URI to access your application. Default to app-name (default ‘’)
  • instances (int) – Number of instances of your application on creation (default 1)
  • manifest-timeout (int) – The time in seconds before the health-manager gives up on starting the application (default 60)
  • no-route (bool) – No URI path will be created to access the application (default false)
  • app-path (str) – Path to application (default ‘’)
  • build-pack – If your application requires a custom buildpack, you can use this to specify its URL or name (default ‘’)
  • stack (str) – If your application requires a custom stack, you can use this to specify its name. (default ‘’)
  • command (str) – Set a custom start command for your application (default ‘’)
  • domain (str) – The domain of the URI to access your application (default ‘’)
  • environment-variables (list) –

    Inject environment variables

    environment-variables:
     
    • key (‘str’) – Environment variable key (default ‘’)
    • value (‘str’) – Environment variable value (default ‘’)
  • services-names (list) –

    Name of service instances

    services-names:
    • name (‘str’) – Name of the service instance (default ‘’)

Minimal example:

publishers:
  - cloudfoundry:
      target: https://api.stackato-rkw2.local
      organization: AS
      space: SimpleSpace
      credentials-id: j89jk213

Full example:

publishers:
  - cloudfoundry:
      target: https://api.stackato-rkw2.local
      organization: AS
      space: SimpleSpace
      credentials-id: 123
      self-signed: true
      reset-app: true
      timeout: 240
      create-services:
        - name: foo-name
          type: foo-type
          plan: plan1
          reset-service: true
        - name: bar-name
          type: bar-type
          plan: plan2
          reset-service: false
      value: jenkinsConfig
      manifest-file: manifest.yml
      app-name: cloudfoundry
      memory: 1024
      host-name: cloudfoundry
      instances: 5
      manifest-timeout: 120
      no-route: true
      app-path: foo
      build-pack: custom-buildpack
      stack: custom-stack
      command: start
      domain: cloudfoundry.domain
      environment-variables:
        - key: key
          value: value
        - key: key2
          value: value2
      services-names:
        - name: service-name
        - name: service-name2
cloudformation

Create cloudformation stacks before running a build and optionally delete them at the end. Requires the Jenkins AWS Cloudformation Plugin.

Parameters:
  • create-stacks (list) –

    List of stacks to create

    create-stacks attributes:
     
    • arg str name - The name of the stack (Required)
    • arg str description - Description of the stack (Optional)
    • arg str recipe - The cloudformation recipe file (Required)
    • arg list parameters - A list of key/value pairs, will be joined together into a comma separated string (Optional)
    • arg int timeout - Number of seconds to wait before giving up creating a stack (default 0)
    • arg str access-key - The Amazon API Access Key (Required)
    • arg str secret-key - The Amazon API Secret Key (Required)
    • arg int sleep - Number of seconds to wait before continuing to the next step (default 0)
    • arg array region - The region to run cloudformation in. (Required)
      region values:
      • us-east-1
      • us-west-1
      • us-west-2
      • eu-central-1
      • eu-west-1
      • ap-southeast-1
      • ap-southeast-2
      • ap-northeast-1
      • sa-east-1
  • delete-stacks (list) –

    List of stacks to delete

    delete-stacks attributes:
     
    • arg list name - The names of the stacks to delete (Required)
    • arg str access-key - The Amazon API Access Key (Required)
    • arg str secret-key - The Amazon API Secret Key (Required)
    • arg bool prefix - If selected the tear down process will look for the stack that Starts with the stack name with the oldest creation date and will delete it. (default false)
    • arg array region - The region to run cloudformation in. (Required)
      region values:
      • us-east-1
      • us-west-1
      • us-west-2
      • eu-central-1
      • eu-west-1
      • ap-southeast-1
      • ap-southeast-2
      • ap-northeast-1
      • sa-east-1

Example:

publishers:
  - cloudformation:
      create-stacks:
        - name: "foo"
          description: "Build the foo stack"
          recipe: "foo.json"
          parameters:
            - "Key1=foo"
            - "Key2=fuu"
          timeout: 3600
          access-key: "$AWS_ACCESS_KEY"
          secret-key: "$AWS_SECRET_KEY"
          region: us-west-2
          sleep: 5
        - name: "bar"
          description: "Build the bar stack"
          recipe: "bar.json"
          parameters:
            - "Key1=bar"
            - "Key2=baa"
          timeout: 3600
          access-key: "$AWS_ACCESS_KEY"
          secret-key: "$AWS_SECRET_KEY"
          region: us-west-1
      delete-stacks:
        - name: "foo"
          prefix: true
          region: us-west-2
          access-key: "$AWS_ACCESS_KEY"
          secret-key: "$AWS_SECRET_KEY"
        - name: "bar"
          region: us-west-1
          access-key: "$AWS_ACCESS_KEY"
          secret-key: "$AWS_SECRET_KEY"
cloverphp

Capture code coverage reports from PHPUnit Requires the Jenkins Clover PHP Plugin.

Your job definition should pass to PHPUnit the –coverage-clover option pointing to a file in the workspace (ex: clover-coverage.xml). The filename has to be filled in the xml-location field.

Parameters:
  • xml-location (str) – Path to the coverage XML file generated by PHPUnit using –coverage-clover. Relative to workspace. (required)
  • html (dict) –

    When existent, whether the plugin should generate a HTML report. Note that PHPUnit already provide a HTML report via its –cover-html option which can be set in your builder (optional):

    • dir (str): Directory where HTML report will be generated relative
      to workspace. (required in html dict).
    • archive (bool): Whether to archive HTML reports (default true).
  • metric-targets (list) –

    List of metric targets to reach, must be one of healthy, unhealthy and failing. Each metric target can takes two parameters:

    • method Target for method coverage
    • statement Target for statements coverage

    Whenever a metric target is not filled in, the Jenkins plugin can fill in defaults for you (as of v0.3.3 of the plugin the healthy target will have method: 70 and statement: 80 if both are left empty). Jenkins Job Builder will mimic that feature to ensure clean configuration diff.

Minimal example:

# Test for the defaults, only xml-location is required
publishers:
 - cloverphp:
       xml-location: 'build/clover.xml'

Full example:

# Exercise all options with non defaults values
publishers:
 - cloverphp:
       xml-location: 'build/clover.xml'
       html:
         dir: 'html'
         archive: false
       metric-targets:
        - healthy:
           method: 80
           statement: 90
        - unhealthy:
           method: 40
           statement: 50
        - failing:
           method: 10
           statement: 20
cobertura

Generate a cobertura coverage report. Requires the Jenkins Cobertura Coverage Plugin.

Parameters:
  • report-file (str) – This is a file name pattern that can be used to locate the cobertura xml report files (optional)
  • only-stable (bool) – Include only stable builds (default false)
  • fail-no-reports (bool) – fail builds if no coverage reports are found (default false)
  • fail-unhealthy (bool) – Unhealthy projects will be failed (default false)
  • fail-unstable (bool) – Unstable projects will be failed (default false)
  • health-auto-update (bool) – Auto update threshold for health on successful build (default false)
  • stability-auto-update (bool) – Auto update threshold for stability on successful build (default false)
  • zoom-coverage-chart (bool) – Zoom the coverage chart and crop area below the minimum and above the maximum coverage of the past reports (default false)
  • source-encoding (str) – Override the source encoding (default ASCII)
  • targets (dict) –
    targets:(packages, files, classes, method, line, conditional)
    • healthy (int): Healthy threshold (default 0)
    • unhealthy (int): Unhealthy threshold (default 0)
    • failing (int): Failing threshold (default 0)

Example:

publishers:
  - cobertura:
      report-file: "/reports/cobertura/coverage.xml"
      only-stable: "true"
      fail-no-reports: "true"
      fail-unhealthy: "true"
      fail-unstable: "true"
      health-auto-update: "true"
      stability-auto-update: "true"
      zoom-coverage-chart: "true"
      source-encoding: "Big5"
      targets:
        - files:
            healthy: 10
            unhealthy: 20
            failing: 30
        - method:
            healthy: 50
            unhealthy: 40
            failing: 30
codecover

This plugin allows you to capture code coverage report from CodeCover. Jenkins will generate the trend report of coverage. Requires the Jenkins CodeCover Plugin.

Parameters:
  • include (str) – Specify the path to the CodeCover HTML report file, relative to the workspace root (default ‘’)
  • min-statement (int) – Minimum statement threshold (default 0)
  • max-statement (int) – Maximum statement threshold (default 90)
  • min-branch (int) – Minimum branch threshold (default 0)
  • max-branch (int) – Maximum branch threshold (default 80)
  • min-loop (int) – Minimum loop threshold (default 0)
  • max-loop (int) – Maximum loop threshold (default 50)
  • min-condition (int) – Minimum condition threshold (default 0)
  • max-condition (int) – Maximum conditon threshold (default 50)

Minimal Example:

publishers:
  - codecover

Full Example:

publishers:
  - codecover:
      include: ./path/report.html
      min-statement: 1
      max-statement: 100
      min-branch: 2
      max-branch: 90
      min-loop: 3
      max-loop: 80
      min-condition: 4
      max-condition: 70
conditional-publisher

Conditionally execute some post-build steps. Requires the Jenkins Flexible Publish Plugin.

A Flexible Publish list of Conditional Actions is created in Jenkins.

Parameters:
  • condition-kind (str) – Condition kind that must be verified before the action is executed. Valid values and their additional attributes are described in the conditions table.
  • condition-aggregation (bool) – If true Matrix Aggregation will be enabled. (default false)
  • condition-aggregation-kind (str) – Condition Aggregation kind that must be verified before the action is executed. Valid values and their additional attributes are described in the conditions table.
  • on-evaluation-failure (str) – What should be the outcome of the build if the evaluation of the condition fails. Possible values are fail, mark-unstable, run-and-mark-unstable, run and dont-run. Default is fail.
  • action (list) – Action to run if the condition is verified. Item can be any publisher known by Jenkins Job Builder and supported by the Flexible Publish Plugin.
Condition kind Description
always Condition is always verified
never Condition is never verified
boolean-expression

Run the action if the expression expands to a representation of true

condition-expression:
 Expression to expand
current-status

Run the action if the current build status is within the configured range

condition-worst:
 Accepted values are SUCCESS, UNSTABLE, FAILURE, NOT_BUILD, ABORTED
condition-best:Accepted values are SUCCESS, UNSTABLE, FAILURE, NOT_BUILD, ABORTED
shell

Run the action if the shell command succeeds

condition-command:
 Shell command to execute
windows-shell

Similar to shell, except that commands will be executed by cmd, under Windows

condition-command:
 Command to execute
regexp

Run the action if a regular expression matches

condition-expression:
 Regular Expression
condition-searchtext:
 Text to match against the regular expression
file-exists

Run the action if a file exists

condition-filename:
 Check existence of this file
condition-basedir:
 If condition-filename is relative, it will be considered relative to either workspace, artifact-directory, or jenkins-home. Default is workspace.

Single Conditional Action Example:

publishers:
    - conditional-publisher:
        - condition-kind: current-status
          condition-worst: FAILURE
          condition-best: SUCCESS
          action:
              - archive:
                  artifacts: '**/**'
                  allow-empty: 'true'

Multiple Conditional Actions Example (includes example of multiple actions per condition which requires v0.13 or higher of the Flexible Publish plugin):

publishers:
    - conditional-publisher:
        - condition-kind: always
          on-evaluation-failure: run-and-mark-unstable
          action:
              - archive:
                  artifacts: '**/**'
                  allow-empty: 'true'
              - aggregate-tests:
                  include-failed-builds: true

Multiple Conditional Actions Example for pre-v0.13 versions

copy-to-master

Copy files to master from slave Requires the Jenkins Copy To Slave Plugin.

Parameters:
  • includes (list) – list of file patterns to copy
  • excludes (list) – list of file patterns to exclude
  • destination (string) – absolute path into which the files will be copied. If left blank they will be copied into the workspace of the current job (default ‘’)
  • run-after-result (bool) – If this is checked then copying files back to master will not run until the build result is finalized.(default true)

Example:

publishers:
  - copy-to-master:
      includes:
        - file1
        - file2*.txt
      excludes:
        - file2bad.txt
coverage

WARNING: The coverage function is deprecated. Instead, use the cobertura function to generate a cobertura coverage report. Requires the Jenkins Cobertura Coverage Plugin.

Example:

publishers:
  - coverage
cppcheck

Cppcheck result publisher Requires the Jenkins Cppcheck Plugin.

Parameters:
  • pattern (str) – File pattern for cppcheck xml report (required)
  • ignoreblankfiles (bool) – Ignore blank files (default false)
  • allow-no-report (bool) – Do not fail the build if the Cppcheck report is not found (default false)
  • thresholds (dict) –
    thresholds:Configure the build status and health. A build is considered as unstable or failure if the new or total number of issues exceeds the specified thresholds. The build health is also determined by thresholds. If the actual number of issues is between the provided thresholds, then the build health is interpolated.
    • unstable (str): Total number unstable threshold (default ‘’)
    • new-unstable (str): New number unstable threshold (default ‘’)
    • failure (str): Total number failure threshold (default ‘’)
    • new-failure (str): New number failure threshold (default ‘’)
    • healthy (str): Healthy threshold (default ‘’)
    • unhealthy (str): Unhealthy threshold (default ‘’)
  • severity (dict) –
    severity:Determines which severity of issues should be considered when evaluating the build status and health, default all true
    • error (bool): Severity error (default true)
    • warning (bool): Severity warning (default true)
    • style (bool): Severity style (default true)
    • performance (bool): Severity performance (default true)
    • information (bool): Severity information (default true)
    • nocategory (bool): Severity nocategory (default true)
    • portability (bool): Severity portability (default true)
  • graph (dict) –
    graph:Graph configuration
    • xysize (array): Chart width and height (default [500, 200])
    • num-builds-in-graph (int): Builds number in graph (default 0)
:arg dict display
display:which errors to display, default only sum
  • sum (bool): Display sum of all issues (default true)
  • error (bool): Display errors (default false)
  • warning (bool): Display warnings (default false)
  • style (bool): Display style (default false)
  • performance (bool): Display performance (default false)
  • information (bool): Display information (default false)
  • nocategory (bool): Display no category (default false)
  • portability (bool): Display portability (default false)

Minimal Example:

publishers:
  - cppcheck:
      pattern: "**/cppcheck.xml"

Full Example:

publishers:
  - cppcheck:
      pattern: "**/cppcheck.xml"
      # the rest is optional
      ignoreblankfiles: true
      allow-no-report: true
      # build status (new) error count thresholds
      thresholds:
        unstable: 5
        new-unstable: 5
        failure: 7
        new-failure: 3
        healthy: 5
        unhealthy: 10
        # severities which count towards the threshold, default all true
        severity:
          error: false
          warning: false
          style: false
          performance: false
          information: false
          nocategory: false
          portability: false
      graph:
        xysize: [600, 300]
        num-builds-in-graph: 10
        # which errors to display, default only sum
        display:
          sum: false
          error: true
          warning: true
          style: true
          performance: true
          information: true
          nocategory: true
          portability: true
cucumber-reports

This plugin creates pretty cucumber-jvm html reports on jenkins.

Requires the Jenkins cucumber reports.

Parameters:
  • json-reports-path (str) – The path relative to the workspace of the json reports generated by cucumber-jvm e.g. target - leave empty to scan the whole workspace (default ‘’)
  • file-include-pattern (str) – Include pattern (default ‘’)
  • file-exclude-pattern (str) – Exclude pattern (default ‘’)
  • plugin-url-path (str) – The path to the jenkins user content url e.g. http://host:port[/jenkins/]plugin - leave empty if jenkins url root is host:port (default ‘’)
  • skipped-fails (bool) – Skipped steps to cause the build to fail (default false)
  • pending-fails (bool) – Pending steps to cause the build to fail (default false)
  • undefined-fails (bool) – Undefined steps to cause the build to fail (default false)
  • missing-fails (bool) – Missing steps to cause the build to fail (default false)
  • no-flash-charts (bool) – Use javascript charts instead of flash charts (default false)
  • ignore-failed-tests (bool) – Entire build to fail when these tests fail (default false)
  • parallel-testing (bool) – Run same test in parallel for multiple devices (default false)
  • failed-steps-number (int) – Maximum number of failed steps above which build result is changed (default 0)
  • skipped-steps-number (int) – Maximum number of skipped steps above which build result is changed (default 0)
  • pending-steps-number (int) – Maximum number of pending steps above which build result is changed (default 0)
  • undefined-steps-number (int) – Maximum number of undefined steps above which build result is changed (default 0)
  • failed-scenarios-number (int) – Maximum number of failed scenarios above which build result is changed (default 0)
  • failed-features-number (int) – Maximum number of failed features above which build result is changed (default 0)
  • build-status (list) – Build result to which the build should be set when the report becomes failed or unstable (default ‘’)
  • trends-limit (int) – Number of past reports that should be presented. Zero means unlimited number of builds (default 0)
  • sorting-method (list) – Result sorting order (default ‘NATURAL’)

Full example:

publishers:
  - cucumber-reports:
      json-reports-path: path
      plugin-url-path: http://example.com/
      file-include-pattern: '**/*.json'
      file-exclude-pattern: badfile.txt
      skipped-fails: true
      pending-fails: true
      undefined-fails: true
      missing-fails: true
      no-flash-charts: true
      ignore-failed-tests: true
      parallel-testing: true
      failed-steps-number: 1
      skipped-steps-number: 2
      pending-steps-number: 3
      undefined-steps-number: 4
      failed-scenarios-number: 5
      failed-features-number: 6
      build-status: UNSTABLE
      trends-limit: 7
      sorting-method: ALPHABETICAL
      sorting-values:
        - key-value-pair:
            key: classification key 1
            value: classification value 1
        - key-value-pair:
            key: classification key 2
            value: classification value 2

Minimal Example:

publishers:
  - cucumber-reports
cucumber-testresult

Publish cucumber test results. Requires the Jenkins cucumber testresult.

Parameters:
  • results (str) – Results filename (required)
  • ignore-bad-steps (bool) – Ignore not existed step results (default false)

Minimal example:

publishers:
- cucumber-testresult:
    results: nosetests.xml

Full Example:

publishers:
- cucumber-testresult:
    results: nosetests.xml
    ignore-bad-steps: true
dependency-check

Dependency-Check is an open source utility that identifies project dependencies and checks if there are any known, publicly disclosed, vulnerabilities.

Requires the Jenkins OWASP Dependency-Check Plugin.

Parameters:
  • pattern (str) – Report filename pattern (optional)
  • can-run-on-failed (bool) – Also runs for failed builds, instead of just stable or unstable builds (default false)
  • should-detect-modules (bool) – Determines if Ant or Maven modules should be detected for all files that contain warnings (default false)
  • healthy (int) – Sunny threshold (optional)
  • unhealthy (int) – Stormy threshold (optional)
  • health-threshold (str) – Threshold priority for health status (‘low’, ‘normal’ or ‘high’, defaulted to ‘low’)
  • thresholds (dict) –

    Mark build as failed or unstable if the number of errors exceeds a threshold. (optional)

    thresholds:
    • unstable (dict)
      unstable:
      • total-all (int)
      • total-high (int)
      • total-normal (int)
      • total-low (int)
      • new-all (int)
      • new-high (int)
      • new-normal (int)
      • new-low (int)
    • failed (dict)
      failed:
      • total-all (int)
      • total-high (int)
      • total-normal (int)
      • total-low (int)
      • new-all (int)
      • new-high (int)
      • new-normal (int)
      • new-low (int)
  • default-encoding (str) – Encoding for parsing or showing files (optional)
  • do-not-resolve-relative-paths (bool) – (default false)
  • dont-compute-new (bool) – If set to false, computes new warnings based on the reference build (default true)
  • use-previous-build-as-reference (bool) – determines whether to always use the previous build as the reference build (default false)
  • use-stable-build-as-reference (bool) – The number of new warnings will be calculated based on the last stable build, allowing reverts of unstable builds where the number of warnings was decreased. (default false)
  • use-delta-values (bool) – If set then the number of new warnings is calculated by subtracting the total number of warnings of the current build from the reference build. (default false)

Minimal Example:

publishers:
  - dependency-check

Full Example:

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
description-setter

This plugin sets the description for each build, based upon a RegEx test of the build log file.

Requires the Jenkins Description Setter Plugin.

Parameters:
  • regexp (str) – A RegEx which is used to scan the build log file (default ‘’)
  • regexp-for-failed (str) – A RegEx which is used for failed builds (default ‘’)
  • description (str) – The description to set on the build (optional)
  • description-for-failed (str) – The description to set on the failed builds (optional)
  • set-for-matrix (bool) – Also set the description on a multi-configuration build (default false)

Minimal Example:

publishers:
  - description-setter

Full Example:

publishers:
  - description-setter:
      regexp: ".*(<a href=.*a>)"
      regexp-for-failed: ".*(<a href=.*a>)"
      description: "some description"
      description-for-failed: "another description"
      set-for-matrix: true
disable-failed-job

Automatically disable failed jobs.

Requires the Jenkins Disable Failed Job Plugin.

Parameters:
  • when-to-disable (str) –

    The condition to disable the job. (required) Possible values are

    • Only Failure
    • Failure and Unstable
    • Unstable
  • no-of-failures (int) – Number of consecutive failures to disable the job. (optional)

Example:

publishers:
  - disable-failed-job:
      when-to-disable: 'Failure and Unstable'
      no-of-failures: 3
display-upstream-changes

Display SCM changes of upstream jobs. Requires the Jenkins Display Upstream Changes Plugin.

Example:

publishers:
  - display-upstream-changes
docker-stop-container

This plugin allows removing stopped docker containers. It requires the Docker build step plugin.

Parameters:remove-stopped-containers (bool) – Boolean value to remove stopped docker containers (default False)

Minimal Example: .. literalinclude:: /../../tests/ publishers/fixtures/docker-stop-container-minimal.yaml

Full Example: .. literalinclude:: /../../tests/ publishers/fixtures/docker-stop-container-full.yaml

downstream-ext

Trigger multiple downstream jobs when a job is completed and condition is met.

Requires the Jenkins Downstream-Ext Plugin.

Parameters:
  • projects (list) – Projects to build (required)
  • condition (string) – comparison condition used for the criteria. One of ‘equal-or-over’, ‘equal-or-under’, ‘equal’ (default ‘equal-or-over’)
  • criteria (string) – Trigger downstream job if build results meets condition. One of ‘success’, ‘unstable’, ‘failure’ or ‘aborted’ (default ‘success’)
  • only-on-scm-change (bool) – Trigger only if downstream project has SCM changes (default false)
  • only-on-local-scm-change (bool) – Trigger only if current project has SCM changes (default false)

Example:

publishers:
  - downstream-ext:
      projects:
        - foo
        - bar
      only-on-scm-change: true
      criteria: unstable
      condition: equal
doxygen

This plugin parses the Doxygen descriptor (Doxyfile) and provides a link to the generated Doxygen documentation.

Requires the Jenkins Doxygen Plugin.

Parameters:
  • doxyfile (str) – The doxyfile path (required)
  • slave (str) – The node or label to pull the doxygen HTML files from (default ‘’)
  • keep-all (bool) – Retain doxygen generation for each successful build (default false)
  • folder (str) – Folder where you run doxygen (default ‘’)

Minimal Example:

publishers:
  - doxygen:
      doxyfile: "Doxyfile"

Full Example:

publishers:
  - doxygen:
      doxyfile: "Doxyfile"
      slave: "doxygen-slave"
      keep-all: true
      folder: "build"
dry

Publish trend reports with DRY. Requires the Jenkins DRY Plugin.

The DRY component accepts a dictionary with the following values:

Parameters:
  • pattern (str) – Report filename pattern (default ‘’)
  • can-run-on-failed (bool) – Also runs for failed builds, instead of just stable or unstable builds (default false)
  • should-detect-modules (bool) – Determines if Ant or Maven modules should be detected for all files that contain warnings (default false)
  • healthy (int) – Sunny threshold (default ‘’)
  • unhealthy (int) – Stormy threshold (default ‘’)
  • health-threshold (str) – Threshold priority for health status (‘low’, ‘normal’ or ‘high’, defaulted to ‘low’)
  • high-threshold (int) – Minimum number of duplicated lines for high priority warnings. (default 50)
  • normal-threshold (int) – Minimum number of duplicated lines for normal priority warnings. (default 25)
  • thresholds (dict) –

    Mark build as failed or unstable if the number of errors exceeds a threshold. (default ‘’)

    thresholds:
    • unstable (dict)
      unstable:
      • total-all (int)
      • total-high (int)
      • total-normal (int)
      • total-low (int)
      • new-all (int)
      • new-high (int)
      • new-normal (int)
      • new-low (int)
    • failed (dict)
      failed:
      • total-all (int)
      • total-high (int)
      • total-normal (int)
      • total-low (int)
      • new-all (int)
      • new-high (int)
      • new-normal (int)
      • new-low (int)
  • default-encoding (str) – Encoding for parsing or showing files (optional)
  • do-not-resolve-relative-paths (bool) – (default false)
  • dont-compute-new (bool) – If set to false, computes new warnings based on the reference build (default true)
  • use-previous-build-as-reference (bool) – determines whether to always use the previous build as the reference build (default false)
  • use-stable-build-as-reference (bool) – The number of new warnings will be calculated based on the last stable build, allowing reverts of unstable builds where the number of warnings was decreased. (default false)
  • use-delta-values (bool) – If set then the number of new warnings is calculated by subtracting the total number of warnings of the current build from the reference build. (default false)

Example:

publishers:
 - dry:
    pattern: '**/cpd-result.xml'
    healthy: 0
    unhealthy: 100
    health-threshold: 'high'
    high-threshold: 50
    normal-threshold: 25
    thresholds:
        unstable:
            total-high: 10
        failed:
            total-high: 1

Full example:

publishers:
 - dry:
    pattern: '**/cpd-result.xml'
    can-run-on-failed: true
    should-detect-modules: true
    healthy: 0
    unhealthy: 100
    health-threshold: 'high'
    high-threshold: 20
    normal-threshold: 10
    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-stable-build-as-reference: true
    use-delta-values: true
email

Email notifications on build failure. Requires the Jenkins Mailer Plugin.

Parameters:
  • recipients (str) – Space separated list of recipient email addresses (required)
  • notify-every-unstable-build (bool) – Send an email for every unstable build (default true)
  • send-to-individuals (bool) – Send an email to the individual who broke the build (default false)

Example:

publishers:
  - email:
      recipients: foo@example.com
publishers:
  - email:
      recipients: foo@example.com bar@example.com
      notify-every-unstable-build: false
      send-to-individuals: true
email-ext

Extend Jenkin’s built in email notification Requires the Jenkins Email-ext Plugin.

Parameters:
  • disable-publisher (bool) – Disable the publisher, while maintaining the settings. The usage model for this is when you want to test things out in the build, not send out e-mails during the testing. A message will be printed to the build log saying that the publisher is disabled. (default false)
  • recipients (str) – Comma separated list of recipient email addresses (default ‘$DEFAULT_RECIPIENTS’)
  • reply-to (str) – Comma separated list of email addresses that should be in the Reply-To header for this project (default ‘$DEFAULT_REPLYTO’)
  • content-type (str) – The content type of the emails sent. If not set, the Jenkins plugin uses the value set on the main configuration page. Possible values: ‘html’, ‘text’, ‘both-html-text’ or ‘default’ (default ‘default’)
  • subject (str) – Subject for the email, can include variables like ${BUILD_NUMBER} or even groovy or javascript code (default ‘$DEFAULT_SUBJECT’)
  • body (str) – Content for the body of the email, can include variables like ${BUILD_NUMBER}, but the real magic is using groovy or javascript to hook into the Jenkins API itself (default ‘$DEFAULT_CONTENT’)
  • attach-build-log (bool) – Include build log in the email (default false)
  • compress-log (bool) – Compress build log in the email (default false)
  • attachments (str) – pattern of files to include as attachment (default ‘’)
  • always (bool) – Send an email for every result (default false)
  • unstable (bool) – Send an email for an unstable result (default false)
  • first-failure (bool) – Send an email for just the first failure (default false)
  • first-unstable (bool) – Send an email for just the first unstable build (default false)
  • not-built (bool) – Send an email if not built (default false)
  • aborted (bool) – Send an email if the build is aborted (default false)
  • regression (bool) – Send an email if there is a regression (default false)
  • failure (bool) – Send an email if the build fails (default true)
  • second-failure (bool) – Send an email for the second failure (default false)
  • improvement (bool) – Send an email if the build improves (default false)
  • still-failing (bool) – Send an email if the build is still failing (default false)
  • success (bool) – Send an email for a successful build (default false)
  • fixed (bool) – Send an email if the build is fixed (default false)
  • fixed-unhealthy (bool) – Send an email if the build status changes from “Failure” or “Unstable” to “Success”. Intermediate “Aborted” builds are ignored. (default false)
  • still-unstable (bool) – Send an email if the build is still unstable (default false)
  • pre-build (bool) – Send an email before the build (default false)
  • trigger-script (str) – A Groovy script used to determine if an email should be sent.
  • presend-script (str) – A Groovy script executed prior sending the mail. (default ‘’)
  • postsend-script (str) – A Goovy script executed after sending the email. (default ‘’)
  • save-output (bool) – Save email content to workspace (default false)
  • matrix-trigger (str) –

    If using matrix projects, when to trigger

    matrix-trigger values:
     
    • both
    • only-parent
    • only-configurations
  • send-to (list) –

    list of recipients from the predefined groups

    send-to values:
    • developers (disabled by default)
    • requester (disabled by default)
    • culprits (disabled by default)
    • recipients (enabled by default)

Example:

publishers:
  - email-ext:
      recipients: foo@example.com, bar@example.com
      reply-to: foo@example.com
      content-type: html
      subject: Subject for Build ${BUILD_NUMBER}
      body: The build has finished
      attach-build-log: false
      compress-log: false
      attachments: "*/foo*.log"
      always: true
      unstable: true
      first-failure: true
      first-unstable: true
      not-built: true
      aborted: true
      regression: true
      failure: true
      second-failure: true
      improvement: true
      still-failing: true
      success: true
      fixed: true
      fixed-unhealthy: true
      still-unstable: true
      pre-build: true
      matrix-trigger: only-configurations
      presend-script: "cancel=true"
      postsend-script: "cancel=true"
      save-output: true
      send-to:
        - developers
        - requester
        - culprits
        - recipients
emotional-jenkins

Emotional Jenkins. This funny plugin changes the expression of Mr. Jenkins in the background when your builds fail.

Requires the Jenkins Emotional Jenkins Plugin.

Example:

publishers:
  - emotional-jenkins
findbugs

FindBugs reporting for builds

Requires the Jenkins FindBugs Plugin.

Parameters:
  • pattern (str) – specifies the generated raw FindBugs XML report files, such as **/findbugs.xml or **/findbugsXml.xml. (default ‘’)
  • rank-priority (bool) – Use rank as priority (default false)
  • include-files (str) – Comma separated list of files to include. (default ‘’)
  • exclude-files (str) – Comma separated list of files to exclude. (default ‘’)
  • can-run-on-failed (bool) – Weather or not to run plug-in on failed builds (default false)
  • should-detect-modules (bool) – Determines if Ant or Maven modules should be detected for all files that contain warnings. (default false)
  • healthy (int) – Sunny threshold (default ‘’)
  • unhealthy (int) – Stormy threshold (default ‘’)
  • health-threshold (str) – Threshold priority for health status (‘low’, ‘normal’ or ‘high’, defaulted to ‘low’)
  • dont-compute-new (bool) – If set to false, computes new warnings based on the reference build (default true)
  • use-delta-values (bool) – Use delta for new warnings. (default false)
  • use-previous-build-as-reference (bool) – If set then the number of new warnings will always be calculated based on the previous build. Otherwise the reference build. (default false)
  • use-stable-build-as-reference (bool) – The number of new warnings will be calculated based on the last stable build, allowing reverts of unstable builds where the number of warnings was decreased. (default false)
  • thresholds (dict) –
    thresholds:
    • unstable (dict)
      unstable:
      • total-all (int)
      • total-high (int)
      • total-normal (int)
      • total-low (int)
      • new-all (int)
      • new-high (int)
      • new-normal (int)
      • new-low (int)
    • failed (dict)
      failed:
      • total-all (int)
      • total-high (int)
      • total-normal (int)
      • total-low (int)
      • new-all (int)
      • new-high (int)
      • new-normal (int)
      • new-low (int)

Minimal Example:

publishers:
  - findbugs

Full Example:

publishers:
    - findbugs:
        pattern: '**/findbugs.xml'
        rank-priority: true
        include-files: 'f,d,e,.*'
        exclude-files: 'a,c,d,.*'
        can-run-on-failed: true
        should-detect-modules: true
        healthy: 80
        unhealthy: 10
        use-delta-values: true
        health-threshold: 'high'
        thresholds:
            unstable:
                total-all: 90
                total-high: 80
                total-normal: 50
                total-low: 20
                new-all: 95
                new-high: 85
                new-normal: 55
                new-low: 25
            failed:
                total-all: 80
                total-high: 70
                total-normal: 40
                total-low: 10
                new-all: 85
                new-high: 75
                new-normal: 45
                new-low: 15
        dont-compute-new: false
        use-delta-values: true
        use-previous-build-as-reference: true
        use-stable-build-as-reference: true
fingerprint

Fingerprint files to track them across builds. Requires the Jenkins Fingerprint Plugin.

Parameters:
  • files (str) – files to fingerprint, follows the @includes of Ant fileset (default ‘’)
  • record-artifacts (bool) – fingerprint all archived artifacts (default false)

Example:

publishers:
  - fingerprint:
      files: builddir/test*.xml
      record-artifacts: false
fitnesse

Publish Fitnesse test results

Requires the Jenkins Fitnesse plugin.

Parameters:results (str) – path specifier for results files

Example:

publishers:
  - fitnesse:
      results: "fitnesse-results/**/*.xml"
flowdock

This plugin publishes job build results to a Flowdock flow.

Requires the Jenkins Flowdock Plugin.

Parameters:
  • token (str) – API token for the targeted flow. (required)
  • tags (str) – Comma-separated list of tags to include in message (default “”)
  • chat-notification (bool) – Send chat notification when build fails (default true)
  • notify-success (bool) – Send notification on build success (default true)
  • notify-failure (bool) – Send notification on build failure (default true)
  • notify-fixed (bool) – Send notification when build is fixed (default true)
  • notify-unstable (bool) – Send notification when build is unstable (default false)
  • notify-aborted (bool) – Send notification when build was aborted (default false)
  • notify-notbuilt (bool) – Send notification when build did not occur (default false)

Example:

publishers:
  - flowdock:
      token: abcdefghijklmnopqrstuvwxyzabcdef

Full example:

publishers:
  - flowdock:
      token: abcdefghijklmnopqrstuvwxyzabcdef
      tags: jenkins,ci
      chat-notification: true
      notify-success: true
      notify-failure: true
      notify-fixed: true
      notify-unstable: false
      notify-aborted: false
      notify-notbuilt: false
ftp

Upload files via FTP. Requires the Jenkins Publish over FTP Plugin.

Parameters:
  • site (str) – name of the ftp site (required)
  • target (str) – destination directory (required)
  • target-is-date-format (bool) – whether target is a date format. If true, raw text should be quoted (default false)
  • clean-remote (bool) – should the remote directory be deleted before transferring files (default false)
  • source (str) – source path specifier (required)
  • excludes (str) – excluded file pattern (optional)
  • remove-prefix (str) – prefix to remove from uploaded file paths (optional)
  • fail-on-error (bool) – fail the build if an error occurs (default false).
  • flatten (bool) – only create files on the server, don’t create directories (default false).
  • verbose (bool) – adds lots of detail useful for debug to the console but generally should be left off (default false)
  • retries (int) – the number of times to retry this server in the event of failure (optional)
  • retry-delay (int) – the time to wait, in milliseconds, before attempting another transfer (default 10000)

Minimal Example:

publishers:
  - ftp:
      site: 'ftp.example.com'
      target: 'dest/dir'
      source: 'base/source/dir/**'

Full Example:

publishers:
  - ftp:
      site: 'ftp.example.com'
      target: "'dest/dir/'yyyyMMddHHmmss"
      target-is-date-format: true
      clean-remote: true
      source: 'base/source/dir/**'
      excludes: '**/*.excludedfiletype'
      remove-prefix: 'base/source/dir'
      fail-on-error: true
      flatten: true
      verbose: true
      retries: 99
      retry-delay: 12345
ftp-publisher

This plugin can be used to upload project artifacts and whole directories to an ftp server. Requires the Jenkins FTP-Publisher Plugin.

Parameters:
  • uploads (list) –

    List of files to upload

    uploads:
    • file-path (‘str’) – Destination folder. It will be created
      if doesn’t exists. Created relative to ftp root directory. (default ‘’)
    • source-file (‘str’) – Source files which will be uploaded
      (default ‘’)
  • site-name (str) – Name of FTP server to upload to (required)
  • use-timestamps (bool) – Use timestamps in the FTP directory path (default false)
  • flatten-files (bool) – Flatten files on the FTP host (default false)
  • skip-publishing (bool) – Skip publishing (default false)

Minimal Example:

publishers:
  - ftp-publisher:
      site-name: foo

Full Example:

publishers:
  - ftp-publisher:
      uploads:
        - file-path: destination/folder
          source-file: folder/dist/*.jar
        - file-path: foo/bar
          source-file: foo/bar/*.ear
      site-name: foo
      use-timestamps: true
      flatten-files: true
      skip-publishing: true
gatling

Publish gatling results as a trend graph Requires the Jenkins Gatling Plugin.

Example:

publishers:
  - gatling
git

This plugin will configure the Jenkins Git plugin to push merge results, tags, and/or branches to remote repositories after the job completes.

Requires the Jenkins Git Plugin.

Parameters:
  • push-merge (bool) – push merges back to the origin specified in the pre-build merge options (default false)
  • push-only-if-success (bool) – Only push to remotes if the build succeeds - otherwise, nothing will be pushed. (default true)
  • force-push (bool) – Add force option to git push (default false)
  • tags (list) –

    tags to push at the completion of the build

    tag:
    • remote (str) remote repo name to push to (default ‘origin’)
    • name (str) name of tag to push
    • message (str) message content of the tag
    • create-tag (bool) whether or not to create the tag after the build, if this is False then the tag needs to exist locally (default false)
    • update-tag (bool) whether to overwrite a remote tag or not (default false)
  • branches (list) –

    branches to push at the completion of the build

    branch:
    • remote (str) remote repo name to push to (default ‘origin’)
    • name (str) name of remote branch to push to
  • notes (list) –

    notes to push at the completion of the build

    note:
    • remote (str) remote repo name to push to (default ‘origin’)
    • message (str) content of the note
    • namespace (str) namespace of the note (default master)
    • replace-note (bool) whether to overwrite a note or not (default false)

Minimal Example:

publishers:
  - git

Full Example:

publishers:
  - git:
      push-merge: true
      push-only-if-success: false
      force-push: true
      tags:
          - tag:
              remote: tagremotename
              name: tagname
              message: "some tag message"
              create-tag: true
              update-tag: true
      branches:
          - branch:
              remote: branchremotename
              name: "some/branch"
      notes:
          - note:
              remote: remotename
              message: "some note to push"
              namespace: notenamespace
              replace-note: true
github-notifier

Set build status on Github commit. Requires the Jenkins Github Plugin.

Example:

publishers:
  - github-notifier
github-pull-request-merge

This action merges the pull request that triggered the build (see the github pull request trigger) Requires the Jenkins GitHub pull request builder plugin.

Parameters:
  • only-admins-merge (bool) – if true only administrators can merge the pull request, (default false)
  • disallow-own-code (bool) – if true will allow merging your own pull requests, in opposite to needing someone else to trigger the merge. (default false)
  • merge-comment (str) – Comment to set on the merge commit (default ‘’)
  • fail-on-non-merge (bool) – fail the job if the merge was unsuccessful (default false)
  • delete-on-merge (bool) – Delete the branch of the pull request on successful merge (default false)

Full Example:

publishers:
  - github-pull-request-merge:
      only-admins-merge: true
      disallow-own-code: true
      merge-comment: 'my fancy commit message'
      fail-on-non-merge: true
      delete-on-merge: true

Minimal Example:

publishers:
  - github-pull-request-merge
gitlab-message

Add note with build status on GitLab merge request. Requires the Jenkins GitLab Plugin.

Parameters:
  • failure-only (bool) – make a comment only on failure (default false)
  • success-note (bool) – make a comment on GitLab Merge Request if build succeeds (default false)
  • failure-note (bool) – make a comment on GitLab Merge Request if build failed (default false)
  • abort-note (bool) – make a comment on GitLab Merge Request if build aborted (default false)
  • unstable-note (bool) – make a comment on GitLab Merge Request if build unstable (default false)
  • success-note-text (str) – text of comment on success build (default ‘’)
  • failure-note-text (str) – text of comment on failed build (default ‘’)
  • abort-note-text (str) – text of comment on aborted build (default ‘’)
  • unstable-note-text (str) – text of comment on unstable build (default ‘’)

Minimal Example:

publishers:
  - gitlab-message

Full Example:

publishers:
  - gitlab-message:
      failure-only: true
      success-note: true
      success-note-text: "SUCCESS"
      failure-note: true
      failure-note-text: "Build was failed. See log on Jenkins"
      abort-note: true
      abort-note-text: "Build was aborted"
      unstable-note: true
      unstable-note-text: "The build is unstable"
gitlab-notifier

Set build status on GitLab commit. Requires the Jenkins GitLab Plugin.

Parameters:
  • name (str) – The name of the build in GitLab. With this you can distinguish different Jenkins jobs for the same commit in GitLab. (default ‘jenkins’)
  • mark-unstable-as-success (bool) – (default false)

Minimal Example:

publishers:
  - gitlab-notifier

Full Example:

publishers:
  - gitlab-notifier:
      name: foobar-jenkins
      mark-unstable-as-success: true
gitlab-vote

Set vote for build status on GitLab merge request. Requires the Jenkins GitLab Plugin.

Example:

publishers:
  - gitlab-vote
google-cloud-storage

Upload build artifacts to Google Cloud Storage. Requires the Jenkins Google Cloud Storage plugin.

Apart from the Google Cloud Storage Plugin itself, installation of Google OAuth Credentials and addition of required credentials to Jenkins is required.

Parameters:
  • credentials-id (str) – The set of Google credentials registered with the Jenkins Credential Manager for authenticating with your project. (required)
  • uploads (list) –
    uploads:
    • expiring-elements (dict)
      params:
      • bucket-name (str) bucket name to upload artifacts (required)
      • days-to-retain (int) days to keep artifacts (required)
    • build-log (dict)
      params:
      • log-name (str) name of the file that the Jenkins console log to be named (required)
      • storage-location (str) bucket name to upload artifacts (required)
      • share-publicly (bool) whether to share uploaded share uploaded artifacts with everyone (default false)
      • upload-for-failed-jobs (bool) whether to upload artifacts even if the build fails (default false)
      • show-inline (bool) whether to show uploaded build log inline in web browsers, rather than forcing it to be downloaded (default true)
      • strip-prefix (str) strip this prefix off the file names (default not set)
    • classic (dict)
      params:
      • file-pattern (str) ant style globs to match the files to upload (required)
      • storage-location (str) bucket name to upload artifacts (required)
      • share-publicly (bool) whether to share uploaded share uploaded artifacts with everyone (default false)
      • upload-for-failed-jobs (bool) whether to upload artifacts even if the build fails (default false)
      • show-inline (bool) whether to show uploaded artifacts inline in web browsers, rather than forcing them to be downloaded (default false)
      • strip-prefix (str) strip this prefix off the file names (default not set)

Example:

publishers:
    - google-cloud-storage:
        credentials-id: 'myCredentials'
        uploads:
            - expiring-elements:
                bucket-name: 'gs://myBucket'
                days-to-retain: 7

Full example:

publishers:
    - google-cloud-storage:
        credentials-id: 'myCredentials'
        uploads:
            - expiring-elements:
                bucket-name: 'gs://myBucket'
                days-to-retain: 7
            - build-log:
                log-name: 'console.log'
                storage-location: 'gs://myBucket'
                upload-for-failed-jobs: true
                share-publicly: true
            - classic:
                file-pattern: 'target/*.war'
                storage-location: 'gs://myBucket'
                upload-for-failed-jobs: true
            - classic:
                file-pattern: '**/build/*.iso'
                storage-location: 'gs://myBucket/artifacts/'
                share-publicly: true
                strip-prefix: 'path/to/'
groovy-postbuild

Execute a groovy script. Requires the Jenkins Groovy Postbuild Plugin.

Please pay attention on version of plugin you have installed. There were incompatible changes between 1.x and 2.x. Please see home page of this plugin for full information including migration process.

Parameters:
  • script (str) – The groovy script to execute
  • classpath (list) – List of additional classpaths (>=1.6)
  • on-failure (str) – In case of script failure leave build as it is for “nothing” option, mark build as unstable for “unstable” and mark job as failure for “failed” (default ‘nothing’)
  • matrix-parent (bool) – Run script for matrix parent only (>=1.9) (default false)
  • sandbox (bool) – Execute script inside of groovy sandbox (>=2.0) (default false)

Example:

publishers:
    - groovy-postbuild:
        script: "manager.buildFailure()"
        classpath:
            - "file:///path/to/your/lib"
            - "file:///path/to/your/lib"
        on-failure: "failed"
        matrix-parent: true
growl

Push notifications to growl client. Requires the Jenkins Growl Plugin.

Parameters:
  • ip (str) – IP address to send growl notifications to (required)
  • notify-only-on-fail-or-recovery (bool) – send a growl only when build fails or recovers from a failure (default false)

Minimal Example:

publishers:
  - growl:
      ip: foo.ip.address

Full Example:

publishers:
  - growl:
      ip: foo.ip.address
      notify-only-on-fail-or-recovery: true
hipchat

Publisher that sends hipchat notifications on job events Requires the Jenkins Hipchat Plugin version >=1.9

Please see documentation for older plugin version https://jenkins-job-builder.readthedocs.io/en/latest/hipchat.html

Parameters:
  • token (str) – This will override the default auth token (optional)
  • rooms (list) – list of HipChat rooms to post messages to, overrides global default (optional)
  • notify-start (bool) – post messages about build start event (default false)
  • notify-success (bool) – post messages about successful build event (default false)
  • notify-aborted (bool) – post messages about aborted build event (default false)
  • notify-not-built (bool) – post messages about build set to NOT_BUILT. This status code is used in a multi-stage build where a problem in earlier stage prevented later stages from building. (default false)
  • notify-unstable (bool) – post messages about unstable build event (default false)
  • notify-failure (bool) – post messages about build failure event (default false)
  • notify-back-to-normal (bool) – post messages about build being back to normal after being unstable or failed (default false)
  • start-message (str) – This will override the default start message (optional)
  • complete-message (str) – This will override the default complete message (optional)

Example:

publishers:
  - hipchat:
      token: auth
      rooms:
        - room1
        - room2
      notify-start: true
      notify-aborted: true
      start-message: job started
      complete-message: job completed
hp-alm

Publish test results to HP-ALM.

Requires the Jenkins Micro Focus Application Automation Tools.

Parameters:
  • server-name (str) – The name of the ALM Server. (required)
  • credentials-id (str) – credentials-id of the user (default ‘’)
  • domaine (str) – The Domain of the project to be used. (required)
  • client-type (str) – Client type is required for some ALM above 12.60 in authentication.(default ‘’)
  • project (str) – The project to be used. (required)
  • testing-framework (str) – The testing framework that is used when generate the testing result file. (default Junit)
  • testing-tool (str) – The testing tool that is used when generate the testing result file. (default ‘’)
  • folder (str) – The path of the test folder that will contain the uploaded test. The path doesn’t include the Root test folder (Subject). For example, sampletestfolder/subfolder means, the tests will be uploaded to test folder named ‘subfolder’, which is under the test folder named ‘sampletestfolder’, and ‘sampletestfolder’ is under the root test folder ‘Subject’. (required)
  • set-folder (str) – The path of the testset folder that will contain the uploaded testset. The path doesn’t include the Root testset folder. For example, sampletestsetfolder/subfolder means, the testsets will be uploaded to testset folder named ‘subfolder’, which is under the testset folder named ‘sampletestsetfolder’, and ‘sampletestsetfolder’ is under the root testset folder ‘Root’. (required)
  • testing-result-file (str) – The condition to find the testing result file, start from the root path of the job. For example, **/junitResult.xml to find testing result file for Junit Plugin, **/testng-results.xml to find testing result file for TestNG plugin. (required)
  • jenkins-server-url (str) – The HTTP URL of the Jenkins Server, form example, http://myjenkinsserver.test.com:8080 . (optional)

Minimal example using defaults:

publishers:
  - hp-alm:
      server-name: HP-ALM
      domain: FOO_COMPANY
      project: foo_project
      folder: 'ALM/foo/release1/test_case1'
      set-folder: 'ALM/foo/release1/test_case1/$env'
      testing-result-file: '**/junitResult.xml'

Full example:

publishers:
  - hp-alm:
      server-name: HP-ALM
      credentials-id: cba09876-4321-4567-890a-bcde12345678
      domain: FOO_COMPANY
      project: foo_project
      client-type: foo_client
      testing-framework: JUnit
      testing-tool: foo_tool
      folder: 'ALM/foo/release1/test_case1'
      set-folder: 'ALM/foo/release1/test_case1/$env'
      testing-result-file: '**/junitResult.xml'
      jenkins-server-url: 'http://myjenkinsserver.test.com:8080'
html-publisher

This plugin publishes HTML reports.

Requires the Jenkins HTML Publisher Plugin.

Parameters:
  • name (str) – Report name (required)
  • dir (str) – HTML directory to archive (required)
  • files (str) – Specify the pages to display (required)
  • keep-all (bool) – keep HTML reports for each past build (default false)
  • allow-missing (bool) – Allow missing HTML reports (default false)
  • link-to-last-build (bool) – If this and ‘keep-all’ both are true, it publishes the link on project level even if build failed. (default false)

Example:

publishers:
  - html-publisher:
      name: "some name"
      dir: "path/"
      files: "index.html"
      keep-all: true
      allow-missing: true
      link-to-last-build: true
hue-light

This plugin shows the state of your builds using the awesome Philips hue lights.

Requires the Jenkins hue-light Plugin.

Parameters:
  • light-id (int) – ID of light. Define multiple lights by a comma as a separator (required)
  • pre-build (string) – Colour of building state (default ‘blue’)
  • good-build (string) – Colour of successful state (default ‘green’)
  • unstable-build (string) – Colour of unstable state (default ‘yellow’)
  • bad-build (string) – Colour of unsuccessful state (default ‘red’)

Full Example:

publishers:
  - hue-light:
      light-id: 123
      pre-build: yellow
      good-build: red
      unstable-build: blue
      bad-build: green

Minimal Example:

publishers:
  - hue-light:
      light-id: 123

Produce an image gallery using Javascript library. Requires the Jenkins Image Gallery Plugin.

Parameters:
  • gallery-type (str) –
    gallery-type values:
     
    • archived-images-gallery (default)
    • in-folder-comparative-gallery
    • multiple-folder-comparative-gallery
  • title (str) – gallery title (optional)
  • image-width (int) – width of the image (optional)
  • unstable-if-no-artifacts (bool) – mark build as unstable if no archived artifacts were found (default false)
  • includes (str) – include pattern (valid for archived-images-gallery gallery)
  • base-root-folder (str) – base root dir (valid for comparative gallery)
  • image-inner-width (int) – width of the image displayed in the inner gallery popup (valid for comparative gallery, optional)

Example:

publishers:
    - image-gallery:
        - gallery-type: archived-images-gallery
          title: Gallery 1
          includes: path/images
          image-width: 100
          unstable-if-no-artifacts: true
        - gallery-type: in-folder-comparative-gallery
          title: Gallery 2
          base-root-folder: path/images2
          image-width: 321
          image-inner-width: 111
          unstable-if-no-artifacts: false
        - gallery-type: multiple-folder-comparative-gallery
          title: Gallery 3
          base-root-folder: path/images3
          image-width: 222
          image-inner-width: 1
influx-db

Requires the Jenkins :jenkins-wiki: Influx DB <Influx+DB+Plugin>.

ircbot

ircbot enables Jenkins to send build notifications via IRC and lets you interact with Jenkins via an IRC bot.

Requires the Jenkins IRC Plugin.

Parameters:
  • strategy (string) –

    When to send notifications

    strategy values:
     
    • all always (default)
    • any-failure on any failure
    • failure-and-fixed on failure and fixes
    • new-failure-and-fixed on new failure and fixes
    • statechange-only only on state change
  • notify-start (bool) – Whether to send notifications to channels when a build starts (default false)
  • notify-committers (bool) – Whether to send notifications to the users that are suspected of having broken this build (default false)
  • notify-culprits (bool) – Also send notifications to ‘culprits’ from previous unstable/failed builds (default false)
  • notify-upstream (bool) – Whether to send notifications to upstream committers if no committers were found for a broken build (default false)
  • notify-fixers (bool) – Whether to send notifications to the users that have fixed a broken build (default false)
  • message-type (string) –

    Channel Notification Message.

    message-type values:
     
    • summary-scm for summary and SCM changes (default)
    • summary for summary only
    • summary-params for summary and build parameters
    • summary-scm-fail for summary, SCM changes, failures)
  • channels (list) –

    list channels definitions If empty, it takes channel from Jenkins configuration. (default empty) WARNING: the IRC plugin requires the channel to be configured in the system wide configuration or the jobs will fail to emit notifications to the channel

    Channel:
    • name (str) Channel name
    • password (str) Channel password (optional)
    • notify-only (bool) Set to true if you want to disallow bot commands (default false)
  • matrix-notifier (string) –

    notify for matrix projects instant-messaging-plugin injects an additional field in the configuration form whenever the project is a multi-configuration project

    matrix-notifier values:
     
    • all
    • only-configurations (default)
    • only-parent

Minimal Example:

publishers:
  - ircbot

Full Example:

publishers:
  - ircbot:
      strategy: failure-and-fixed
      notify-start: true
      notify-committers: true
      notify-culprits: true
      notify-upstream: true
      notify-fixers: true
      message-type: summary
      channels:
          - name: '#jenkins-channel1'
            password: secrete
            notify-only: false
          - name: '#jenkins-channel2'
            notify-only: true
      matrix-notifier: all
jabber

Integrates Jenkins with the Jabber/XMPP instant messaging protocol Requires the Jenkins Jabber Plugin.

Parameters:
  • notify-on-build-start (bool) – Whether to send notifications to channels when a build starts (default false)
  • notify-scm-committers (bool) – Whether to send notifications to the users that are suspected of having broken this build (default false)
  • notify-scm-culprits (bool) – Also send notifications to ‘culprits’ from previous unstable/failed builds (default false)
  • notify-upstream-committers (bool) – Whether to send notifications to upstream committers if no committers were found for a broken build (default false)
  • notify-scm-fixers (bool) – Whether to send notifications to the users that have fixed a broken build (default false)
  • group-targets (list) – List of group targets to notify
  • individual-targets (list) – List of individual targets to notify
  • strategy (dict) –

    When to send notifications (default all)

    strategy values:
     
    • all – Always
    • failure – On any failure
    • failure-fixed – On failure and fixes
    • new-failure-fixed – On new failure and fixes
    • change – Only on state change
  • message (dict) –

    Channel notification message (default summary-scm)

    message values:
     
    • summary-scm – Summary + SCM changes
    • summary – Just summary
    • summary-build – Summary and build parameters
    • summary-scm-fail – Summary, SCM changes, and failed tests

Minimal Example:

publishers:
  - jabber

Full Example:

publishers:
  - jabber:
      notify-on-build-start: true
      notify-scm-committers: true
      notify-scm-culprits: true
      notify-upstream-committers: true
      notify-scm-fixers: true
      group-targets:
        - "foo-room@conference-2-fooserver.foo.com"
      individual-targets:
        - "foo-user@conference-2-fooserver.foo.com"
      strategy: new-failure-fixed
      message: summary
jacoco

Generate a JaCoCo coverage report. Requires the Jenkins JaCoCo Plugin.

Parameters:
  • exec-pattern (str) – This is a file name pattern that can be used to locate the jacoco report files (default **/**.exec)
  • class-pattern (str) – This is a file name pattern that can be used to locate class files (default **/classes)
  • source-pattern (str) – This is a file name pattern that can be used to locate source files (default **/src/main/java)
  • source-inclusion-pattern (str) – This is a file name pattern that can be used to include certain source files (default **/*.java)
  • update-build-status (bool) – Update the build according to the results (default false)
  • inclusion-pattern (str) – This is a file name pattern that can be used to include certain class files (default ‘’)
  • exclusion-pattern (str) – This is a file name pattern that can be used to exclude certain class files (default ‘’)
  • targets (dict) –
    targets:(instruction, branch, complexity, line, method, class)
    • healthy (int): Healthy threshold (default 0)
    • unhealthy (int): Unhealthy threshold (default 0)

Minimal Example:

publishers:
  - jacoco

Full Example:

publishers:
  - jacoco:
      exec-pattern: '**/**.exec'
      class-pattern: '**/classes'
      source-pattern: '**/src/main/java'
      source-inclusion-pattern: '**/*.java,**/*.kt'
      update-build-status: true
      inclusion-pattern: '**/*.class'
      exclusion-pattern: '**/*Test*.class'
      targets:
        - instruction:
            healthy: 7
            unhealthy: 1
        - branch:
            healthy: 8
            unhealthy: 2
        - complexity:
            healthy: 9
            unhealthy: 3
        - line:
            healthy: 10
            unhealthy: 4
        - method:
            healthy: 11
            unhealthy: 5
        - class:
            healthy: 12
            unhealthy: 6
javadoc

Publish Javadoc Requires the Jenkins Javadoc Plugin.

Parameters:
  • directory (str) – Directory relative to the root of the workspace, such as ‘myproject/build/javadoc’ (optional)
  • keep-all-successful (bool) – When true, it will retain Javadoc for each successful build. This allows you to browse Javadoc for older builds, at the expense of additional disk space requirement. If false, it will only keep the latest Javadoc, so older Javadoc will be overwritten as new builds succeed. (default false)

Example:

publishers:
  - javadoc:
      directory: myproject/build/javadoc
      keep-all-successful: true
jclouds

JClouds Cloud Storage Settings provides a way to store artifacts on JClouds supported storage providers. Requires the Jenkins JClouds Plugin.

JClouds Cloud Storage Settings must be configured for the Jenkins instance.

Parameters:
  • profile (str) – preconfigured storage profile (required)
  • files (str) – files to upload (regex) (required)
  • basedir (str) – the source file path (relative to workspace, Optional)
  • container (str) – the destination container name (required)
  • hierarchy (bool) – keep hierarchy (default false)

Example:

publishers:
  - jclouds:
      profile: hp
      files: '*.tar.gz'
      container: jenkins
      basedir: test base dir
jdepend

Publish jdepend report Requires the JDepend Plugin.

Parameters:file (str) – path to jdepend file (required)

Example:

publishers:
  - jdepend:
      file: build/jdepend/main.xml
jira

Update relevant JIRA issues Requires the Jenkins JIRA Plugin.

Example:

publishers:
  - jira
jms-messaging
The JMS Messaging Plugin provides the following functionality:
  • A build trigger to submit jenkins jobs upon receipt of a matching message.
  • A builder that may be used to submit a message to the topic upon the completion of a job
  • A post-build action that may be used to submit a message to the topic upon the completion of a job
JMS Messaging provider types supported:
  • ActiveMQ
  • FedMsg

Requires the Jenkins JMS Messaging Plugin Pipeline Plugin.

Parameters:
  • override-topic (str) – If you need to override the default topic. (default ‘’)
  • provider-name (str) – Name of message provider setup in the global config. (default ‘’)
  • msg-type (str) – A message type (default ‘CodeQualityChecksDone’)
  • msg-props (str) – Message header to publish. (default ‘’)
  • msg-content (str) – Message body to publish. (default ‘’)

Full Example:

publishers:
  - jms-messaging:
      override-topic: org.centos.stage.ci.pipeline.compose.complete
      provider-name: fedmsg
      msg-type: Custom
      msg-props: |
        topic=org.centos.prod.ci.pipeline.compose.complete
        username=fedora-atomic
      msg-content: |
        {
          "build_url": "${BUILD_URL}",
          "compose_url": "<full-url-to-compose>",
          "build_id": "${BUILD_ID}",
          "ref": "fedora/rawhide/${basearch}/atomic-host",
          "rev": "<sha of the commit from dist-git>",
          "namespace": "rpms",
          "repo": "php-simplepie",
          "status": "<success/failure/aborted>",
          "test_guidance": "<comma-separated-list-of-test-suites-to-run>"}

Minimal Example:

publishers:
  - jms-messaging:
      provider-name: fedmsg
      msg-type: CodeQualityChecksDone
      msg-props: test
      msg-content: test
join-trigger

Trigger a job after all the immediate downstream jobs have completed. Requires the Jenkins Join Plugin.

Parameters:
  • even-if-unstable (bool) – if true jobs will trigger even if some downstream jobs are marked as unstable (default false)
  • projects (list) – list of projects to trigger
  • publishers (list) – list of triggers from publishers module that defines projects that need to be triggered

Example:

publishers:
  - join-trigger:
      projects:
        - project-one
        - project-two
      even-if-unstable: true
      publishers:
        - trigger-parameterized-builds:
          - project: archive
            current-parameters: true
            trigger-from-child-projects: true
            trigger-with-no-params: true
          - project: cleanup
            current-parameters: true
            trigger-with-no-params: false
junit

Publish JUnit test results.

Parameters:
  • results (str) – results filename (required)
  • keep-long-stdio (bool) – Retain long standard output/error in test results (default true).
  • health-scale-factor (float) – Amplification factor to apply to test failures when computing the test result contribution to the build health score. (default 1.0)
  • allow-empty-results (bool) – Do not fail the build on empty test results (default false)
  • test-stability (bool) – Add historical information about test results stability (default false). Requires the Jenkins Test stability Plugin.
  • claim-build (bool) – Allow claiming of failed tests (default false) Requires the Jenkins Claim Plugin.
  • measurement-plots (bool) – Create measurement plots (default false) Requires the Jenkins Measurement Plots Plugin.
  • flaky-test-reports (bool) – Publish flaky test reports (default false). Requires the Jenkins Flaky Test Handler Plugin.
  • junit-attachments (bool) – Publish test attachments (default false). Requires the Jenkins JUnit Attachments Plugin.

Minimal example using defaults:

publishers:
- junit:
    results: nosetests.xml

Full example:

publishers:
- junit:
    results: nosetests-example.xml
    keep-long-stdio: false
    health-scale-factor: 2.0
    allow-empty-results: true
    test-stability: true
    claim-build: true
    measurement-plots: true
    flaky-test-reports: true
    allow-empty-results: true
    junit-attachments: true
logparser

Requires the Jenkins Log Parser Plugin.

Parameters:
  • parse-rules (str) – full path to parse rules (default ‘’)
  • use-project-rules (bool) – use project rules instead of global (default true)
  • unstable-on-warning (bool) – mark build unstable on warning (default false)
  • fail-on-error (bool) – mark build failed on error (default false)
  • show-graphs (bool) – show parser trend graphs (default true)

Minimal Example:

publishers:
  - logparser:
      parse-rules: "project-log-parser-rules.txt"

Full Example:

publishers:
  - logparser:
      use-project-rules: false
      parse-rules: "/path/to/global-rules"
      unstable-on-warning: true
      fail-on-error: true
      show-graphs: false
logstash

Send job’s console log to Logstash for processing and analyis of your job data. Also stores test metrics from Junit. Requires the Jenkins Logstash Plugin.

Parameters:
  • max-lines (int) – The maximum number of log lines to send to Logstash. (default 1000)
  • fail-build (bool) – Mark build as failed if this step fails. (default false)

Minimal Example:

publishers:
  - logstash

Full Example:

publishers:
  - logstash:
      max-lines: 2000
      fail-build: true
maven-deploy

Deploy artifacts to Maven repository.

Parameters:
  • id (str) – Repository ID
  • url (str) – Repository URL (optional)
  • unique-version (bool) – Assign unique versions to snapshots (default true)
  • deploy-unstable (bool) – Deploy even if the build is unstable (default false)
  • release-env-var (str) – If the given variable name is set to “true”, the deploy steps are skipped. (optional)

Example:

publishers:
  - maven-deploy:
      id: example
      url: http://repo.example.com/maven2/
      unique-version: true
      deploy-unstable: false
      release-env-var: TIMER
mqtt

This plugin lets you send build notifications to a MQTT message queue. Requires the MQTT Notification Plugin.

Parameters:
  • broker-url (str) – the broker URL, as protocol://address:port (required)
  • credentials-id (str) – credentials to use to connect to the broker (optional)
  • topic (str) – the message topic (default “jenkins/$PROJECT_URL”)
  • message (str) – the message itself (default “$BUILD_RESULT”)
  • qos (str) – one of AT_MOST_ONCE, AT_LEAST_ONCE, or EXACTLY_ONCE (default AT_MOST_ONCE)
  • retain-message (bool) – whether to resend message or not when a new client connects (default false)

Minimal Example:

publishers:
  - mqtt:
      broker-url: tcp://localhost:1883

Full Example:

publishers:
  - mqtt:
      broker-url: tcp://localhost:1883
      topic: hello
      message: world
      qos: EXACTLY_ONCE
      retain-message: true
      credentials-id: abcde
naginator

Automatically reschedule a build after a build failure Requires the Jenkins Naginator Plugin.

Parameters:
  • rerun-unstable-builds (bool) – Rerun build for unstable builds as well as failures (default false)
  • rerun-matrix-part (bool) – Rerun build only for failed parts on the matrix (>=1.12) (default false)
  • fixed-delay (int) – Fixed delay in seconds before retrying build (cannot be used with progressive-delay-increment or progressive-delay-maximum. This is the default delay type. (default 0)
  • progressive-delay-increment (int) – Progressive delay in seconds before retrying build increment (cannot be used when fixed-delay is being used) (default 0)
  • progressive-delay-maximum (int) – Progressive delay in seconds before retrying maximum delay (cannot be used when fixed-delay is being used) (default 0)
  • max-failed-builds (int) – Maximum number of successive failed builds (default 0)
  • regular-expression (str) – Only rerun build if regular expression is found in output (default ‘’)

Example:

publishers:
  - naginator:
      rerun-unstable-builds: true
      rerun-matrix-part: true
      progressive-delay-increment: 5
      progressive-delay-maximum: 15
      max-failed-builds: 6
      regular-expression: "foo"
openshift-build-canceller

This action is intended to provide cleanup for a Jenkins job which failed because a build is hung (instead of terminating with a failure code); this step will allow you to perform the equivalent of a oc cancel-build for the provided build config; any builds under that build config which are not previously terminated (either successfully or unsuccessfully) or cancelled will be cancelled. Requires the Jenkins OpenShift Pipeline Plugin.

Parameters:
  • api-url (str) – this would be the value you specify if you leverage the –server option on the OpenShift oc command. (default ‘https://openshift.default.svc.cluster.local’)
  • bld-cfg (str) – The value here should be whatever was the output form oc project when you created the BuildConfig you want to run a Build on (default ‘frontend’)
  • namespace (str) – If you run oc get bc for the project listed in “namespace”, that is the value you want to put here. (default ‘test’)
  • auth-token (str) – The value here is what you supply with the –token option when invoking the OpenShift oc command. (default ‘’)
  • verbose (bool) – This flag is the toggle for turning on or off detailed logging in this plug-in. (default false)

Full Example:

publishers:
  - openshift-build-canceller:
      api-url: https://openshift.example.local.url/
      bld-cfg: front
      namespace: test-build
      auth-token: ose-key-canceller1
      verbose: true

Minimal Example:

publishers:
  - openshift-build-canceller
openshift-deploy-canceller

This action is intended to provide cleanup for any OpenShift deployments left running when the Job completes; this step will allow you to perform the equivalent of a oc deploy –cancel for the provided deployment config. Requires the Jenkins OpenShift Pipeline Plugin.

Parameters:
  • api-url (str) – this would be the value you specify if you leverage the –server option on the OpenShift oc command. (default ‘https://openshift.default.svc.cluster.local’)
  • dep-cfg (str) – The value here should be whatever was the output form oc project when you created the BuildConfig you want to run a Build on (default frontend)
  • namespace (str) – If you run oc get bc for the project listed in “namespace”, that is the value you want to put here. (default ‘test’)
  • auth-token (str) – The value here is what you supply with the –token option when invoking the OpenShift oc command. (default ‘’)
  • verbose (bool) – This flag is the toggle for turning on or off detailed logging in this plug-in. (default false)

Full Example:

publishers:
  - openshift-deploy-canceller:
      api-url: https://openshift.example.local.url/
      dep-cfg: front
      namespace: test6
      auth-token: ose-key-dep-canceller1
      verbose: true

Minimal Example:

publishers:
  - openshift-deploy-canceller
packer

This plugin allows for a job to publish an image generated Packer Requires the Jenkins Packer Plugin.

Parameters:
  • name (str) – Name of the packer installation (required)
  • json-template (str) – Path to a Packer JSON template file (default ‘’)
  • json-template-text (str) – Text of Packer JSON template (default ‘’)
  • add-params (str) – Specify which additional parameters to pass to packer (default ‘’)
  • use-debug (bool) – adds -debug argument when packer executes (default false)
  • change-dir (str) – If set, the current directory will be changed to this before starting packer (default ‘’)
  • template-mode (str) –

    Packer template option used (default global)

    template-mode values:
     
    • global
    • file
    • text
  • file-entries (list) – File entries for the packer configuration (default [])
  • variable-name (str) – Variable name for a file to used in the configuration JSON (default ‘’)
  • contents (str) – File contents of the configuration JSON (default ‘’)

Minimal Example:

publishers:
  - packer:
      name: test name

Full Example:

publishers:
  - packer:
      name: test name
      json-template: test template
      json-template-text: test template text
      add-params: additional params
      use-debug: true
      change-dir: change to directory
      template-mode: global
      file-entries:
        - files:
            variable-name: test var
            contents: test content
        - files:
            variable-name: test var 2
            contents: test content 2
performance

Publish performance test results from jmeter and junit. Requires the Jenkins Performance Plugin.

Parameters:
  • failed-threshold (int) – Specify the error percentage threshold that set the build failed. A negative value means don’t use this threshold (default 0)
  • unstable-threshold (int) – Specify the error percentage threshold that set the build unstable. A negative value means don’t use this threshold (default 0)
  • unstable-response-time-threshold (str) – Average response time threshold (default ‘’)
  • failed-threshold-positive (float) – Maximum failed percentage for build comparison (default 0.0)
  • failed-threshold-negative (float) – Minimum failed percentage for build comparison (default 0.0)
  • unstable-threshold-positive (float) – Maximum unstable percentage for build comparison (default 0.0)
  • unstable-threshold-negative (float) – Minimum unstable percentage for build comparison (default 0.0)
  • nth-build-number (int) – Build number for build comparison (default 0)
  • mode-relative-thresholds (bool) – Relative threshold mode (default false)
  • config-type (str) –

    Compare based on (default ‘ART’)

    config-type values:
     
    • ART – Average Response Time
    • MRT – Median Response Time
    • PRT – Percentile Response Time
  • mode-of-threshold (bool) – Mode of threshold, true for relative threshold and false for error threshold (default false)
  • fail-build (bool) – Fail build when result files are not present (default false)
  • compare-build-previous (bool) – Compare with previous build (default false)
  • mode-performance-per-test-case (bool) – Performance Per Test Case Mode (default true)
  • mode-thoughput (bool) – Show Throughput Chart (default false)
  • report (dict) –
    (jmeter or junit):
     (dict or str): Specify a custom report file (optional; jmeter default **/.jtl, junit default */TEST-*.xml)

Minimal Example:

publishers:
  - performance

Full Example:

publishers:
  - performance:
      failed-threshold: 85
      unstable-threshold: -1
      unstable-response-time-threshold: "JMeterResultsOrders.jtl:2000"
      failed-threshold-positive: 90.0
      failed-threshold-negative: 10.0
      unstable-threshold-positive: 80.0
      unstable-threshold-negative: 20.0
      nth-build-number: 10
      mode-relative-thresholds: true
      config-type: "PRT"
      mode-of-threshold: true
      fail-build: true
      compare-build-previous: true
      mode-performance-per-test-case: false
      mode-thoughput: true
      report:
        - jmeter: "/special/file.jtl"
        - junit: "/special/file.xml"
        - jmeter
        - junit
phabricator

Integrate with Phabricator

Requires the Jenkins Phabricator Plugin.

Parameters:
  • comment-on-success (bool) – Post a comment when the build succeeds. (optional)
  • uberalls-enabled (bool) – Integrate with uberalls. (optional)
  • comment-file (str) – Include contents of given file if commenting is enabled. (optional)
  • comment-size (int) – Maximum comment character length. (optional)
  • comment-with-console-link-on-failure (bool) – Post a comment when the build fails. (optional)

Example:

publishers:
  - phabricator:
      comment-on-success: false
      uberalls-enabled: false
      comment-with-console-link-on-failure: false
pipeline

Specify a downstream project in a pipeline. Requires the Jenkins Build Pipeline Plugin.

Use of the node-label-name or node-label parameters requires the Jenkins NodeLabel Parameter Plugin. Note: ‘node-parameters’ overrides the Node that the triggered project is tied to.

Parameters:
  • projects (list) – list the jobs to trigger, will generate comma-separated string containing the named jobs.
  • predefined-parameters (str) – parameters to pass to the other job (optional)
  • current-parameters (bool) – Whether to include the parameters passed to the current build to the triggered job (optional)
  • node-parameters (bool) – Use the same Node for the triggered builds that was used for this build. (optional)
  • svn-revision (bool) – Pass svn revision to the triggered job (optional)
  • include-upstream (bool) – Include/pass through Upstream SVN Revisons. Only valid when ‘svn-revision’ is true. (default false)
  • git-revision (dict) –

    Passes git revision to the triggered job (optional).

    • combine-queued-commits (bool): Whether to combine queued git hashes or not (default false)
  • boolean-parameters (dict) – Pass boolean parameters to the downstream jobs. Specify the name and boolean value mapping of the parameters. (optional)
  • property-file (str) – Use properties from file (optional)
  • fail-on-missing (bool) – Blocks the triggering of the downstream jobs if any of the property files are not found in the workspace. Only valid when ‘property-file’ is specified. (default false)
  • file-encoding (str) – Encoding of contents of the files. If not specified, default encoding of the platform is used. Only valid when ‘property-file’ is specified. (optional)
  • restrict-matrix-project (str) – Filter that restricts the subset of the combinations that the downstream project will run (optional)

Example:

publishers:
  - pipeline:
      project: test_project
      current-parameters: true
      predefined-parameters: foo=bar
publishers:
  - pipeline:
      projects:
        - test_project
      predefined-parameters: BUILD_NUM=${BUILD_NUMBER}
      current-parameters: true
      property-file: vars.txt
      git-revision:
        combine-queued-commits: true
      fail-on-missing: true
      file-encoding: UTF-8
      boolean-parameters:
          p1: true
          p2: false
      svn-revision: true
      include-upstream: true

You can build pipeline jobs that are re-usable in different pipelines by using a Job Template to define the pipeline jobs, and variable substitution to specify the name of the downstream job in the pipeline. Job-specific substitutions are useful here (see Project).

See ‘samples/pipeline.yaml’ for an example pipeline implementation.

plot

Plot provides generic plotting (or graphing).

Requires the Jenkins Plot Plugin.

Parameters:
  • title (str) – title for the graph (default ‘’)
  • yaxis (str) – title of Y axis (default ‘’)
  • width (int) – the width of the plot in pixels (default 750)
  • height (int) – the height of the plot in pixels (default 450)
  • group (str) – name of the group to which the plot belongs (required)
  • num-builds (int) – number of builds to plot across (default plot all builds)
  • style (str) – Specifies the graph style of the plot Can be: area, bar, bar3d, line, line3d, stackedArea, stackedbar, stackedbar3d, waterfall (default ‘line’)
  • use-description (bool) – When false, the X-axis labels are formed using build numbers and dates, and the corresponding tooltips contain the build descriptions. When enabled, the contents of the labels and tooltips are swapped, with the descriptions used as X-axis labels and the build number and date used for tooltips. (default false)
  • exclude-zero-yaxis (bool) – When false, Y-axis contains the value zero even if it is not included in the data series. When true, the value zero is not automatically included. (default false)
  • logarithmic-yaxis (bool) – When true, the Y-axis will use a logarithmic scale. By default, the Y-axis uses a linear scale. (default false)
  • keep-records (bool) – When true, show all builds up to ‘Number of builds to include’. (default false)
  • csv-file-name (str) – Use for choosing the file name in which the data will be persisted. If none specified and random name is generated as done in the Jenkins Plot plugin. (default random generated .csv filename, same behaviour as the Jenkins Plot plugin)
  • series (list) –

    list data series definitions

    Series:
    • file (str) : files to include
    • inclusion-flag filtering mode for CSV files. Possible values are:
      • off (default)
      • include-by-string
      • exclude-by-string
      • include-by-column
      • exclude-by-column
    • exclude (str) : exclude pattern for CSV file.
    • url (str) : for ‘csv’ and ‘xml’ file types used when you click on a point (default empty)
    • display-table (bool) : for ‘csv’ file type if true, original CSV will be shown above plot (default false)
    • label (str) : used by ‘properties’ file type Specifies the legend label for this data series. (default empty)
    • format (str) : Type of file where we get datas. Can be: properties, csv, xml
    • xpath-type (str) : The result type of the expression must be supplied due to limitations in the java.xml.xpath parsing. The result can be: node, nodeset, boolean, string, or number. Strings and numbers will be converted to double. Boolean will be converted to 1 for true, and 0 for false. (default ‘node’)
    • xpath (str) : used by ‘xml’ file type Xpath which selects the values that should be plotted.

Minimal Example:

publishers:
  - plot:
      - yaxis: ''
        group: 'bench'
        series:
            - file: 'data.csv'
              format: 'csv'

Full Example:

publishers:
  - plot:
    - title: MyPlot
      yaxis: Y
      width: 900
      height: 1000
      csv-file-name: myplot.csv
      group: PlotGroup
      num-builds: '1'
      style: line
      exclude-zero-yaxis: true
      logarithmic-yaxis: true
      use-description: true
      keep-records: true
      series:
        - file: graph-me-second.properties
          label: MyLabel
          format: properties
        - file: graph-me-first.csv
          url: 'http://srv1'
          inclusion-flag: 'include-by-string'
          exclude: 'Column 1,Column 2,Column 3'
          display-table: true
          format: csv
    - title: MyPlot2
      yaxis: Y
      csv-file-name: myplot2.csv
      group: PlotGroup
      style: bar
      use-description: false
      series:
        - file: graph-me-third.xml
          url: 'http://srv2'
          format: xml
          xpath-type: 'string'
          xpath: '/*'
pmd

Publish trend reports with PMD. Requires the Jenkins PMD Plugin.

The PMD component accepts a dictionary with the following values:

Parameters:
  • pattern (str) – Report filename pattern (optional)
  • can-run-on-failed (bool) – Also runs for failed builds, instead of just stable or unstable builds (default false)
  • should-detect-modules (bool) – Determines if Ant or Maven modules should be detected for all files that contain warnings (default false)
  • healthy (int) – Sunny threshold (optional)
  • unhealthy (int) – Stormy threshold (optional)
  • health-threshold (str) – Threshold priority for health status (‘low’, ‘normal’ or ‘high’, defaulted to ‘low’)
  • thresholds (dict) –

    Mark build as failed or unstable if the number of errors exceeds a threshold. (optional)

    thresholds:
    • unstable (dict)
      unstable:
      • total-all (int)
      • total-high (int)
      • total-normal (int)
      • total-low (int)
      • new-all (int)
      • new-high (int)
      • new-normal (int)
      • new-low (int)
    • failed (dict)
      failed:
      • total-all (int)
      • total-high (int)
      • total-normal (int)
      • total-low (int)
      • new-all (int)
      • new-high (int)
      • new-normal (int)
      • new-low (int)
  • default-encoding (str) – Encoding for parsing or showing files (optional)
  • do-not-resolve-relative-paths (bool) – (default false)
  • dont-compute-new (bool) – If set to false, computes new warnings based on the reference build (default true)
  • use-previous-build-as-reference (bool) – determines whether to always use the previous build as the reference build (default false)
  • use-stable-build-as-reference (bool) – The number of new warnings will be calculated based on the last stable build, allowing reverts of unstable builds where the number of warnings was decreased. (default false)
  • use-delta-values (bool) – If set then the number of new warnings is calculated by subtracting the total number of warnings of the current build from the reference build. (default false)

Example:

publishers:
 - pmd:
    pattern: '**/pmd-result.xml'
    healthy: 0
    unhealthy: 100
    health-threshold: 'high'
    thresholds:
        unstable:
            total-high: 10
        failed:
            total-high: 1

Full example:

publishers:
 - pmd:
    pattern: '**/pmd-result.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
        failed:
            total-all: 90
            total-high: 80
            total-normal: 70
            total-low: 60
    default-encoding: 'utf-8'
post-tasks

Adds support to post build task plugin

Requires the Jenkins Post Build Task plugin.

Parameters:
  • task (dict) – Post build task definition
  • task[matches] (list) – list of matches when to run the task
  • task[matches][*] (dict) – match definition
  • task[matches][*][log-text] (str) – text to match against the log
  • task[matches][*][operator] (str) –

    operator to apply with the next match

    task[matches][*][operator] values (default ‘AND’):
     
    • AND
    • OR
  • task[escalate-status] (bool) – Escalate the task status to the job (default ‘false’)
  • task[run-if-job-successful] (bool) – Run only if the job was successful (default ‘false’)
  • task[script] (str) – Shell script to run (default ‘’)

Example:

publishers:
  - post-tasks:
    - matches:
      - log-text: line to match
        operator: AND
      - log-text: line to match
        operator: OR
      - log-text: line to match
        operator: AND
      escalate-status: true
      run-if-job-successful: true
      script: |
        echo "Here goes the task script"
postbuildscript

Executes additional builders, script or Groovy after the build is complete.

Requires the Jenkins Post Build Script plugin.

Parameters:
  • generic-script (list) –

    Series of Batch/Shell scripts to to run

    generic-script:
    • file-path (str) - Path to Batch/Shell scripts
    • role (str) - Execute scripts on. One of MASTER / SLAVE / BOTH. (default ‘BOTH’)
    • build-on (list) - Build statuses which trigger the scripts. Valid options: SUCCESS / UNSTABLE / FAILURE / NOT_BUILT / ABORTED (default ‘SUCCESS’)
  • groovy-script (list) –

    Paths to Groovy scripts

    groovy-script:
    • file-path (str) - Path to Groovy scripts
    • role (str) - Execute scripts on. One of MASTER / SLAVE / BOTH. (default ‘BOTH’)
    • build-on (list) - Build statuses which trigger the scripts. Valid options: SUCCESS / UNSTABLE / FAILURE / NOT_BUILT / ABORTED (default ‘SUCCESS’)
  • groovy (list) –

    Inline Groovy

    groovy:
    • content (str) - Inline Groovy script.
    • role (str) - Execute scripts on. One of MASTER / SLAVE / BOTH. (default ‘BOTH’)
    • build-on (list) - Build statuses which trigger the scripts. Valid options: SUCCESS / UNSTABLE / FAILURE / NOT_BUILT / ABORTED (default ‘SUCCESS’)
  • builders (list) –

    Execute any number of supported Jenkins builders.

    builders:
    • build-steps (str) - Any supported builders, see Builders.
    • role (str) - Execute scripts on. One of MASTER / SLAVE / BOTH. (default ‘BOTH’)
    • build-on (list) - Build statuses which trigger the scripts. Valid options: SUCCESS / UNSTABLE / FAILURE / NOT_BUILT / ABORTED (default ‘SUCCESS’)
  • mark-unstable-if-failed (bool) – Build will be marked unstable if job will be successfully completed but publishing script will return non zero exit code (default false)

Deprecated Options for versions < 2.0 of plugin:

Parameters:
  • onsuccess (bool) – Deprecated, replaced with script-only-if-succeeded
  • script-only-if-succeeded (bool) – Scripts and builders are run only if the build succeeded (default true)
  • onfailure (bool) – Deprecated, replaced with script-only-if-failed
  • script-only-if-failed (bool) – Scripts and builders are run only if the build failed (default false)
  • execute-on (str) – For matrix projects, scripts can be run after each axis is built (axes), after all axis of the matrix are built (matrix) or after each axis AND the matrix are built (both).

The script-only-if-succeeded and bool script-only-if-failed options are confusing. If you want the post build to always run regardless of the build status, you should set them both to false.

Minimal Example:

publishers:
    - postbuildscript

Full Example:

publishers:
    - postbuildscript:
        mark-unstable-if-failed: true
        generic-script:
            - file-path: '/fakepath/generic'
              role: MASTER
              build-on:
                  - SUCCESS
                  - UNSTABLE
            - file-path: '/fakepath/generic-two'
              role: SLAVE
              build-on:
                  - NOT_BUILT
                  - ABORTED
                  - FAILURE
        groovy-script:
            - file-path: '/fakepath/groovy'
              role: MASTER
              build-on:
                  - SUCCESS
                  - UNSTABLE
            - file-path: '/fakepath/groovy-too'
              role: SLAVE
              build-on:
                  - NOT_BUILT
                  - ABORTED
                  - FAILURE
        groovy:
            - role: MASTER
              build-on:
                  - SUCCESS
                  - UNSTABLE
              content: 'println "Hello world!"'
            - role: SLAVE
              build-on:
                  - NOT_BUILT
                  - ABORTED
                  - FAILURE
              content: |
                  println "Hello world!"
                  println "Multi-line script"

        builders:
            - role: MASTER
              build-on:
                  - SUCCESS
                  - UNSTABLE
              build-steps:
                  - shell: 'echo "Hello world!"'
            - role: SLAVE
              build-on:
                  - NOT_BUILT
                  - ABORTED
                  - FAILURE
              build-steps:
                  - shell: 'echo "Hello world!"'
                  - shell: 'echo "Goodbye world!"'

Example(s) versions < 2.0:

publishers:
    - postbuildscript:
        generic-script:
            - '/tmp/one.sh'
            - '/tmp/two.sh'
        groovy-script:
            - '/tmp/one.groovy'
            - '/tmp/two.groovy'
        groovy:
            - "/** This is some inlined groovy */"
            - "/** Some more inlined groovy */"
        script-only-if-succeeded: False
        script-only-if-failed: True
        mark-unstable-if-failed: True

You can also execute builders:

publishers:
    - postbuildscript:
        builders:
            - shell: 'echo "Shell execution"'
            - ant: 'ant_target'

Run once after the whole matrix (all axes) is built:

publishers:
    - postbuildscript:
        execute-on: 'matrix'
        builders:
            - shell: 'echo "Shell execution"'
publishers-from

Use publishers from another project. Requires the Jenkins Template Project Plugin.

Parameters:project-name (str) – The name of the other project.

Example:

publishers:
  - publishers-from:
      project-name: base-build
rich-text-publisher

This plugin puts custom rich text message to the Build pages and Job main page.

Requires the Jenkins Rich Text Publisher Plugin.

Parameters:
  • stable-text (str) – The stable text (required)
  • unstable-text (str) – The unstable text if different from stable (default ‘’)
  • unstable-as-stable (bool) – The same text block is used for stable and unstable builds (default true)
  • failed-text (str) – The failed text if different from stable (default ‘’)
  • failed-as-stable (bool) – The same text block is used for stable and failed builds (default true)
  • parser-name (str) – HTML, Confluence or WikiText (default ‘WikiText’)

Minimal Example:

publishers:
    - rich-text-publisher:
        stable-text: testing

Full Example:

publishers:
    - rich-text-publisher:
        stable-text: the stable text
        unstable-text: the unstable text
        failed-text: the failed text
        unstable-as-stable: false
        failed-as-stable: false
        parser-name: HTML
robot

Adds support for the Robot Framework Plugin

Requires the Jenkins Robot Framework Plugin.

Parameters:
  • output-path (str) – Path to directory containing robot xml and html files relative to build workspace. (required)
  • log-file-link (str) – Name of log or report file to be linked on jobs front page (default ‘’)
  • report-html (str) – Name of the html file containing robot test report (default ‘report.html’)
  • log-html (str) – Name of the html file containing detailed robot test log (default ‘log.html’)
  • output-xml (str) – Name of the xml file containing robot output (default ‘output.xml’)
  • pass-threshold (str) – Minimum percentage of passed tests to consider the build successful (default 0.0)
  • unstable-threshold (str) – Minimum percentage of passed test to consider the build as not failed (default 0.0)
  • only-critical (bool) – Take only critical tests into account when checking the thresholds (default true)
  • other-files (list) – list other files to archive (default ‘’)
  • archive-output-xml (bool) – Archive output xml file to server (default true)
  • enable-cache (bool) – Enable cache for test results (default true)

Minimal Example:

publishers:
  - robot:
      output-path: reports/robot

Full Example:

publishers:
  - robot:
      output-path: reports/robot
      log-file-link: report.html
      report-html: custom-report.html
      log-html: custom-log.html
      output-xml: custom-output.xml
      pass-threshold: 80.0
      unstable-threshold: 60.0
      only-critical: false
      enable-cache: false
      other-files:
        - extra-file1.html
        - extra-file2.txt
      archive-output-xml: false
rocket

RocketChat notification on build completion, Requires the RocketChat Notifier Plugin.

Parameters:
  • channel (str) – Comma separated list of rooms (e.g. #project) or persons (e.g. @john)
  • abort (bool) – Notify abort (default false)
  • start (bool) – Notify start (default false)
  • success (bool) – Notify success (default false)
  • failure (bool) – Notify failure (default false)
  • repeated-failure (bool) – Notify repeated failure (default false)
  • back-to-normal (bool) – Notify back to normal (default false)
  • not-built (bool) – Notify if not built (default false)
  • unstable (bool) – Notify if unstable (default false)
  • webhook-token (str) – Webhook token for posting messages. Overrides global authentication data and channel
  • commit-info (str) –

    What commit information to include into notification message.

    commit-info values:
     
    • none
    • authors
    • authors-and-titles
  • custom-message (str) – Custom text message (default ‘’)
  • trust-ssl (bool) – Trust RocketChat server certificate, if checked, the SSL certificate will not be checked (default false)
  • build-server (str) – Build Server URL
  • attachments (list) –

    Optional list of attachments

    attachments:
    • title (str) Attachment title (required)
    • title-link (str)
    • title-link-download (bool)
    • color (str)
    • text (str)
    • collapsed (bool)
    • message-link (str)
    • author-name (str)
    • author-link (str)
    • author-icon (str)
    • thumb (str) Thumb URL
    • image (str) Image URL
    • audio (str) Audio URL
    • video (str) Video URL

Minimal example using defaults:

publishers:
- rocket:
    channel: ''

Full example:

publishers:
- rocket:
    channel: '#channel,@user'
    abort: true
    back-to-normal: true
    failure: true
    not-built: true
    repeated-failure: true
    start: true
    success: true
    unstable: true
    trust-ssl: true
    build-server: 'http://localhost:8080/'
    webhook-token: 'non-secure-webhook-token'
    webhook-token-credential-id: 'secret-text-id'
    commit-info: 'authors-and-titles'
    include-custom-message: true
    include-test-log: true
    include-test-summary: true
    custom-message: 'Hello World!'
    raw-message: true
    attachments:
        - title: The Black
        - title: The Red
          color: red
        - title: The Blue
          color: blue
          text: The navy blue
        - title: The White
          title-link: title_link
          title-link-download: true
          message-link: message_link
          color: white
          text: 'All&all'
          collapsed: true
          author-name: author_name
          author-link: author_link
          author-icon: author_icon
          thumb: 'http://hostname/thumb.png'
          image: 'http://hostname/image.jpg'
          audio: 'http://hostname/audio.mp3'
          video: 'http://hostname/video.avi'
ruby-metrics

Rcov plugin parses rcov html report files and shows it in Jenkins with a trend graph.

Requires the Jenkins Ruby metrics plugin.

Parameters:
  • report-dir (str) – Relative path to the coverage report directory
  • targets (dict) –
    targets:(total-coverage, code-coverage)
    • healthy (int): Healthy threshold
    • unhealthy (int): Unhealthy threshold
    • unstable (int): Unstable threshold

Example:

publishers:
  - ruby-metrics:
      report-dir: "coverage/rcov"
      target:
        - total-coverage:
             healthy: 80
             unhealthy: 0
             unstable: 0
        - code-coverage:
             healthy: 80
             unhealthy: 0
             unstable: 0
rundeck

Trigger a rundeck job when the build is complete.

Requires the Jenkins RunDeck Plugin.

Parameters:
  • job-id (str) – The RunDeck job identifier. (required) This could be: * ID example : “42” * UUID example : “2027ce89-7924-4ecf-a963-30090ada834f” * reference, in the format : “project:group/job”
  • options (str) – List of options for the Rundeck job, in Java-Properties format: key=value (default “”)
  • node-filters (str) – List of filters to optionally filter the nodes included by the job. (default “”)
  • tag (str) – Used for on-demand job scheduling on rundeck: if a tag is specified, the job will only execute if the given tag is present in the SCM changelog. (default “”)
  • wait-for-rundeck (bool) – If true Jenkins will wait for the job to complete, if false the job will be started and Jenkins will move on. (default false)
  • fail-the-build (bool) – If true a RunDeck job failure will cause the Jenkins build to fail. (default false)

Example:

publishers:
 - rundeck:
    job-id: testproject:group/jobname

Full example:

publishers:
 - rundeck:
    job-id: testproject:group/jobname
    options: |
      STUFF_FOR_THE_JOB=stuff
      ANOTHER_VAR=more_stuff
    node-filters: dev
    tag: master
    wait-for-rundeck: true
    fail-the-build: true
s3

Upload build artifacts to Amazon S3.

Requires the Jenkins S3 plugin.

Parameters:
  • s3-profile (str) – Globally-defined S3 profile to use
  • dont-wait-for-concurrent-builds (bool) – Don’t wait for completion of concurrent builds before publishing to S3 (default false)
  • entries (list) –
    entries:
    • destination-bucket (str) - Destination S3 bucket
    • source-files (str) - Source files (Ant glob syntax)
    • storage-class (str) - S3 storage class; one of “STANDARD” or “REDUCED_REDUNDANCY”
    • bucket-region (str) - S3 bucket region (capitalized with underscores)
    • upload-on-failure (bool) - Upload files even if the build failed (default false)
    • upload-from-slave (bool) - Perform the upload directly from the Jenkins slave rather than the master node. (default false)
    • managed-artifacts (bool) - Let Jenkins fully manage the published artifacts, similar to when artifacts are published to the Jenkins master. (default false)
    • s3-encryption (bool) - Use S3 AES-256 server side encryption support. (default false)
    • flatten (bool) - Ignore the directory structure of the artifacts in the source project and copy all matching artifacts directly into the specified bucket. (default false)
  • metadata-tags (list) –
    metadata-tags:
    • key Metadata key for files from this build. It will be prefixed by “x-amz-meta-” when uploaded to S3. Can contain macros (e.g. environment variables).
    • value Metadata value associated with the key. Can contain macros.

Example:

publishers:
  - s3:
      s3-profile: banana
      dont-wait-for-concurrent-builds: true
      entries:
        - destination-bucket: herp-derp
          source-files: 'bargle_${BUILD_ID}.tgz'
          storage-class: STANDARD
          bucket-region: US_EAST_1
          upload-on-failure: false
          upload-from-slave: true
          managed-artifacts: true
          s3-encryption: true
          flatten: true
      metadata-tags:
        - key: warbl ${garbl}
          value: herp derp weevils
        - key: hurrdurr
          value: wharrgarbl blee ${FANCY_VARIABLE}
scan-build

Publishes results from the Clang scan-build static analyzer.

The scan-build report has to be generated in the directory ${WORKSPACE}/clangScanBuildReports for the publisher to find it.

Requires the Jenkins Clang Scan-Build Plugin.

Parameters:
  • mark-unstable (bool) – Mark build as unstable if the number of bugs exceeds a threshold (default false)
  • threshold (int) – Threshold for marking builds as unstable (default 0)
  • exclude-paths (string) – Comma separated paths to exclude from reports (>=1.5) (default ‘’)
  • report-folder (string) – Folder where generated reports are located (>=1.7) (default ‘clangScanBuildReports’)

Full Example:

publishers:
  - scan-build:
      mark-unstable: true
      threshold: 50
      exclude-paths: external-lib
      report-folder: scan-build-report

Minimal Example:

publishers:
  - scan-build
scoverage

Publish scoverage results as a trend graph. Requires the Jenkins Scoverage Plugin.

Parameters:
  • report-directory (str) – This is a directory that specifies the locations where the xml scoverage report is generated (required)
  • report-file (str) – This is a file name that is given to the xml scoverage report (required)

Example:

publishers:
  - scoverage:
      report-directory: target/scala-2.10/scoverage-report/
      report-file: scoverage.xml
scp

Upload files via SCP Requires the Jenkins SCP Plugin.

When writing a publisher macro, it is important to keep in mind that Jenkins uses Ant’s SCP Task via the Jenkins SCP Plugin which relies on FileSet and DirSet patterns. The relevant piece of documentation is excerpted below:

Source points to files which will be uploaded. You can use ant includes syntax, eg. folder/dist/*.jar. Path is constructed from workspace root. Note that you cannot point files outside the workspace directory. For example providing: ../myfile.txt won’t work… Destination points to destination folder on remote site. It will be created if doesn’t exists and relative to root repository path. You can define multiple blocks of source/destination pairs.

This means that absolute paths, e.g., /var/log/** will not work and will fail to compile. All paths need to be relative to the directory that the publisher runs and the paths have to be contained inside of that directory. The relative working directory is usually:

/home/jenkins/workspace/${JOB_NAME}
Parameters:
  • site (str) – name of the scp site (required)
  • target (str) – destination directory (required)
  • source (str) – source path specifier (default ‘’)
  • keep-hierarchy (bool) – keep the file hierarchy when uploading (default false)
  • copy-after-failure (bool) – copy files even if the job fails (default false)
  • copy-console (bool) – copy the console log (default false); if specified, omit ‘source’

Example:

publishers:
  - scp:
      site: 'example.com'
      files:
        - target: 'dest/dir'
          source: 'base/source/dir/**'
          keep-hierarchy: true
          copy-after-failure: true
shining-panda

Publish coverage.py results. Requires the Jenkins ShiningPanda Plugin.

Parameters:html-reports-directory (str) – path to coverage.py html results (optional)

Example:

publishers:
  - shining-panda:
      html-reports-directory: foo/bar/coveragepy_html_report/
sitemonitor

This plugin checks the availability of an url.

It requires the sitemonitor plugin.

Parameters:sites (list) – List of URLs to check

Minimal Example:

publishers:
  - sitemonitor

Full Example:

publishers:
  - sitemonitor:
      sites:
        - url: http://foo.example.com
        - url: http://bar.example.com:8080/
slack

Publisher that sends slack notifications on job events.

Requires the Jenkins Slack Plugin

When using Slack Plugin version < 2.0, Slack Plugin itself requires a publisher as well as properties please note that you have to create those too. When using Slack Plugin version >= 2.0, you should only configure the publisher.

For backward compatibility, the publisher needs to query version of the Slack Plugin. Hence the query_plugins_info parameter shouldn’t be set to False in the jenkins section of the configuration file.

Parameters:
  • team-domain (str) – Your team’s domain at slack. (default ‘’)
  • auth-token (str) – The integration token to be used when sending notifications. (default ‘’)
  • auth-token-id (str) – Allows credentials to be stored in Jenkins. (default ‘’)
  • build-server-url (str) – Specify the URL for your server installation. (default ‘/’)
  • room (str) – A comma separated list of rooms / channels to post the notifications to. (default ‘’)
  • notify-start (bool) – Send notification when the job starts (>=2.0). (default false)
  • notify-success (bool) – Send notification on success (>=2.0). (default false)
  • notify-aborted (bool) – Send notification when job is aborted (>=2.0). (default false)
  • notify-not-built (bool) – Send notification when job set to NOT_BUILT status (>=2.0). (default false)
  • notify-unstable (bool) – Send notification when job becomes unstable (>=2.0). (default false)
  • notify-failure (bool) – Send notification when job fails for the first time (previous build was a success) (>=2.0). (default false)
  • notify-every-failure (bool) – Send notification everytime a job fails (>=2.23). (default false)
  • notify-back-to-normal (bool) – Send notification when job is succeeding again after being unstable or failed (>=2.0). (default false)
  • notify-repeated-failure (bool) – Send notification when job fails successively (previous build was also a failure) (>=2.0). (default false)
  • notify-regression (bool) – Send notification when number of failed tests increased or the failed tests are different than previous build (>=2.2). (default false)
  • include-failed-tests (bool) – includes all failed tests when some tests failed. does nothing if no failed tests were found (>=2.2). (default false)
  • include-test-summary (bool) – Include the test summary (>=2.0). (default false)
  • commit-info-choice (str) – What commit information to include into notification message, “NONE” includes nothing about commits, “AUTHORS” includes commit list with authors only, and “AUTHORS_AND_TITLES” includes commit list with authors and titles (>=2.0). (default “NONE”)
  • include-custom-message (bool) – Include a custom message into the notification (>=2.0). (default false)
  • custom-message (str) – Custom message to be included (>=2.0). (default ‘’)
  • auth-token-credential-id (str) – The ID for the integration token from the Credentials plugin to be used to send notifications to Slack. (>=2.1) (default ‘’)
  • bot-user (bool) – This option indicates the token belongs to a bot user in Slack. (>=2.2) (default False)
  • base-url (str) – Your Slack compatible Base URL. bot-user is not supported with Base URL. (>=2.2) (default ‘’)

Example (version < 2.0):

publishers:
  - slack:
      room: '#builds'
      team-domain: 'teamname'
      auth-token: 'yourauthtoken'
      auth-token-id: 'yourauthtokenid'

Minimal example (version >= 2.0):

publishers:
  - slack

Full example (version >= 2.0):

publishers:
  - slack:
      team-domain: 'teamname'
      auth-token: 'yourauthtoken'
      auth-token-id: 'yourauthtokenid'
      build-server-url: 'http://localhost:8081'
      room: '#builds'
      notify-start: True
      notify-success: True
      notify-aborted: True
      notify-not-built: True
      notify-unstable: True
      notify-failure: True
      notify-every-failure: True
      notify-back-to-normal: True
      notify-repeated-failure: True
      notify-regression: True
      include-test-summary: True
      include-failed-tests: True
      commit-info-choice: 'AUTHORS_AND_TITLES'
      include-custom-message: True
      custom-message: 'A custom message.'
      auth-token-credential-id: yourauthtoken
      bot-user: True
      base-url: https://hooks.slack.com/services/
sloccount

Generates the trend report for SLOCCount

Requires the Jenkins SLOCCount Plugin.

Parameters:
  • report-files (str) – Setting that specifies the generated raw SLOCCount report files. Be sure not to include any non-report files into this pattern. The report files must have been generated by sloccount using the “–wide –details” options. (default ‘**/sloccount.sc’)
  • charset (str) – The character encoding to be used to read the SLOCCount result files. (default ‘UTF-8’)
  • builds-in-graph (int) – Maximal number of last successful builds, that are displayed in the trend graphs. (default 0)
  • comment-is-code (bool) – This option is considered only in the cloc report parser and is ignored in the SLOCCount one. (default false)
  • ignore-build-failure (bool) – Try to process the report files even if the build is not successful. (default false)

Minimal Example:

publishers:
  - sloccount

Full Example:

publishers:
  - sloccount:
      report-files: sloccount.sc
      charset: latin-1
      builds-in-graph: 1
      comment-is-code: true
      ignore-build-failure: true
sonar

Sonar plugin support. Requires the Jenkins Sonar Plugin.

Parameters:
  • installation-name (str) – name of the Sonar instance to use (optional)
  • jdk (str) – JDK to use (inherited from the job if omitted). (optional)
  • branch (str) – branch onto which the analysis will be posted (default ‘’)
  • language (str) – source code language (default ‘’)
  • root-pom (str) – Root POM (default ‘pom.xml’)
  • private-maven-repo (bool) – If true, use private Maven repository. (default false)
  • maven-opts (str) – options given to maven (default ‘’)
  • additional-properties (str) – sonar analysis parameters (default ‘’)
  • maven-installation-name (str) – the name of the Maven installation to use (optional)
  • skip-global-triggers (dict) –
    Triggers:
    • skip-when-scm-change (bool): skip analysis when build triggered by scm (default false)
    • skip-when-upstream-build (bool): skip analysis when build triggered by an upstream build (default false)
    • skip-when-envvar-defined (str): skip analysis when the specified environment variable is set to true (default ‘’)
  • settings (str) – Path to use as user settings.xml. It is possible to provide a ConfigFileProvider settings file, see Example below. (optional)
  • global-settings (str) – Path to use as global settings.xml. It is possible to provide a ConfigFileProvider settings file, see Example below. (optional)

Requires the Jenkins Config File Provider Plugin for the Config File Provider “settings” and “global-settings” config.

This publisher supports the post-build action exposed by the Jenkins Sonar Plugin, which is triggering a Sonar Analysis with Maven.

Minimal Example:

publishers:
  - sonar

Full Example:

publishers:
  - sonar:
      installation-name: MySonar
      jdk: MyJdk
      branch: myBranch
      language: java
      root-pom: mypom.xml
      private-maven-repo: true
      maven-installation-name: Maven3.3.3
      maven-opts: -DskipTests
      additional-properties: -DsonarHostURL=http://example.com/
      skip-global-triggers:
        skip-when-scm-change: true
        skip-when-upstream-build: true
        skip-when-envvar-defined: SKIP_SONAR
      settings: org.jenkinsci.plugins.configfiles.maven.MavenSettingsConfig0123456789012
      global-settings: org.jenkinsci.plugins.configfiles.maven.GlobalMavenSettingsConfig0123456789012
sounds

Play audio clips locally through sound hardware, remotely by piping them through an operating system command, or simultaneously through all browsers on a Jenkins page.

Requires the Jenkins Jenkins Sounds plugin

Parameters:
  • success (dict) –

    Play on success

    success:
    • sound (str) - Sound name
    • from (list) - Previous build result (default is all)
      from values:
      • success
      • unstable
      • failure
      • not_build
      • aborted
  • unstable (dict) – Play on unstable. Specifying sound and conditions see above.
  • failure (dict) – Play on failure. Specifying sound and conditions see above.
  • not_build (dict) – Play on not build. Specifying sound and conditions see above.
  • aborted (dict) – Play on aborted. Specifying sound and conditions see above.

Minimal example using defaults:

publishers:
- sounds:
    failure:
      sound: EXPLODE

Full example:

publishers:
- sounds:
    failure:
      sound: EXPLODE
      from:
        - not_build
        - aborted
    success:
      sound: Yahoo.Yodel
      from:
        - unstable
        - success
        - failure
ssh

Upload files via SCP. Requires the Jenkins Publish over SSH Plugin.

Parameters:
  • site (str) – name of the ssh site
  • target (str) – destination directory
  • target-is-date-format (bool) – whether target is a date format. If true, raw text should be quoted (default false)
  • clean-remote (bool) – should the remote directory be deleted before transferring files (default false)
  • source (str) – source path specifier
  • command (str) – a command to execute on the remote server (optional)
  • timeout (int) – timeout in milliseconds for the Exec command (optional)
  • use-pty (bool) – run the exec command in pseudo TTY (default false)
  • excludes (str) – excluded file pattern (optional)
  • remove-prefix (str) – prefix to remove from uploaded file paths (optional)
  • fail-on-error (bool) – fail the build if an error occurs (default false).
  • always-publish-from-master (bool) – transfer the files through the master before being sent to the remote server (defaults false)
  • flatten (bool) – only create files on the server, don’t create directories (default false).
  • verbose (bool) – adds lots of detail useful for debug to the console but generally should be left off (default false)
  • retries (int) – the number of times to retry this server in the event of failure (optional)
  • retry-delay (int) – the time to wait, in milliseconds, before attempting another transfer (default 10000)

Minimal Example:

publishers:
  - ssh:
      site: 'server.example.com'
      target: 'dest/dir/'
      source: 'base/source/dir/**'

Full Example:

publishers:
  - ssh:
      site: 'server.example.com'
      target: "'dest/dir/'yyyyMMddHHmmss"
      target-is-date-format: true
      clean-remote: true
      source: 'base/source/dir/**'
      command: 'rm -r jenkins_$BUILD_NUMBER'
      timeout: 1800000
      use-pty: true
      excludes: '**/*.excludedfiletype'
      remove-prefix: 'base/source/dir'
      fail-on-error: true
      always-publish-from-master: true
      flatten: true
      verbose: true
      retries: 99
      retry-delay: 12345
stash

This plugin will configure the Jenkins Stash Notifier plugin to notify Atlassian Stash after job completes.

Requires the Jenkins StashNotifier Plugin.

Parameters:
  • url (string) – Base url of Stash Server (default “”)
  • username (string) – Username of Stash Server (default “”)
  • password (string) – Password of Stash Server (default “”)
  • credentials-id (string) – Credentials of Stash Server (optional)
  • ignore-ssl (bool) – Ignore unverified SSL certificate (default false)
  • commit-sha1 (string) – Commit SHA1 to notify (default “”)
  • include-build-number (bool) – Include build number in key (default false)

Minimal Example:

publishers:
  - stash

Full Example:

publishers:
  - stash:
      url: "https://mystash"
      username: a
      password: b
      ignore-ssl: true
      commit-sha1: c
      include-build-number: true
tap

Adds support to TAP test result files

Requires the Jenkins TAP Plugin.

Parameters:
  • results (str) – TAP test result files (required)
  • fail-if-no-results (bool) – Fail if no result (default false)
  • failed-tests-mark-build-as-failure (bool) – Mark build as failure if test fails (default false)
  • output-tap-to-console (bool) – Output tap to console (default true)
  • enable-subtests (bool) – Enable subtests (default true)
  • discard-old-reports (bool) – Discard old reports (default false)
  • todo-is-failure (bool) – Handle TODO’s as failures (default true)
  • include-comment-diagnostics (bool) – Include comment diagnostics (#) in the results table (>=1.12) (default false)
  • validate-tests (bool) – Validate number of tests (>=1.13) (default false)
  • plan-required (bool) – TAP plan required? (>=1.17) (default true)
  • verbose (bool) – Print a message for each TAP stream file (>=1.17) (default true)
  • show-only-failures (bool) – show only test failures (>=1.17) (default false)

Full Example:

publishers:
  - tap:
      results: puiparts.tap
      fail-if-no-results: true
      failed-tests-mark-build-as-failure: true
      output-tap-to-console: false
      enable-subtests: false
      discard-old-reports: true
      todo-is-failure: false
      include-comment-diagnostics: true
      validate-tests: true
      plan-required: false
      verbose: false
      show-only-failures: true

Minimal Example:

publishers:
  - tap:
      results: puiparts.tap
tasks

Scans the workspace files for open tasks and generates a trend report. Requires the Jenkins Task Scanner Plugin.

Parameters:
  • files-to-scan (list) – Fileset includes setting that specifies the workspace files to scan for tasks, such as **/*.java. Basedir of the fileset is the workspace root. (default ‘**/*.java’)
  • files-to-exclude (list) – Fileset excludes setting that specifies the workspace files to exclude scanning for tasks, such as library source files. Basedir of the fileset is the workspace root. (default ‘’)
  • tasks-tags-high (list) – Tags identifiers for high priority that should be looked for in the workspace files. Only alphanumerical characters are allowed as tags as these strings are pasted into a regular expression. (default ‘’)
  • tasks-tags-normal (list) – Tags identifiers for normal priority that should be looked for in the workspace files. Only alphanumerical characters are allowed as tags as these strings are pasted into a regular expression. (default ‘’)
  • tasks-tags-low (list) – Tags identifiers for low priority that should be looked for in the workspace files. Only alphanumerical characters are allowed as tags as these strings are pasted into a regular expression. (default ‘’)
  • ignore-case (bool) – Ignore the case of the the tag identifiers. (default false)
  • regular-expression (bool) – Treat the tag identifiers as regular expression. Note that the regular expression must contain two capturing groups, the first one is interpreted as tag name, the second one as message. An example of such a regular expression would be ^.*(TODO(?:[0-9]*))(.*)$. (default false)
  • run-always (bool) – By default, this plug-in runs only for stable or unstable builds, but not for failed builds. If this plug-in should run even for failed builds then activate this check box. (default false)
  • detect-module (bool) – Determines if Ant or Maven modules should be detected for all files that contain warnings. Activating this option may increase your build time since the detector scans the whole workspace for build.xml or pom.xml files in order to assign the correct module names. (default false)
  • health-thresholds-100 (int) – Configure the upper thresholds for the build health. If left empty then no health report is created. If the actual number of warnings is between the provided thresholds then the build health is interpolated. (default ‘’)
  • health-thresholds-0 (str) – Configure the lower thresholds for the build health. If left empty then no health report is created. If the actual number of warnings is between the provided thresholds then the build health is interpolated. (default ‘’)
  • health-priorities (str) – Determines which warning priorities should be considered when evaluating the build health. Can be high (only priority high), normal (priorities high and normal) or low (all priorities). (default ‘low’)
  • status-thresholds (dict) –

    Configure the build status and health. If the number of total or new warnings is greater than one of these thresholds then a build is considered as unstable or failed, respectively. I.e., a value of 0 means that the build status is changed if there is at least one warning found. Leave this field empty if the state of the build should not depend on the number of warnings. Note that for new warnings, you need to enable the next option (compute-new-warnings).

    status-thresholds:
     
    • unstable-total-all (str): Total number for all priorities, unstable threshold (default ‘’)
    • unstable-total-high (str): Total number for high priority, unstable threshold (default ‘’)
    • unstable-total-normal (str): Total number for normal priority, unstable threshold (default ‘’)
    • unstable-total-low (str): Total number for low priority, unstable threshold (default ‘’)
    • failed-total-all (str): Total number for all priorities, failure threshold (default ‘’)
    • failed-total-high (str): Total number for high priority, failure threshold (default ‘’)
    • failed-total-normal (str): Total number for normal priority, failure threshold (default ‘’)
    • failed-total-low (str): Total number for low priority, failure threshold (default ‘’)
    • unstable-new-all (str): New number for all priorities, unstable threshold (default ‘’)
    • unstable-new-high (str): New number for high priority, unstable threshold (default ‘’)
    • unstable-new-normal (str): New number for normal priority, unstable threshold (default ‘’)
    • unstable-new-low (str): New number for low priority, unstable threshold (default ‘’)
    • failed-new-all (str): New number for all priorities, failure threshold (default ‘’)
    • failed-new-high (str): New number for high priority, failure threshold (default ‘’)
    • failed-new-normal (str): New number for normal priority, failure threshold (default ‘’)
    • failed-new-low (str): New number for low priority, failure threshold (default ‘’)
  • compute-new-warnings (bool) – Compute new warnings (based on the last successful build unless another reference build is chosen below). (default false)
  • use-delta (bool) – If set the number of new warnings is computed by subtracting the total number of warnings of the reference build from the total number of warnings of the current build. This may lead to wrong results if you have both fixed and new warnings in a build. If unset the number of new warnings is computed by a more sophisticated algorithm: instead of using totals an asymmetric set difference of the warnings in the current build and the warnings in the reference build is used. This will find all new warnings even if the number of total warnings has decreased. Note that sometimes false positives will be reported due to minor changes in a warning (e.g. refactoring of variables or method names). It is recommended to uncheck this option in order to get the most accurate results for new warnings. Depends on compute-new-warnings option. (default false)
  • use-prev-build-as-ref (bool) – If set the number of new warnings will always be computed based on the previous build, even if that build is unstable (due to a violated warning threshold). Otherwise the last build that did not violate any given threshold will be used as reference. It is recommended to uncheck this option if the plug-in should ensure that all new warnings will be finally fixed in subsequent builds. Depends on compute-new-warnings option. (default false)
  • only-use-stable-as-ref (bool) – Use the last stable build as the reference to compute the number of new warnings against. This allows you to ignore interim unstable builds for which the number of warnings decreased. Note that the last stable build is evaluated only by inspecting the unit test failures. The static analysis results are not considered. Depends on compute-new-warnings option. (default false)
  • default-encoding (str) – Default encoding when parsing or showing files. Leave this field empty to use the default encoding of the platform. (default ‘’)

Minimal Example:

publishers:
  - tasks

Full Example:

publishers:
  - tasks:
      files-to-scan:
        - "**/*.java"
        - "**/*.c"
      files-to-exclude:
        - "specific/file.java"
      tasks-tags-high:
        - "FIXME"
        - "XXX"
      tasks-tags-normal:
        - "TODO"
      tasks-tags-low:
        - "NICETOHAVE"
      ignore-case: false
      regular-expression: false
      run-always: false
      detect-module: false
      health-thresholds-100: 100
      health-thresholds-0: 0
      health-priorities: 'low'
      status-thresholds:
        unstable-total-all: 0
        unstable-total-high: 0
        unstable-total-normal: 0
        unstable-total-low: 0
        failed-total-all: 0
        failed-total-high: 0
        failed-total-normal: 0
        failed-total-low: 0
        unstable-new-all: 0
        unstable-new-high: 0
        unstable-new-normal: 0
        unstable-new-low: 0
        failed-new-all: 0
        failed-new-high: 0
        failed-new-normal: 0
        failed-new-low: 0
      compute-new-warnings: false
      use-delta: false
      use-prev-build-as-ref: false
      only-use-stable-as-ref: false
      default-encoding: "UTF-8"
test-fairy

This plugin helps you to upload Android APKs or iOS IPA files to www.testfairy.com.

Requires the Jenkins Test Fairy Plugin.

Parameters:platform (str) – Select platform to upload to, android or ios (required)

Android Only:

Parameters:
  • proguard-file (str) – Path to Proguard file. Path of mapping.txt from your proguard output directory. (default ‘’)
  • storepass (str) – Password for the keystore (default android)
  • alias (str) – alias for key (default androiddebugkey)
  • keypass (str) – password for the key (default ‘’)
  • keystorepath (str) – Path to Keystore file (required)

IOS Only:

Parameters:dSYM-file (str) – Path to .dSYM.zip file (default ‘’)

All:

Parameters:
  • apikey (str) – TestFairy API_KEY. Find it in your TestFairy account settings (required)
  • appfile (str) – Path to App file (.apk) or (.ipa). For example: $WORKSPACE/[YOUR_FILE_NAME].apk or full path to the apk file. (required)
  • tester-groups (str) – Tester groups to notify (default ‘’)
  • notify-testers (bool) – Send email with changelogs to testers (default false)
  • autoupdate (bool) – Automatic update (default false)
  • max-duration (str) –

    Duration of the session (default 10m)

    max-duration values:
     
    • 10m
    • 60m
    • 300m
    • 1440m
  • record-on-background (bool) – Record on background (default false)
  • data-only-wifi (bool) – Record data only in wifi (default false)
  • video-enabled (bool) – Record video (default true)
  • screenshot-interval (int) –

    Time interval between screenshots (default 1)

    screenshot-interval values:
     
    • 1
    • 2
    • 5
  • video-quality (str) –

    Video quality (default high)

    video-quality values:
     
    • high
    • medium
    • low
  • cpu (bool) – Enable CPU metrics (default true)
  • memory (bool) – Enable memory metrics (default true)
  • logs (bool) – Enable logs metrics (default true)
  • network (bool) – Enable network metrics (default false)
  • phone-signal (bool) – Enable phone signal metrics (default false)
  • wifi (bool) – Enable wifi metrics (default false)
  • gps (bool) – Enable gps metrics (default false)
  • battery (bool) – Enable battery metrics (default false)
  • opengl (bool) – Enable opengl metrics (default false)

Example:

publishers:
  - test-fairy:
      platform: android
      apikey: apikey
      appfile: /tmp/appfile.apk
      keystorepath: /tmp/keystorefile
publishers:
  - test-fairy:
      platform: android
      apikey: apikey
      appfile: /tmp/appfile.apk
      proguard-file: /tmp/proguardfile
      keystorepath: /tmp/keystorefile
      storepass: android
      alias: androiddebugkey
      keypass: keypass
      tester-groups: testergroups
      notify-testers: true
      autoupdate: true
publishers:
  - test-fairy:
      platform: ios
      apikey: apikey
      appfile: /tmp/appfile.ipa
publishers:
  - test-fairy:
      platform: ios
      apikey: apikey
      appfile: /tmp/appfile.ipa
      dSYM-file: /tmp/dsym.zip
      tester-groups: testergroups
      notify-testers: true
      autoupdate: true
testng

This plugin publishes TestNG test reports.

Requires the Jenkins TestNG Results Plugin.

Parameters:
  • pattern (str) – filename pattern to locate the TestNG XML report files (required)
  • escape-test-description (bool) – escapes the description string associated with the test method while displaying test method details (default true)
  • escape-exception-msg (bool) – escapes the test method’s exception messages. (default true)
  • fail-on-failed-test-config (bool) – Allows for a distinction between failing tests and failing configuration methods (>=1.10) (default false)
  • show-failed-builds (bool) – include results from failed builds in the trend graph (>=1.6) (default false)
  • unstable-skips (int) – Build is marked UNSTABLE if the number/percentage of skipped tests exceeds the specified threshold (>=1.11) (default 100)
  • unstable-fails (int) – Build is marked UNSTABLE if the number/percentage of failed tests exceeds the specified threshold (>=1.11) (default 0)
  • failed-skips (int) – Build is marked FAILURE if the number/percentage of skipped tests exceeds the specified threshold (>=1.11) (default 100)
  • failed-fails (int) – Build is marked FAILURE if the number/percentage of failed tests exceeds the specified threshold (>=1.11) (default 100)
  • threshold-mode (str) – Interpret threshold as number of tests or percentage of tests (>=1.11) (default percentage)

Full Example:

publishers:
    - testng:
        pattern: "**/testng-results.xml"
        escape-test-description: false
        escape-exception-msg: false
        fail-on-failed-test-config: true
        show-failed-builds: true
        unstable-skips: 50
        unstable-fails: 25
        failed-skips: 75
        failed-fails: 66
        threshold-mode: number

Minimal Example:

publishers:
  - testng:
      pattern: "**/testng-results.xml"
testselector

This plugin allows you to choose specific tests you want to run.

Requires the Jenkins Tests Selector Plugin.

Parameters:
  • name (str) – Environment variable in which selected tests are saved (required)
  • description (str) – Description (default “”)
  • properties-file (str) – Contain all your tests (required)
  • enable-field (str) – Imply if the test is enabled or not (default “”)
  • groupby (str) – Plugin will group the tests by (default “”)
  • field-sperator (str) – Separate between the fields in the tests tree (default “”)
  • show-fields (str) – Shown in the tests tree (default “”)
  • multiplicity-field (str) – Number of times the test should run (default “”)

Example:

publishers:
  - testselector:
      name: tests
      description: integration
      properties-file: example.properties
      enable-field: enabled
      groupby: testgroup
      field-separator: .
      show-fields: testsuite,testcase
      multiplicity-field: multiplicity
text-finder

This plugin lets you search keywords in the files you specified and additionally check build status

Requires the Jenkins Text-finder Plugin.

Parameters:
  • regexp (str) – Specify a regular expression (required)
  • fileset (str) – Specify the path to search (optional)
  • also-check-console-output (bool) – Search the console output (default false)
  • succeed-if-found (bool) – Force a build to succeed if a string was found (default false)
  • unstable-if-found (bool) – Set build unstable instead of failing the build (default false)
  • not-built-if-found (bool) – Set build to “Not Built” instead of failing the build (default false)

Example:

publishers:
  - text-finder:
      regexp: "some string"
      fileset: "file.txt"
      also-check-console-output: true
      succeed-if-found: false
      unstable-if-found: false
      not-built-if-found: false
trigger

Trigger non-parametrised builds of other jobs.

Parameters:
  • project (str) – name of the job to trigger
  • threshold (str) – when to trigger the other job (default ‘SUCCESS’), alternatives: SUCCESS, UNSTABLE, FAILURE

Example:

publishers:
  - trigger:
      project: other_job
      threshold: SUCCESS
trigger-parameterized-builds

Trigger parameterized builds of other jobs. Requires the Jenkins Parameterized Trigger Plugin.

Use of the node-label-name or node-label parameters requires the Jenkins NodeLabel Parameter Plugin. Note: ‘node-parameters’ overrides the Node that the triggered project is tied to.

Parameters:
  • project (list) – list the jobs to trigger, will generate comma-separated string containing the named jobs.
  • predefined-parameters (str) – parameters to pass to the other job (optional)
  • current-parameters (bool) – Whether to include the parameters passed to the current build to the triggered job (optional)
  • node-parameters (bool) – Use the same Node for the triggered builds that was used for this build. (optional)
  • svn-revision (bool) – Pass svn revision to the triggered job (optional)
  • include-upstream (bool) – Include/pass through Upstream SVN Revisons. Only valid when ‘svn-revision’ is true. (default false)
  • git-revision (dict) –

    Passes git revision to the triggered job (optional).

    • combine-queued-commits (bool): Whether to combine queued git hashes or not (default false)
  • combine-queued-commits (bool) –

    Combine Queued git hashes. Only valid when ‘git-revision’ is true. (default false)

    Deprecated since version 1.5.0: Please use combine-queued-commits under the git-revision argument instead.

  • boolean-parameters (dict) – Pass boolean parameters to the downstream jobs. Specify the name and boolean value mapping of the parameters. (optional)
  • condition (str) – when to trigger the other job. Can be: ‘SUCCESS’, ‘UNSTABLE’, ‘FAILED_OR_BETTER’, ‘UNSTABLE_OR_BETTER’, ‘UNSTABLE_OR_WORSE’, ‘FAILED’, ‘ALWAYS’. (default ‘ALWAYS’)
  • property-file (str) – Use properties from file (optional)
  • fail-on-missing (bool) – Blocks the triggering of the downstream jobs if any of the property files are not found in the workspace. Only valid when ‘property-file’ is specified. (default ‘False’)
  • trigger-from-child-projects (bool) – Trigger build from child projects. Used for matrix projects. (default ‘False’)
  • use-matrix-child-files (bool) – Use files in workspaces of child builds (default ‘False’)
  • matrix-child-combination-filter (str) – A Groovy expression to filter the child builds to look in for files
  • only-exact-matrix-child-runs (bool) – Use only child builds triggered exactly by the parent.
  • file-encoding (str) – Encoding of contents of the files. If not specified, default encoding of the platform is used. Only valid when ‘property-file’ is specified. (optional)
  • trigger-with-no-params (bool) – Trigger a build even when there are currently no parameters defined (default ‘False’)
  • restrict-matrix-project (str) – Filter that restricts the subset of the combinations that the downstream project will run (optional)
  • node-label-name (str) – Specify the Name for the NodeLabel parameter. (optional)
  • node-label (str) – Specify the Node for the NodeLabel parameter. (optional)

Example:

publishers:
  - trigger-parameterized-builds:
    - project:
        - other_job
        - foo
        - bar
      predefined-parameters: |
        foo=bar
        bar=foo
    - project: other_job1, other_job2
      predefined-parameters: BUILD_NUM=${BUILD_NUMBER}
      git-revision: true
      property-file: version.prop
      fail-on-missing: true
    - project: yet_another_job
      predefined-parameters: foo=bar
      git-revision:
        combine-queued-commits: true
      restrict-matrix-project: label=="x86"
    - project: yet_another_job_2
      node-label-name: foo
    - project: yet_another_job_3
      node-label: node-label-foo || node-label-bar
    - project: 'test-project-same-node'
      node-parameters: true
      current-parameters: true
publishers:
  - trigger-parameterized-builds:
    - project:
        - other_job
        - foo
        - bar
      boolean-parameters:
          p1: true
          p2: false
      svn-revision: true
      include-upstream: true
      git-revision: true
      combine-queued-commits: true
      property-file: version.prop
      file-encoding: UTF-8
valgrind

This plugin publishes Valgrind Memcheck XML results.

Requires the Jenkins Valgrind Plugin.

Parameters:
  • pattern (str) – Filename pattern to locate the Valgrind XML report files (required)
  • thresholds (dict) –

    Mark build as failed or unstable if the number of errors exceeds a threshold. All threshold values are optional.

    thresholds:
    • unstable (dict)
      unstable:
      • invalid-read-write (int)
      • definitely-lost (int)
      • total (int)
    • failed (dict)
      failed:
      • invalid-read-write (int)
      • definitely-lost (int)
      • total (int)
  • fail-no-reports (bool) – Fail build if no reports are found (default false)
  • fail-invalid-reports (bool) – Fail build if reports are malformed (default false)
  • publish-if-aborted (bool) – Publish results for aborted builds (default false)
  • publish-if-failed (bool) – Publish results for failed builds (default false)

Example:

publishers:
  - valgrind:
      pattern: "test.xml"
      thresholds:
        unstable:
          invalid-read-write: 1
          definitely-lost: 2
          total: 3
        failed:
          invalid-read-write: 4
          definitely-lost: 5
          total: 6
      fail-no-reports: true
      fail-invalid-reports: true
      publish-if-aborted: true
      publish-if-failed: true
violations

Publish code style violations. Requires the Jenkins Violations Plugin.

The violations component accepts any number of dictionaries keyed by the name of the violations system. The dictionary has the following values:

Parameters:
  • min (int) – sunny threshold
  • max (int) – stormy threshold
  • unstable (int) – unstable threshold
  • pattern (str) – report filename pattern

Any system without a dictionary provided will use default values.

Valid systems are:

checkstyle, codenarc, cpd, cpplint, csslint, findbugs, fxcop, gendarme, jcreport, jslint, pep8, perlcritic, pmd, pylint, simian, stylecop

Example:

publishers:
  - violations:
      pep8:
        min: 0
        max: 1
        unstable: 1
        pattern: '**/pep8.txt'
warnings

Generate trend report for compiler warnings in the console log or in log files. Requires the Jenkins Warnings Plugin.

Parameters:
  • console-log-parsers (list) – The parser to use to scan the console log (default ‘’)
  • workspace-file-scanners (dict) –
    workspace-file-scanners:
     
    • file-pattern (str) – Fileset ‘includes’ setting that
      specifies the files to scan for warnings (required)
    • scanner (str) – The parser to use to scan the files
      provided in workspace-file-pattern (default ‘’)
  • files-to-include (str) – Comma separated list of regular expressions that specifies the files to include in the report (based on their absolute filename). By default all files are included
  • files-to-ignore (str) – Comma separated list of regular expressions that specifies the files to exclude from the report (based on their absolute filename). (default ‘’)
  • messages-to-ignore (str) – Newline separated list of regular expressions that specifies the warning messages to exclude form the report (based on the warning messages). By default all warning messages are included
  • categories-to-ignore (str) – Newline separated list of regular expressions that specifies the warning messages to exclude form the report (based on the warning categories). By default all warning categories are included
  • run-always (bool) – By default, this plug-in runs only for stable or unstable builds, but not for failed builds. Set to true if the plug-in should run even for failed builds. (default false)
  • detect-modules (bool) – Determines if Ant or Maven modules should be detected for all files that contain warnings. Activating this option may increase your build time since the detector scans the whole workspace for ‘build.xml’ or ‘pom.xml’ files in order to assign the correct module names. (default false)
  • resolve-relative-paths (bool) – Determines if relative paths in warnings should be resolved using a time expensive operation that scans the whole workspace for matching files. Deactivate this option if you encounter performance problems. (default false)
  • health-threshold-high (int) – The upper threshold for the build health. If left empty then no health report is created. If the actual number of warnings is between the provided thresholds then the build health is interpolated (default ‘’)
  • health-threshold-low (int) – The lower threshold for the build health. See health-threshold-high. (default ‘’)
  • health-priorities (dict) –

    Determines which warning priorities should be considered when evaluating the build health (default all-priorities)

    health-priorities values:
     
    • priority-high – Only priority high
    • high-and-normal – Priorities high and normal
    • all-priorities – All priorities
  • total-thresholds (dict) –

    If the number of total warnings is greater than one of these thresholds then a build is considered as unstable or failed, respectively. (default ‘’)

    total-thresholds:
     
    • unstable (dict)
      unstable:
      • total-all (int)
      • total-high (int)
      • total-normal (int)
      • total-low (int)
    • failed (dict)
      failed:
      • total-all (int)
      • total-high (int)
      • total-normal (int)
      • total-low (int)
  • new-thresholds (dict) –

    If the specified number of new warnings exceeds one of these thresholds then a build is considered as unstable or failed, respectively. (default ‘’)

    new-thresholds:
    • unstable (dict)
      unstable:
      • new-all (int)
      • new-high (int)
      • new-normal (int)
      • new-low (int)
    • failed (dict)
      failed:
      • new-all (int)
      • new-high (int)
      • new-normal (int)
      • new-high (int)
  • use-delta-for-new-warnings (bool) – If set then the number of new warnings is calculated by subtracting the total number of warnings of the current build from the reference build. This may lead to wrong results if you have both fixed and new warnings in a build. If not set, then the number of new warnings is calculated by an asymmetric set difference of the warnings in the current and reference build. This will find all new warnings even if the number of total warnings is decreasing. However, sometimes false positives will be reported due to minor changes in a warning (refactoring of variable of method names, etc.) (default false)
  • use-previous-build-as-reference (bool) – If set the number of new warnings will always be computed based on the previous build, even if that build is unstable (due to a violated warning threshold). Otherwise the last build that did not violate any given threshold will be used as reference. It is recommended to uncheck this option if the plug-in should ensure that all new warnings will be finally fixed in subsequent builds. (default false)
  • only-use-stable-builds-as-reference (bool) – The number of new warnings will be calculated based on the last stable build, allowing reverts of unstable builds where the number of warnings was decreased. (default false)
  • default-encoding (str) – Default encoding when parsing or showing files Leave empty to use default encoding of platform (default ‘’)

Minimal Example:

publishers:
  - warnings

Full Example:

publishers:
  - warnings:
      console-log-parsers:
        - FxCop
        - CodeAnalysis
      workspace-file-scanners:
        - file-pattern: '**/*.out'
          scanner: 'AcuCobol Compiler'
        - file-pattern: '**/*.warnings'
          scanner: FxCop
      files-to-include: '[a-zA-Z]\.java,[a-zA-Z]\.cpp'
      files-to-ignore: '[a-zA-Z]\.html,[a-zA-Z]\.js'
      messages-to-ignore: |-
        ^Test results:.*
        No sources found skipping Kotlin compile
      categories-to-ignore: |-
        WARN.*
        ERROR
      run-always: true
      detect-modules: true
      resolve-relative-paths: true
      health-threshold-high: 50
      health-threshold-low: 25
      health-priorities: high-and-normal
      total-thresholds:
        unstable:
          total-all: 90
          total-high: 90
          total-normal: 40
          total-low: 30
        failed:
          total-all: 100
          total-high: 100
          total-normal: 50
          total-low: 40
      new-thresholds:
        unstable:
          new-all: 100
          new-high: 50
          new-normal: 30
          new-low: 10
        failed:
          new-all: 100
          new-high: 60
          new-normal: 50
          new-low: 40
      use-delta-for-new-warnings: true
      use-previous-build-as-reference: true
      only-use-stable-builds-as-reference: true
      default-encoding: ISO-8859-9
whitesource

This plugin brings automatic open source management to Jenkins users.

Requires the Jenkins Whitesource Plugin.

Parameters:
  • product-token (str) – Product name or token to update (default ‘’)
  • version (str) – Product version (default ‘’)
  • override-token (str) – Override the api token from the global config (default ‘’)
  • project-token (str) – Token uniquely identifying the project to update (default ‘’)
  • includes (list) – list of libraries to include (default ‘[]’)
  • excludes (list) – list of libraries to exclude (default ‘[]’)
  • policies (str) – Whether to override the global settings. Valid values: global, enable, disable (default ‘global’)
  • requester-email (str) – Email of the WhiteSource user that requests to update WhiteSource (>=1.5.1) (default ‘’)

Full Example:

publishers:
  - whitesource:
      product-token: abcdefghijklmnopqrstuvwxyzabcdef
      version: 1.0.17
      policies: enable
      override-token: "1231424523412"
      project-token: sd;fkljsdfkljasdfkj
      requester-email: foo@email.com
      includes:
        - lib/*.jar
        - test/lib/*.jar
      excludes:
        - lib/ant*.jar
        - test/lib/ant*.jar

Minimal Example:

publishers:
  - whitesource
workspace-cleanup (post-build)

Requires the Jenkins Workspace Cleanup Plugin.

The pre-build workspace-cleanup is available as a wrapper.

Parameters:
  • include (list) – list of files to be included
  • exclude (list) – list of files to be excluded
  • dirmatch (bool) – Apply pattern to directories too (default false)
  • clean-if (list) –

    clean depending on build status

    clean-if values:
     
    • success (bool) (default true)
    • unstable (bool) (default true)
    • failure (bool) (default true)
    • aborted (bool) (default true)
    • not-built (bool) (default true)
  • fail-build (bool) – Fail the build if the cleanup fails (default true)
  • clean-parent (bool) – Cleanup matrix parent workspace (default false)
  • external-deletion-command (str) – external deletion command to run against files and directories
  • disable-deferred-wipeout (bool) – Disable improved deferred wipeout method (default false)

Minimal Example:

publishers:
  - workspace-cleanup

Full Example:

publishers:
  - workspace-cleanup:
      include:
        - "*.zip"
      exclude:
        - "*.txt"
      clean-if:
        - success: false
        - unstable: false
        - failure: false
        - aborted: false
        - not-built: false
      dirmatch: true
      fail-build: false
      clean-parent: true
      external-deletion-command: 'command'
      disable-deferred-wipeout: true
xml-summary

Adds support for the Summary Display Plugin

Requires the Jenkins Summary Display Plugin.

Parameters:
  • files (str) – Files to parse (required)
  • shown-on-project-page (bool) – Display summary on project page (default false)

Minimal Example:

publishers:
  - xml-summary:
      files: '*_summary_report.xml'

Full Example:

publishers:
  - xml-summary:
      files: '*_summary_report.xml'
      shown-on-project-page: true
xunit

Publish tests results. Requires the Jenkins xUnit Plugin.

Parameters:
  • thresholdmode (str) – Whether thresholds represents an absolute number of tests or a percentage. Either ‘number’ or ‘percent’. (default ‘number’)
  • thresholds (list) –

    Thresholds for both ‘failed’ and ‘skipped’ tests.

    threshold (dict):
     Threshold values to set, where missing, xUnit should default to an internal value of 0. Each test threshold should contain the following:
    • unstable (int)
    • unstablenew (int)
    • failure (int)
    • failurenew (int)
  • test-time-margin (int) – Give the report time margin value in ms, before to fail if not new unless the option requireupdate is set for the configured framework. (default 3000)
  • types (list) –

    Frameworks to configure, and options. Supports the following: aunit, boosttest, checktype, cpptest, cppunit, ctest, dotnettest, embunit, fpcunit, gtest, junit, mstest, nunit, phpunit, tusar, unittest, and valgrind.

    The ‘custom’ type is not supported.

    type (dict):each type can be configured using the following:
    • pattern (str): An Ant pattern to look for Junit result files, relative to the workspace root (default ‘’)
    • requireupdate (bool): fail the build whenever fresh tests results have not been found (default true).
    • deleteoutput (bool): delete temporary JUnit files (default true).
    • skip-if-no-test-files (bool): Skip parsing this xUnit type report if there are no test reports files (default false).
    • stoponerror (bool): Fail the build whenever an error occur during a result file processing (default true).

Example:

publishers:
  - xunit:
      thresholdmode: 'percent'
      thresholds:
          - failed:
                unstable: 0
                unstablenew: 0
                failure: 0
                failurenew: 0
          - skipped:
                unstable: 0
                unstablenew: 0
                failure: 0
                failurenew: 0
      types:
          - phpunit:
              pattern: "junit.log"
              stoponerror: true
          - cppunit:
              pattern: "cppunit.log"
          - gtest:
              pattern: "gtest.log"
zulip

Set build status on zulip. Requires the Jenkins Humbug Plugin.

Example:

publishers:
  - zulip