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 in a Build Flow job. Requires the Jenkins Build Flow Test Aggregator Plugin.
Example:
publishers:
- aggregate-flow-tests
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'
fingerprint: 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
Uses/requires the Artifactory plugin to deploy artifacts to Artifactory Server.
Requires the Jenkins Artifactory Plugin. :jenkins-wiki: `Artifactory Plugin <Artifactory+Plugin>.
Parameters: |
|
---|
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: []
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: |
|
---|
Example:
publishers:
- build-publisher:
publish-unstable-builds: true
publish-failed-builds: true
days-to-keep: -1
num-to-keep: 100
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
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
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
Check files with ClamAV, an open source antivirus engine. Requires the Jenkins ClamAV Plugin.
Parameters: |
|
---|
Example:
publishers:
- clamav:
includes: '*.zip'
excludes: 'foo.zip'
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"
Create cloudformation stacks before running a build and optionally delete them at the end. Requires the Jenkins AWS Cloudformation Plugin.
Parameters: |
|
---|
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"
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
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 | 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
|
||||||||
current-status | Run the action if the current build status is within the configured range
|
||||||||
shell | Run the action if the shell command succeeds
|
||||||||
windows-shell | Similar to shell, except that commands will be executed by cmd, under Windows
|
||||||||
regexp | Run the action if a regular expression matches
|
||||||||
file-exists | Run the action if a file exists
|
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 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 creates pretty cucumber-jvm html reports on jenkins.
Requires the Jenkins cucumber reports.
Parameters: |
|
---|
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
Publish cucumber test results. Requires the Jenkins cucumber testresult.
Parameters: | results (str) – results filename (required) |
---|
Example:
publishers:
- cucumber-testresult:
results: nosetests.xml
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
Automatically disable failed jobs.
Requires the Jenkins Disable Failed Job Plugin.
Parameters: |
|
---|
Example:
publishers:
- disable-failed-job:
when-to-disable: 'Failure and Unstable'
no-of-failures: 3
Display SCM changes of upstream jobs. Requires the Jenkins Display Upstream Changes Plugin.
Example:
publishers:
- display-upstream-changes
Trigger multiple downstream jobs when a job is completed and condition is met.
Requires the Jenkins Downstream-Ext Plugin.
Parameters: |
|
---|
Example:
publishers:
- downstream-ext:
projects:
- foo
- bar
only-on-scm-change: true
criteria: unstable
condition: equal
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"
Publish trend reports with DRY. Requires the Jenkins DRY Plugin.
The DRY component accepts a dictionary with the following values:
Parameters: |
|
---|
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 notifications on build failure.
Parameters: |
|
---|
Example:
publishers:
- email:
recipients: foo@example.com bar@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"
save-output: true
send-to:
- developers
- requester
- culprits
- recipients
Emotional Jenkins. Requires the Jenkins Emotional Jenkins Plugin.
Example:
publishers:
- emotional-jenkins
FindBugs reporting for builds
Requires the Jenkins FindBugs Plugin.
Parameters: |
|
---|
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 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"
This plugin publishes job build results to a Flowdock flow.
Requires the Jenkins Flowdock Plugin.
Parameters: |
|
---|
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
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
Publish gatling results as a trend graph Requires the Jenkins Gatling Plugin.
Example:
publishers:
- gatling
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: notenamespace
replace-note: true
Set build status on Github commit. Requires the Jenkins Github Plugin.
Example:
publishers:
- github-notifier
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: |
|
---|
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
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: |
|
---|
Example:
publishers:
- groovy-postbuild:
script: "manager.buildFailure()"
classpath:
- "file:///path/to/your/lib"
- "file:///path/to/your/lib"
on-failure: "failed"
matrix-parent: true
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: |
|
---|
Example:
publishers:
- hipchat:
token: auth
rooms:
- room1
- room2
notify-start: true
notify-aborted: true
start-message: job started
complete-message: job completed
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
link-to-last-build: true
Produce an image gallery using Javascript library. Requires the Jenkins Image Gallery Plugin.
Parameters: |
|
---|
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
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
Publish Javadoc Requires the Jenkins Javadoc Plugin.
Parameters: |
|
---|
Example:
publishers:
- javadoc:
directory: myproject/build/javadoc
keep-all-successful: true
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: |
|
---|
Example:
publishers:
- jclouds:
profile: hp
files: '*.tar.gz'
container: jenkins
basedir:
Publish jdepend report Requires the JDepend Plugin.
Parameters: | file (str) – path to jdepend file (required) |
---|
Example:
publishers:
- jdepend:
file: build/jdepend/main.xml
Update relevant JIRA issues Requires the Jenkins JIRA Plugin.
Example:
publishers:
- jira
Trigger a job after all the immediate downstream jobs have completed
Parameters: |
|
---|
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
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
health-scale-factor: 2.0
test-stability: true
claim-build: true
measurement-plots: true
Requires the Jenkins Log Parser Plugin.
Parameters: |
|
---|
Example:
publishers:
- logparser:
parse-rules: "/path/to/parserules"
unstable-on-warning: true
fail-on-error: true
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: |
|
---|
Minimal Example:
publishers:
- logstash
Full Example:
publishers:
- logstash:
max-lines: 2000
fail-build: 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
release-env-var: TIMER
Automatically reschedule a build after a build failure Requires the Jenkins Naginator Plugin.
Parameters: |
|
---|
Example:
publishers:
- naginator:
rerun-unstable-builds: true
progressive-delay-increment: 5
progressive-delay-maximum: 15
max-failed-builds: 6
regular-expression: "foo"
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
Integrate with Phabricator
Requires the Jenkins Phabricator Plugin.
Parameters: |
|
---|
Example:
publishers:
- phabricator:
comment-on-success: false
uberalls-enabled: false
comment-with-console-link-on-failure: false
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
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'
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: true
run-if-job-successful: true
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 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"'
This plugin puts custom rich text message to the Build pages and Job main page.
Requires the Jenkins Rich Text Publisher Plugin.
Parameters: |
|
---|
Example:
publishers:
- rich-text-publisher:
stable-text: testing
parser-name: HTML
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: 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
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
Trigger a rundeck job when the build is complete.
Requires the Jenkins RunDeck Plugin.
Parameters: |
|
---|
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
Upload build artifacts to Amazon S3.
Requires the Jenkins S3 plugin.
Parameters: |
|
---|
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}
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: |
|
---|
Example:
publishers:
- scan-build:
mark-unstable: true
threshold: 0
exclude-paths: external-lib
Publish scoverage results as a trend graph. Requires the Jenkins Scoverage Plugin.
Parameters: |
|
---|
Example:
publishers:
- scoverage:
report-directory: target/scala-2.10/scoverage-report/
report-file: scoverage.xml
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: |
|
---|
Example:
publishers:
- scp:
site: 'example.com'
files:
- target: 'dest/dir'
source: 'base/source/dir/**'
keep-hierarchy: true
copy-after-failure: true
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/
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: latin-1
Sonar plugin support. Requires the Jenkins Sonar Plugin.
Parameters: |
|
---|
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
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.
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: |
|
---|
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
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, perlcritic, 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
This plugin brings automatic open source management to Jenkins users.
Requires the Jenkins Whitesource Plugin.
Parameters: |
|
---|
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
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: |
|
---|
Example:
publishers:
- xml-summary:
files: '*_summary_report.xml'
Publish tests results. Requires the Jenkins xUnit Plugin.
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"
stoponerror: true
- cppunit:
pattern: "cppunit.log"
- gtest:
pattern: "gtest.log"
Set build status on zulip. Requires the Jenkins Humbug Plugin.
Example:
publishers:
- zulip