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.
Example:
publishers: - aggregate-flow-tests
-
aggregate-tests
¶ Aggregate downstream test results
Parameters: include-failed-builds (bool) – whether to include failed builds Example:
publishers: - aggregate-tests: include-failed-builds: true
-
archive
¶ Archive build artifacts
Parameters: - artifacts (str) – path specifier for artifacts to archive
- excludes (str) – path specifier for artifacts to exclude
- 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)
Example:
publishers: - archive: artifacts: '*.tar.gz' allow-empty: 'true' fingerprint: true
-
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
- entries (list) –
-
artifactory
¶ Uses/requires the Artifactory plugin to deploy artifacts to Artifactory Server.
Requires the Jenkins Artifactory Plugin. :jenkins-wiki: `Artifactory Plugin <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 commiters when build fails Requires the Jenkins Blame upstream commiters 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)
Example:
publishers: - build-publisher: publish-unstable-builds: true publish-failed-builds: true 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 (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-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
-
cifs
¶ Upload files via CIFS. Requires the Jenkins Publish over CIFS Plugin.
Parameters: - site (str) – name of the cifs site/share
- 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
- 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).
Example:
publishers: - cifs: site: 'cifs.share' target: 'dest/dir' source: 'base/source/dir/**' remove-prefix: 'base/source/dir' excludes: '**/*.excludedfiletype' flatten: true
-
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) – Files that should be scanned. (default “”)
- excludes (str) – Files that should be ignored. (default “”)
Example:
publishers: - clamav: includes: '*.zip' excludes: 'foo.zip'
-
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
- 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"
-
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"
- create-stacks (list) –
-
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
-
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.
- 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
-
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
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 for more optional parameters see the example
Example:
publishers: - cppcheck: pattern: "**/cppcheck.xml" # the rest is optional # build status (new) error count thresholds thresholds: unstable: 5 new-unstable: 5 failure: 7 new-failure: 3 # severities which count towards the threshold, default all true severity: error: true warning: true information: false graph: xysize: [500, 200] # which errors to display, default only sum display: sum: false error: 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)
Example:
publishers: - cucumber-reports: plugin-url-path: http://example.com/
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
-
cucumber-testresult
¶ Publish cucumber test results. Requires the Jenkins cucumber testresult.
Parameters: results (str) – results filename (required) Example:
publishers: - cucumber-testresult: results: nosetests.xml
-
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
- regexp-for-failed (str) – A RegEx which is used for failed builds (optional)
- 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)
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
- when-to-disable (str) –
-
display-upstream-changes
¶ Display SCM changes of upstream jobs. Requires the Jenkins Display Upstream Changes Plugin.
Example:
publishers: - display-upstream-changes
-
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
- keepall (bool) – Retain doxygen generation for each successful build (default: false)
- folder (str) – Folder where you run doxygen (default: ‘’)
Example:
publishers: - doxygen: doxyfile: "Doxyfile" keepall: false 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 (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’)
- 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. (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-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.
Parameters: - recipients (str) – Recipient email addresses (optional)
- 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 bar@example.com
-
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 emails
- reply-to (str) – Comma separated list of emails 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
- 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
- attach-build-log (bool) – Include build log in the email (default false)
- attachments (str) – pattern of files to include as attachment (optional)
- 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)
- 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)
- 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)
- presend-script (str) – A Groovy script executed prior sending the mail. (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 attachments: "*/foo*.log" always: true unstable: true first-failure: true not-built: true aborted: true regression: true failure: true second-failure: true improvement: true still-failing: true success: true fixed: true still-unstable: true pre-build: true matrix-trigger: only-configurations presend-script: "cancel=true" save-output: true send-to: - developers - requester - culprits - recipients
-
emotional-jenkins
¶ Emotional Jenkins. 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. (Optional)
- rank-priority (bool) – Use rank as priority (default: false)
- include-files (str) – Comma separated list of files to include. (Optional)
- exclude-files (str) – Comma separated list of files to exclude. (Optional)
- 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 (optional)
- unhealthy (int) – Stormy threshold (optional)
- 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:
project-type: maven reporters: - 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
Parameters: - files (str) – files to fingerprint, follows the @includes of Ant fileset (default blank)
- 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 incude 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
- 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
- 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).
Example:
publishers: - ftp: site: 'ftp.example.com' target: 'dest/dir' source: 'base/source/dir/**' remove-prefix: 'base/source/dir' excludes: '**/*.excludedfiletype' flatten: 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)
Example:
publishers: - git: push-merge: true push-only-if-success: false 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
-
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)
- 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)
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
-
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 is “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
-
hipchat
¶ Publisher that sends hipchat notifications on job events Requires the Jenkins Hipchat Plugin version >=1.9
Please see documentation for older plugin version http://docs.openstack.org/infra/jenkins-job-builder/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
-
html-publisher
¶ This plugin publishes HTML reports.
Requires the Jenkins HTML Publisher Plugin.
Parameters: - name (str) – Report name
- dir (str) – HTML directory to archive
- files (str) – Specify the pages to display
- 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
-
image-gallery
¶ 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
- gallery-type (str) –
-
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_and_fixed
- 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
Example:
publishers: - ircbot: strategy: all notify-start: false notify-committers: false notify-culprits: false notify-upstream: false notify-fixers: false message-type: summary-scm channels: - name: '#jenkins-channel1' password: secrete notify-only: false - name: '#jenkins-channel2' notify-only: true matrix-notifier: only-configurations
- strategy (string) –
-
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
- 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
Example:
publishers: - jabber: notify-on-build-start: true group-targets: - "foo-room@conference-2-fooserver.foo.com" individual-targets: - "foo-user@conference-2-fooserver.foo.com" strategy: all message: summary-scm
-
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
) - 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 (optional)
- exclusion-pattern (str) – This is a file name pattern that can be used to exclude certain class files (optional)
- targets (dict) –
targets: (instruction, branch, complexity, line, method, class) - healthy (int): Healthy threshold (default 0)
- unhealthy (int): Unhealthy threshold (default 0)
Example:
publishers: - jacoco: exec-pattern: "**/**.exec" class-pattern: "**/classes" source-pattern: "**/src/main/java" status-update: true targets: - branch: healthy: 10 unhealthy: 20 - method: healthy: 50 unhealthy: 40
- exec-pattern (str) – This is a file name pattern that can be used to
locate the jacoco report files (default
-
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 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:
-
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
-
join-trigger
¶ Trigger a job after all the immediate downstream jobs have completed
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-with-no-params: true - project: cleanup current-parameters: true trigger-with-no-params: false
-
junit
¶ Publish JUnit test results.
Parameters: - results (str) – results filename
- 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)
- 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..
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 test-stability: true claim-build: true measurement-plots: true
-
logparser
¶ Requires the Jenkins Log Parser Plugin.
Parameters: - parse-rules (str) – full path to parse rules
- unstable-on-warning (bool) – mark build unstable on warning
- fail-on-error (bool) – mark build failed on error
Example:
publishers: - logparser: parse-rules: "/path/to/parserules" unstable-on-warning: true fail-on-error: true
-
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 (num) – 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
-
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)
- fixed-delay (int) – Fixed delay 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 before retrying build increment (cannot be used when fixed-delay is being used) (Default 0)
- progressive-delay-maximum (int) – Progressive delay 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 progressive-delay-increment: 5 progressive-delay-maximum: 15 max-failed-builds: 6 regular-expression: "foo"
-
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)
- report (dict) –
(jmeter or junit): (dict or str): Specify a custom report file (optional; jmeter default **/.jtl, junit default */TEST-*.xml)
Examples:
publishers: - performance: failed-threshold: 85 unstable-threshold: -1 report: - jmeter: "/special/file.jtl" - junit: "/special/file.xml"
publishers: - performance: failed-threshold: 85 unstable-threshold: -1 report: - jmeter - junit
publishers: - performance: failed-threshold: 85 unstable-threshold: -1 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.
Parameters: - project (str) – the name of the downstream project
- 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)
Example:
publishers: - pipeline: project: test_project current-parameters: true predefined-parameters: foo=bar
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
- group (str) – name of the group to which the plot belongs
- 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
Serie: - 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.
Example:
publishers: - plot: - title: MyPlot yaxis: Y csv-file-name: myplot.csv group: PlotGroup num-builds: '' style: line exclude-zero-yaxis: true logarithmic-yaxis: true use-description: false series: - file: graph-me-second.properties label: MyLabel format: properties - file: graph-me-first.csv url: 'http://srv1' inclusion-flag: 'off' display-table: true format: csv - title: MyPlot2 yaxis: Y csv-file-name: myplot2.csv group: PlotGroup style: line use-description: false series: - file: graph-me-third.xml url: 'http://srv2' format: xml xpath-type: 'node' xpath: '/*'
publishers: - plot: - title: 'Sample graph' yaxis: '' csv-file-name: 'persisted.csv' group: 'bench' numbuilds: '1' style: 'line' use-description: false series: - file: 'data.csv' format: 'csv' inclusion-flag: 'include-by-string' exclude: 'Column 1,Column 2,Column 3'
-
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-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) – Paths to Batch/Shell scripts
- groovy-script (list) – Paths to Groovy scripts
- groovy (list) – Inline Groovy
- builders (list) – Any supported builders, see Builders.
- 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)
- 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)
- 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.
Example:
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"'
-
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
- unstable-text (str) – The unstable text if different from stable (default ‘’)
- failed-text (str) – The failed text if different from stable (default ‘’)
- parser-name (str) – HTML, Confluence or WikiText
Example:
publishers: - rich-text-publisher: stable-text: testing 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. (default ‘’)
- 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)
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 other-files: - extra-file1.html - extra-file2.txt archive-output-xml: false
-
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
- 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 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 (default: ‘’)
Example:
publishers: - scan-build: mark-unstable: true threshold: 0 exclude-paths: external-lib
-
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
- report-file (str) – This is a file name that is given to the xml scoverage report.
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
- target (str) – destination directory
- source (str) – source path specifier
- 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 Example:
publishers: - sitemonitor: sites: - url: http://foo.example.com - url: http://bar.example.com:8080/
-
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’)
Example:
publishers: - sloccount: report-files: sloccount.sc charset: latin-1
-
sonar
¶ Sonar plugin support. Requires the Jenkins Sonar Plugin.
Parameters: - jdk (str) – JDK to use (inherited from the job if omitted). (optional)
- branch (str) – branch onto which the analysis will be posted (optional)
- language (str) – source code language (optional)
- 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 (optional)
- additional-properties (str) – sonar analysis parameters (optional)
- skip-global-triggers (dict) –
Triggers: - skip-when-scm-change (bool): skip analysis when build triggered by scm
- skip-when-upstream-build (bool): skip analysis when build triggered by an upstream build
- skip-when-envvar-defined (str): skip analysis when the specified environment variable is set to true
- 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.
Example:
publishers: - sonar: jdk: MyJdk branch: myBranch language: java 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
-
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).
Example:
publishers: - ssh: site: 'server.example.com' target: 'dest/dir' source: 'base/source/dir/**' remove-prefix: 'base/source/dir' excludes: '**/*.excludedfiletype' use-pty: true command: 'rm -r jenkins_$BUILD_NUMBER' timeout: 1800000 flatten: true
-
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: “”)
- 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)
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
- 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)
Example:
publishers: - tap: results: puiparts.tap todo-is-failure: false
-
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
- 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)
Example:
publishers: - testng: pattern: "**/target/surefire-reports/testng-results.xml" escape-test-description: false escape-exception-msg: true
-
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
- fileset (str) – Specify the path to search
- 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)
Example:
publishers: - text-finder: regexp: "some string" fileset: "file.txt" also-check-console-output: true succeed-if-found: false unstable-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 (bool) – Pass git revision to the other job (optional)
- combine-queued-commits (bool) – Combine Queued git hashes. Only valid when ‘git-revision’ is true. (default false)
- 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 files are not found in the workspace (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} property-file: version.prop fail-on-missing: true - project: yet_another_job predefined-parameters: foo=bar git-revision: 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, stylecopExample:
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
- 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 ‘’)
- 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)
- 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 ‘’)
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' 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 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’)
Example:
publishers: - whitesource: product-token: abcdefghijklmnopqrstuvwxyzabcdef version: 1.0.17 policies: enable override-token: "1231424523412" project-token: sd;fkljsdfkljasdfkj includes: - lib/*.jar - test/lib/*.jar excludes: - lib/ant*.jar - test/lib/ant*.jar
-
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)
Example:
publishers: - workspace-cleanup: include: - "*.zip" clean-if: - success: true - not-built: false
-
xml-summary
¶ Adds support for the Summary Display Plugin
Requires the Jenkins Summary Display Plugin.
Parameters: - files (str) – Files to parse (default ‘’)
- shown-on-project-page (bool) – Display summary on project page (default ‘false’)
Example:
publishers: - xml-summary: files: '*_summary_report.xml'
-
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
,embunit
,fpcunit
,gtest
,junit
,mstest
,nunit
,phpunit
,tusar
,unittest
, andvalgrind
.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.
- 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