Publishers define actions that the Jenkins job should perform after the build is complete.
Macro: | publisher |
---|---|
Entry Point: | jenkins_jobs.publishers |
Aggregate downstream test results
Parameters: | include-failed-builds (bool) – whether to include failed builds |
---|
Example:
publishers:
- aggregate-tests:
include-failed-builds: true
Archive build artifacts
Parameters: |
|
---|
Example:
publishers:
- archive:
artifacts: '*.tar.gz'
allow-empty: 'true'
This plugin makes it possible to copy artifacts to remote locations.
Requires the Jenkins ArtifactDeployer Plugin.
Parameters: |
|
---|
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
Notify upstream commiters when build fails Requires the Jenkins Blame upstream commiters Plugin.
Example:
publishers:
- blame-upstream
This plugin allows records from one Jenkins to be published on another Jenkins.
Requires the Jenkins Build Publisher Plugin.
Parameters: | servers (str) – Specify the servers where to publish |
---|
Example:
publishers:
- build-publisher:
name: servername
publish-unstable-builds: true
publish-failed-builds: true
days-to-keep: -1
num-to-keep: -1
artifact-days-to-keep: -1
artifact-num-to-keep: -1
Helper to create various trend publishers.
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: |
|
---|
Example:
publishers:
- campfire:
subdomain: 'sub'
ssl: true
token: 'TOKEN'
room: 'room'
Publish trend reports with Checkstyle. Requires the Jenkins Checkstyle Plugin.
The checkstyle component accepts a dictionary with the following values:
Parameters: |
|
---|
Example:
publishers:
- checkstyle:
pattern: '**/checkstyle-result.xml'
healthy: 0
unHealthy: 100
healthThreshold: 'high'
thresholds:
unstable:
totalHigh: 10
failed:
totalHigh: 1
Full example:
publishers:
- checkstyle:
pattern: '**/checkstyle-result.xml'
canRunOnFailed: true
shouldDetectModules: true
healthy: 0
unHealthy: 100
healthThreshold: 'high'
thresholds:
unstable:
totalAll: 90
totalHigh: 80
totalNormal: 70
totalLow: 60
failed:
totalAll: 90
totalHigh: 80
totalNormal: 70
totalLow: 60
defaultEncoding: 'utf-8'
Upload files via CIFS. Requires the Jenkins Publish over CIFS Plugin.
Parameters: |
|
---|
Example:
publishers:
- cifs:
site: 'cifs.share'
target: 'dest/dir'
source: 'base/source/dir/**'
remove-prefix: 'base/source/dir'
excludes: '**/*.excludedfiletype'
flatten: true
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 failures Requires the Jenkins Claim Plugin.
Example:
publishers:
- claim-build
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: |
|
---|
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"
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: |
|
---|
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
Generate a cobertura coverage report. Requires the Jenkins Cobertura Coverage Plugin.
Parameters: |
|
---|
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
Copy files to master from slave Requires the Jenkins Copy To Slave Plugin.
Parameters: |
|
---|
Example:
publishers:
- copy-to-master:
includes:
- file1
- file2*.txt
excludes:
- file2bad.txt
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 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
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: |
|
---|
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
This plugin parses the Doxygen descriptor (Doxyfile) and provides a link to the generated Doxygen documentation.
Requires the Jenkins Doxygen Plugin.
Parameters: |
|
---|
Example:
publishers:
- doxygen:
doxyfile: "Doxyfile"
keepall: false
folder: "build"
Email notifications on build failure.
Parameters: |
|
---|
Example:
publishers:
- email:
recipients: breakage@example.com
Extend Jenkin’s built in email notification Requires the Jenkins Email-ext Plugin.
Parameters: |
|
---|
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"
send-to:
- developers
- requester
- culprits
- recipients
Emotional Jenkins. Requires the Jenkins Emotional Jenkins Plugin.
Example:
publishers:
- emotional-jenkins
Fingerprint files to track them across builds
Parameters: |
|
---|
Example:
publishers:
- fingerprint:
files: builddir/test*.xml
record-artifacts: false
Publish Fitnesse test results
Requires the Jenkins Fitnesse plugin.
Parameters: | results (str) – path specifier for results files |
---|
Example:
publishers:
- fitnesse:
results: "fitnesse-results/**/*.xml"
Upload files via FTP. Requires the Jenkins Publish over FTP Plugin.
Parameters: |
|
---|
Example:
publishers:
- ftp:
site: 'ftp.example.com'
target: 'dest/dir'
source: 'base/source/dir/**'
remove-prefix: 'base/source/dir'
excludes: '**/*.excludedfiletype'
flatten: true
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: |
|
---|
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: commits
replace-note: true
Set build status on Github commit. Requires the Jenkins Github Plugin.
Example:
publishers:
- github-notifier
Execute a groovy script. Requires the Jenkins Groovy Postbuild Plugin
Parameter: | the groovy script to execute |
---|
Example:
publishers:
- groovy-postbuild: "manager.buildFailure()"
This plugin publishes HTML reports.
Requires the Jenkins HTML Publisher Plugin.
Parameters: |
|
---|
Example:
publishers:
- html-publisher:
name: "some name"
dir: "path/"
files: "index.html"
keep-all: true
allow-missing: true
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: |
|
---|
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
Integrates Jenkins with the Jabber/XMPP instant messaging protocol Requires the Jenkins Jabber Plugin.
Parameters: |
|
---|
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
Generate a JaCoCo coverage report. Requires the Jenkins JaCoCo Plugin.
Parameters: |
|
---|
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
Update relevant JIRA issues Requires the Jenkins JIRA Plugin
Example:
publishers:
- jira
Trigger a job after all the immediate downstream jobs have completed
Parameters: | projects (list) – list of projects to trigger |
---|
Example:
publishers:
- join-trigger:
projects:
- project-one
- project-two
Publish JUnit test results.
Parameters: |
|
---|
Minimal example using defaults:
publishers:
- junit:
results: nosetests.xml
Full example:
publishers:
- junit:
results: nosetests-example.xml
keep-long-stdio: false
test-stability: true
Requires the Jenkins Log Parser Plugin.
Parameters: |
|
---|
Example:
publishers:
- logparser:
parse-rules: "/path/to/parserules"
unstable-on-warning: true
fail-on-error: true
Deploy artifacts to Maven repository.
Parameters: |
|
---|
Example:
publishers:
- maven-deploy:
id: example
url: http://repo.example.com/maven2/
unique-version: true
deploy-unstable: false
Publish performance test results from jmeter and junit. Requires the Jenkins Performance Plugin.
Parameters: |
|
---|
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
Specify a downstream project in a pipeline. Requires the Jenkins Build Pipeline Plugin.
Parameters: |
|
---|
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 provides generic plotting (or graphing).
Requires the Jenkins Plot Plugin.
Parameters: |
|
---|
Example:
publishers:
- plot:
- title: MyPlot
yaxis: Y
group: PlotGroup
num-builds: ''
style: line
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
group: PlotGroup
style: line
use-description: false
series:
- file: graph-me-third.xml
url: 'http://srv2'
format: xml
xpath-type: 'node'
xpath: '/*'
Publish trend reports with PMD. Requires the Jenkins PMD Plugin.
The PMD component accepts a dictionary with the following values:
Parameters: |
|
---|
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'
Adds support to post build task plugin
Requires the Jenkins Post Build Task plugin.
Parameters: |
|
---|
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: false
run-if-job-successful:false
script: |
echo "Here goes the task script"
Executes additional builders, script or Groovy after the build is complete.
Requires the Jenkins Post Build Script plugin.
Parameters: |
|
---|
The onsuccess and onfailure 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 */"
onsuccess: False
onfailure: 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"'
Adds support for the Robot Framework Plugin
Requires the Jenkins Robot Framework Plugin.
Parameters: |
|
---|
Example:
- publishers:
- robot:
output-path: reports/robot
log-file-link: report.html
report-html: report.html
log-html: log.html
output-xml: output.xml
pass-threshold: 80.0
unstable-threshold: 60.0
only-critical: false
other-files:
- extra-file1.html
- extra-file2.txt
Rcov plugin parses rcov html report files and shows it in Jenkins with a trend graph.
Requires the Jenkins Ruby metrics plugin.
Parameters: |
|
---|
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
Upload files via SCP Requires the Jenkins SCP Plugin.
Parameters: |
|
---|
Example:
publishers:
- scp:
site: 'example.com'
files:
- target: 'dest/dir'
source: 'base/source/dir/**'
keep-hierarchy: true
copy-after-failure: true
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/
Generates the trend report for SLOCCount
Requires the Jenkins SLOCCount Plugin.
Parameters: |
|
---|
Example:
publishers:
- sloccount:
report-files: sloccount.sc
charset: UTF-8
Sonar plugin support. Requires the Jenkins Sonar Plugin.
Parameters: |
|
---|
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
Upload files via SCP. Requires the Jenkins Publish over SSH Plugin.
Parameters: |
|
---|
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
This plugin will configure the Jenkins Stash Notifier plugin to notify Atlassian Stash after job completes.
Requires the Jenkins StashNotifier Plugin.
Parameters: |
|
---|
Example:
publishers:
- stash:
url: "https://mystash"
username: a
password: b
ignore-ssl: true
commit-sha1: c
include-build-number: true
Adds support to TAP test result files
Requires the Jenkins TAP Plugin.
Parameters: |
|
---|
Example:
publishers:
- tap:
results: puiparts.tap
todo-is-failure: false
This plugin publishes TestNG test reports.
Requires the Jenkins TestNG Results Plugin.
Parameters: |
|
---|
Example:
publishers:
- testng:
pattern: "**/target/surefire-reports/testng-results.xml"
escape-test-description: false
escape-exception-msg: true
This plugin lets you search keywords in the files you specified and additionally check build status
Requires the Jenkins Text-finder Plugin.
Parameters: |
|
---|
Example:
publishers:
- text-finder:
regexp: "some string"
fileset: "file.txt"
also-check-console-output: true
succeed-if-found: false
unstable-if-found: false
Trigger non-parametrised builds of other jobs.
Parameters: |
|
---|
Example:
publishers:
- trigger:
project: other_job
threshold: SUCCESS
Trigger parameterized builds of other jobs. Requires the Jenkins Parameterized Trigger Plugin.
Parameters: |
|
---|
Example:
publishers:
- trigger-parameterized-builds:
- project: other_job, foo, bar
predefined-parameters: foo=bar
- 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"
This plugin publishes Valgrind Memcheck XML results.
Requires the Jenkins Valgrind Plugin.
Parameters: |
|
---|
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
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: |
|
---|
Any system without a dictionary provided will use default values.
Valid systems are:
checkstyle, codenarc, cpd, cpplint, csslint, findbugs, fxcop, gendarme, jcreport, jslint, pep8, pmd, pylint, simian, stylecop
Example:
publishers:
- violations:
pep8:
min: 0
max: 1
unstable: 1
pattern: '**/pep8.txt'
Generate trend report for compiler warnings in the console log or in log files. Requires the Jenkins Warnings Plugin.
Parameters: |
|
---|
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
Requires the Jenkins Workspace Cleanup Plugin.
The pre-build workspace-cleanup is available as a wrapper.
Parameters: |
|
---|
Example:
publishers:
- workspace-cleanup:
include:
- "*.zip"
clean-if:
- success: true
- not-built: false
Adds support for the Summary Display Plugin
Requires the Jenkins Summary Display Plugin.
Parameters: | files (str) – Files to parse (default ‘’) |
---|
Example:
publishers:
- xml-summary:
files: '*_summary_report.xml'
Publish tests results. Requires the Jenkins xUnit Plugin.
Parameters: |
|
---|
Each framework type can be configured using the following parameters:
Parameters: |
|
---|
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
- cppUnit:
pattern: cppunit.log