Linux repositories inspector

jenkins-jobs(1)

3.2.0

jenkins-job-builder

Configure Jenkins using YAML files - metapackage

NAME

jenkins-jobs - Jenkins Job Builder Documentation
Jenkins Job Builder takes simple descriptions of Jenkins jobs in YAML or JSON format and uses them to configure Jenkins. You can keep your job descriptions in human readable text format in a version control system to make changes and auditing easier. It also has a flexible template system, so creating many similarly configured jobs is easy.
To install:
$ pip install --user jenkins-job-builder
Online documentation:
o http://docs.openstack.org/infra/jenkins-job-builder/

DEVELOPERS

Bug report:
o https://storyboard.openstack.org/#!/project/723
Repository:
o https://opendev.org/jjb/jenkins-job-builder
Cloning:
git clone https://opendev.org/jjb/jenkins-job-builder.git
Install pre-commit from https://pre-commit.com/#intro in order to run some minimal testing on your commits.
A virtual environment is recommended for development. For example, Jenkins Job Builder may be installed from the top level directory:
$ virtualenv .venv
$ source .venv/bin/activate
$ pip install -r test-requirements.txt -e .
Patches are submitted via Gerrit at:
o https://review.opendev.org
Please do not submit GitHub pull requests, they will be automatically closed.
Mailing list:
o https://groups.google.com/forum/#!forum/jenkins-job-builder
IRC:
o #openstack-jjb on Freenode
More details on how you can contribute is available on our wiki at:
o http://docs.openstack.org/infra/manual/developers.html

WRITING A PATCH

We ask that all code submissions be pep8 and pyflakes clean. The easiest way to do that is to run tox before submitting code for review in Gerrit. It will run pep8 and pyflakes in the same manner as the automated test suite that will run on proposed patchsets.
When creating new YAML components, please observe the following style conventions:
o All YAML identifiers (including component names and arguments) should be lower-case and multiple word identifiers should use hyphens. E.g., "build-trigger".
o The Python functions that implement components should have the same name as the YAML keyword, but should use underscores instead of hyphens. E.g., "build_trigger".
This consistency will help users avoid simple mistakes when writing YAML, as well as developers when matching YAML components to Python im

UNIT TESTS

Unit tests have been included and are in the tests folder. Many unit tests samples are included as examples in our documentation to ensure that examples are kept current with existing behaviour. To run the unit tests, execute the command:
tox -e py34,py27
o Note: View tox.ini to run tests on other versions of Python, generating the documentation and additionally for any special notes on running the test to validate documentation external URLs from behind proxies.

INSTALLING WITHOUT SETUP.PY

For YAML support, you will need libyaml installed.
Mac OS X:
$ brew install libyaml
Then install the required python packages using pip:
$ sudo pip install PyYAML python-jenkin

QUICK START GUIDE

This guide was made with the impatient in mind so explanation is sparse. It will guide users through a set of typical use cases for JJB using the same job definitions we use to test JJB.
1. Clone the repository to get the JJB job definition examples
2. The installation can be either from pypi (released version) or from the clone (master).
Usage of the commands below assumes that you are at the root of the cloned directory.

Use Case 1: Test a job definition

JJB creates Jenkins XML configuration file from a YAML/JSON definition file and just uploads it to Jenkins. JJB provides a convenient test command to allow you to validate the XML before you attempt to upload it to Jenkins.
Test a YAML job definition:
jenkins-jobs test tests/yamlparser/fixtures/templates002.yaml
The above command prints the generated Jenkins XML to the console. If you prefer to send it to a directory:
jenkins-jobs test -o output tests/yamlparser/fixtures/templates002.yaml
The output directory will contain files with the XML configurations.

Use Case 2: Updating Jenkins Jobs

Once you\(aqve tested your job definition and are happy with it then you can use the update command to deploy the job to Jenkins. The update command requires a configuration file. An example file is supplied in the etc folder, you should update it to match your Jenkins master:
jenkins-jobs --conf etc/jenkins_jobs.ini-sample update tests/yamlparser/fixtures/templates002.yaml
The above command will update your Jenkins master with the generated jobs.
Caution: JJB caches Jenkins job information locally. Changes made using the Jenkins UI will not update that cache, which may lead to confusion. See updating-jobs for more information.

Use Case 3: Working with JSON job definitions

You can also define your jobs in json instead of yaml:
jenkins-jobs --conf etc/jenkins_jobs.ini-sample update tests/jsonparser/fixtures/simple.json
The above command just uses a simple job definition. You can also convert any of the YAML examples to JSON and feed that to JJB.

Use Case 4: Deleting a job

To delete a job:
jenkins-jobs --conf etc/jenkins_jobs.ini-sample delete simple
The above command deletes the job simple from the Jenkins master.

Use Case 5: Providing plugins info

To generate a plugins info, using an account with Administrator rights:
jenkins-jobs get-plugins-info -o plugins_info.yaml
To run JJB update using the plugins_info.yaml:
jenkins-jobs update -p plugins_info.yaml ./myjobs
Please refer to the jenkins-jobs command-reference and the definition pages for

INSTALLATION

To install Jenkins Job Builder from source, run:
pip install --user jenkins-job-builder
A virtual environment is recommended for development. For example, Jenkins Job Builder may be installed from the top level directory:
$ virtualenv .venv
$ source .venv/bin/activate
$ pip install -r test-requirements.txt -e .
Alternatively, the current release can be installed from pypi:
sudo pip install jenkins-job-builder
The OpenStack project uses Puppet to manage its infrastructure systems, including Jenkins. If you use Puppet, you can use the OpenStack Jenkins module to install Jenkins Job Builder.

Documentation

Documentation is included in the doc folder. To generate docs locally execute the command:
tox -e docs
The generated documentation is then available under doc/build/html/index.html.
As over time URLs change or become stale there is also a testenv available to verify any links added. To run locally execute the command:
tox -e docs-linkcheck
o Note: When behind a proxy it is necessary to use TOX_TESTENV_PASSENV to pass any proxy settings for this test to be able to check links are valid.

Unit Tests

Unit tests have been included and are in the tests folder. We recently started including unit tests as examples in our documentation so to keep the examples up to date it is very important that we include unit tests for every module. To run the unit tests, execute the command:
tox -e py27
o Note: View tox.ini to run tests on other versions of Python.

Test Coverage

To measure test coverage, execute the command:
tox -e cover

CONFIGURATION FILE

After installation, you will need to create a configuration file. By default, jenkins-jobs looks for ~/.config/jenkins_jobs/jenkins_jobs.ini, <script directory>/jenkins_jobs.ini or /etc/jenkins_jobs/jenkins_jobs.ini (in that order), but you may specify an alternative location when running jenkins-jobs. The file should have the following format:
[job_builder]
ignore_cache=True
keep_descriptions=False
include_path=.:scripts:~/git/
recursive=False
exclude=.*:manual:./development
allow_duplicates=False
update=all

[jenkins] user=jenkins password=1234567890abcdef1234567890abcdef url=https://jenkins.example.com query_plugins_info=False ##### This is deprecated, use job_builder section instead #ignore_cache=True
[plugin "hipchat"] authtoken=dummy
[plugin "stash"] username=user password=pass

job_builder section

ignore_cache
(Optional) If set to True, Jenkins Job Builder won\(aqt use any cache.
keep_descriptions
By default jenkins-jobs will overwrite the jobs descriptions even if no description has been defined explicitly. When this option is set to True, that behavior changes and it will only overwrite the description if you specified it in the yaml. False by default.
include_path
(Optional) Can be set to a \(aq:\(aq delimited list of paths, which jenkins job builder will search for any files specified by the custom application yaml tags \(aqinclude\(aq, \(aqinclude-raw\(aq and \(aqinclude-raw-escape\(aq.
recursive
(Optional) If set to True, jenkins job builder will search for job definition files recursively.
exclude
(Optional) If set to a list of values separated by \(aq:\(aq, these paths will be excluded from the list of paths to be processed when searching recursively. Values containing no / will be matched against directory names at all levels, those starting with / will be considered absolute, while others containing a / somewhere other than the start of the value will be considered relative to the starting path.
allow_duplicates
(Optional) By default jenkins-jobs will abort when a duplicate macro, template, job-group or job name is encountered as it cannot establish the correct one to use. When this option is set to True, only a warning is emitted.
allow_empty_variables
(Optional) When expanding strings, by default jenkins-jobs will raise an exception if there\(aqs a key in the string, that has not been declared in the input YAML files. Setting this option to True will replace it with the empty string, allowing you to use those strings without having to define all the keys it might be using.
print_job_urls
(Optional) If set to True it will print full jobs urls while updating jobs, so user can be sure which instance was updated. User may click the link to go directly to that job. False by default.
retain_anchors
(Optional) If set to True, YAML anchors will be retained across files, allowing jobs to be composed from bits of YAML defined in separate files. Note this means that the order of processing files matters - jenkins-jobs loads files in alphabetical order (all files in a dir are loaded before any files in subdirs). For example, if your anchors are in a file named foo.yml they will be accessible in qux.yml but not in bar.yml. They will also be accessible in mydir/bar.yml and mydir/qux.yml. False by default.
update (Optional) If set, allows the user to specify if only "jobs" or "views" (or "all") are updated. Users can override the setting here by passing --jobs-only or --views-only CLI options. (Valid options: jobs, views, all)

jenkins section

user This should be the name of a user previously defined in Jenkins. Appropriate user permissions must be set under the Jenkins security matrix: under the Global group of permissions, check Read, then under the Job group of permissions, check Create, Delete, Configure and finally Read.
password
The API token for the user specified. You can get this through the Jenkins management interface under People -> username -> Configure and then click the Show API Token button.
url The base URL for your Jenkins installation.
timeout
(Optional) The connection timeout (in seconds) to the Jenkins server. By default this is set to the system configured socket timeout.
query_plugins_info
Whether to query the Jenkins instance for plugin info. If no configuration files are found (either in the default paths or given through the command-line), jenkins-jobs will skip querying for plugin information. True by default.

hipchat section

send-as This is the hipchat user name that will be used when sending notifications.
authtoken
The API token necessary to send messages to hipchat. This can be generated in the hipchat web interface by a user with administrative access for your organization. This authtoken is set for each job individually; the JJB Hipchat Plugin does not currently support setting different tokens for different projects, so the token you use will have to be scoped such that it can be used for any room your jobs might be configured to notify. For more information on this topic, please see the Hipchat API Documentation

stash section

username
This is the stash user name that will be used to connect to stash when using the stash publisher plugin and not defining it in the yaml part.
password
This is the related password that will be used with the stash username when using the stash publisher plugin and not defining it in the yaml part.

__future__ section

This section is to control enabling of beta features or behaviour changes that deviate from previously released behaviour in ways that may require effort to convert existing JJB configs to adopt. This essentially will act as a method to share these new behaviours while under active development so they can be changed ahead of releases.
param_order_from_yaml
Used to switch on using the order of the parameters are defined in yaml to control the order of corresponding XML elements being written out. This is intended as a global flag and can affect multiple modules.

RUNNING

After it\(aqs installed and configured, you can invoke Jenkins Job Builder by running jenkins-jobs. You won\(aqt be able to do anything useful just yet without a configuration; that is discussed in the next section.

Test Mode

Once you have a configuration defined, you can run the job builder in test mode.
If you want to run a simple test with just a single YAML job definition file and see the XML output on stdout:
jenkins-jobs test /path/to/foo.yaml
You can also pass JJB a directory containing multiple job definition files:
jenkins-jobs test /path/to/defs -o /path/to/output
which will write XML files to the output directory for all of the jobs defined in the defs directory.
If you run:
jenkins-jobs test /path/to/defs -o /path/to/output --config-xml
the output directory will contain config.xml files similar to the internal storage format of Jenkins. This might allow you to more easily compare the output to an existing Jenkins installation.

Updating Jobs

When you\(aqre satisfied with the generated XML from the test, you can run:
jenkins-jobs update /path/to/defs
which will upload the job and view definitions to Jenkins if needed. Jenkins Job Builder maintains, for each host, a cache [1] of previously configured jobs and views, so that you can run that command as often as you like, and it will only update the jobs configurations in Jenkins if the defined definitions have changed since the last time it was run. Note: if you modify a job directly in Jenkins, jenkins-jobs will not know about it and will not update it.
To update a specific list of jobs/views, simply pass the job/view names as additional arguments after the job definition path. To update Foo1 and Foo2 run:
jenkins-jobs update /path/to/defs Foo1 Foo2
You can also enable the parallel execution of the program passing the workers option with a value of 0, 2, or higher. Use 0 to run as many workers as cores in the host that runs it, and 2 or higher to specify the number of workers to use:
jenkins-jobs update --workers 0 /path/to/defs
To update only views or only jobs, simply add the argument --views-only or --jobs-only after the command:
jenkins-jobs update --views-only Foo-view
jenkins-jobs update --jobs-only Foo-job

Passing Multiple Paths

It is possible to pass multiple paths to JJB using colons as a path separator on *nix systems and semi-colons on Windows systems. For example:
jenkins-jobs test /path/to/global:/path/to/instance:/path/to/instance/project
This helps when structuring directory layouts as you may selectively include directories in different ways to suit different needs. If you maintain multiple Jenkins instances suited to various needs you may want to share configuration between those instances (global). Furthermore, there may be various ways you would like to structure jobs within a gi

RECURSIVE SEARCHING OF PATHS

In addition to passing multiple paths to JJB it is also possible to enable recursive searching to process all yaml files in the tree beneath each path. For example:
For a tree:
  /path/
    to/
      defs/
        ci_jobs/
        release_jobs/
      globals/
        macros/
        templates/

jenkins-jobs update -r /path/to/defs:/path/to/globals
JJB will search defs/ci_jobs, defs/release_jobs, globals/macros and globals/templates in addition to the defs and g

EXCLUDING PATHS

To allow a complex tree of jobs where some jobs are managed differently without needing to explicitly provide each path, the recursive path processing supports excluding paths based on absolute paths, relative paths and patterns. For example:
For a tree:
  /path/
    to/
      defs/
        ci_jobs/
          manual/
        release_jobs/
          manual/
        qa_jobs/
      globals/
        macros/
        templates/
        special/

jenkins-jobs update -r -x man*:./qa_jobs -x /path/to/defs/globals/special \ /path/to/defs:/path/to/globals
JJB will search the given paths, ignoring the directories qa_jobs, ci_jobs/manual, release_jobs/manual, and globals/special when building the list of yaml files to be processed. Absolute paths are denoted by starting from the root, relative by containing the path separator, and patterns by having neither. Patterns use simple shell globing to match directories.

Deleting Jobs/Views

Jenkins Job Builder supports deleting jobs and views from Jenkins.
To delete a specific job:
jenkins-jobs delete Foo1
To delete a list of jobs or views, simply pass them as additional arguments after the command:
jenkins-jobs delete Foo1 Foo2
To delete only views or only jobs, simply add the argument --views-only or --jobs-only after the command:
jenkins-jobs delete --views-only Foo1
jenkins-jobs delete --jobs-only Foo1
The update command includes a delete-old option to remove obsolete jobs:
jenkins-jobs update --delete-old /path/to/defs
Obsolete jobs are jobs once managed by JJB (as distinguished by a special comment that JJB appends to their description), that were not generated in this JJB run.
There is also a command to delete all jobs and/or views. WARNING: Use with caution.
To delete all jobs and views:
jenkins-jobs delete-all
TO delete all jobs:
jenkins-jobs delete-all --jobs-only
To delete all views:
jenkins-jobs delete-all --views-only

Globbed Parameters

Jenkins job builder supports globbed parameters to identify jobs from a set of definition files. This feature only supports JJB managed jobs.
To update jobs/views that only have \(aqfoo\(aq in their name:
jenkins-jobs update ./myjobs \*foo\*
To delete jobs/views that only have \(aqfoo\(aq in their name:
jenkins-jobs delete --path ./myjobs \*foo\*

Providing Plugins Info

With Jenkins LTS 1.651.1+ retrieving plugins info became a secure feature and now requires Administrator rights to use [#f2]. This causes JJB to no longer be able to work in situations where a user wants to publish jobs to Jenkins but is not able to receive the Administrator permissions. In this case we can provide a plugins_info.yaml file containing the plugin versions data needed by JJB to parse the job templates.
To generate a plugins info, using an account with Administrator rights: jenkins-jobs get-plugins-info -o plugins_info.yaml
To run JJB update using the plugins_info.yaml: jenkins-jobs update -p plugins_info.yaml ./myjobs

Command Reference

usage: jenkins-jobs [-h] [--conf CONF] [-l LOG_LEVEL] [--ignore-cache]
                    [--flush-cache] [--version] [--allow-empty-variables]
                    [--server SECTION] [--user USER] [--password PASSWORD]
                    {delete,delete-all,get-plugins-info,list,test,update} ...

positional arguments: {delete,delete-all,get-plugins-info,list,test,update} update, test, list or delete job delete-all delete *ALL* jobs from Jenkins server, including those not managed by Jenkins Job Builder. get-plugins-info get plugins info yaml by querying Jenkins server. list List jobs
optional arguments: -h, --help show this help message and exit --conf CONF configuration file [JJB_CONF] -l LOG_LEVEL, --log_level LOG_LEVEL log level (default: info) [JJB_LOG_LEVEL] --ignore-cache ignore the cache and update the jobs anyhow (that will only flush the specified jobs cache) --flush-cache flush all the cache entries before updating --version show version --allow-empty-variables Don\(aqt fail if any of the variables inside any string are not defined, replace with empty string instead. --server SECTION, -s SECTION The Jenkins server ini section to use. Defaults to \(aqjenkins\(aq [JJB_SECTION] --user USER, -u USER The Jenkins user to use for authentication. This overrides the user specified in the configuration file. [JJB_USER] --password PASSWORD, -p PASSWORD Password or API token to use for authenticating towards Jenkins. This overrides the password specified in the configuration file. [JJB_PASSWORD]
usage: jenkins-jobs test [-h] [-r] [-x EXCLUDE] [--config-xml]
                         [-p PLUGINS_INFO_PATH] [-o OUTPUT_DIR]
                         [path] [names [names ...]]

positional arguments: path colon-separated list of paths to YAML files or directories names name(s) of job(s)
optional arguments: -h, --help show this help message and exit -r, --recursive look for yaml files recursively -x EXCLUDE, --exclude EXCLUDE paths to exclude when using recursive search, uses standard globbing. --config-xml use alternative output file layout using config.xml files -p PLUGINS_INFO_PATH, --plugin-info PLUGINS_INFO_PATH path to plugin info YAML file -o OUTPUT_DIR path to output XML
usage: jenkins-jobs update [-h] [-r] [-x EXCLUDE] [--delete-old]
                           [-p PLUGINS_INFO_PATH] [--workers N_WORKERS]
                           [--existing-only] [-j | -v]
                           [path] [names [names ...]]

positional arguments: path colon-separated list of paths to YAML files or directories names name(s) of job(s)
optional arguments: -h, --help show this help message and exit -r, --recursive look for yaml files recursively -x EXCLUDE, --exclude EXCLUDE paths to exclude when using recursive search, uses standard globbing. --delete-old delete obsolete jobs -p PLUGINS_INFO_PATH, --plugin-info PLUGINS_INFO_PATH path to plugin info YAML file. Can be used to provide previously retrieved plugins info when connecting credentials don\(aqt have permissions to query. --workers N_WORKERS number of workers to use, 0 for autodetection and 1 for just one worker. --existing-only update existing jobs only -j, --jobs-only update only jobs -v, --views-only update only views
usage: jenkins-jobs delete-all [-h] [-r] [-x EXCLUDE] [-j] [-v]

optional arguments: -h, --help show this help message and exit -r, --recursive look for yaml files recursively -x EXCLUDE, --exclude EXCLUDE paths to exclude when using recursive search, uses standard globbing. -j, --jobs-only delete only jobs -v, --views-only delete only views
usage: jenkins-jobs delete [-h] [-r] [-x EXCLUDE] [-p PATH] [-j] [-v]
                           name [name ...]

positional arguments: name name of job
optional arguments: -h, --help show this help message and exit -r, --recursive look for yaml files recursively -x EXCLUDE, --exclude EXCLUDE paths to exclude when using recursive search, uses standard globbing. -p PATH, --path PATH colon-separated list of paths to YAML files or directories -j, --jobs-only delete only jobs -v, --views-only delete only views
usage: jenkins-jobs get-plugins-info [-h] [-o PLUGINS_INFO_FILE]

optional arguments: -h, --help show this help message and exit -o PLUGINS_INFO_FILE, --output-file PLUGINS_INFO_FILE file to save output to

FOOTNOTES

[1] The cache default location is at ~/.cache/jenkins_jobs, which can be overridden by setting the XDG_CACHE_HOME environment variable.
[2] Jenkins Security Advisory affecting plugins info retrieval https://wiki.jenkins-ci.org/display/SECURITY/Jenkins+Security+Advisory+2016-05-11

JOB DEFINITIONS

The job definitions for Jenkins Job Builder are kept in any number of YAML or JSON files, in whatever way you would like to organize them. When you invoke jenkins-jobs you may specify either the path of a single YAML file, or a directory. If you choose a directory, all of the .yaml/.yml or .json files in that directory will be read, and all the jobs they define will be created or updated.
NOTE: Jenkins Job Builder 2.x plugins are designed to default to generating the xml format for the latest supported version of JJB. This is a change in behaviour from 1.x and below which defaulted to the oldest supported plugin version.

Definitions

Jenkins Job Builder understands a few basic object types which are described in the next sections.

Job

The most straightforward way to create a job is simply to define a Job in YAML. It looks like this:
- job:
    name: job-name
That\(aqs not very useful, so you\(aqll want to add some actions such as builders, and perhaps publishers. Those are described later.
These are job parameters that are common to every type of Jenkins job.
Example:
- job:
    name: job-name
    project-type: freestyle
    defaults: global
    description: \(aqDo not edit this job through the web!\(aq
    disabled: false
    display-name: \(aqFancy job name\(aq
    concurrent: true
    workspace: /srv/build-area/job-name
    quiet-period: 5
    block-downstream: false
    block-upstream: false
    retry-count: 3
    node: NodeLabel1 || NodeLabel2
    logrotate:
      daysToKeep: 3
      numToKeep: 20
      artifactDaysToKeep: -1
      artifactNumToKeep: -1

Job Parameters
o project-type: Defaults to "freestyle", but "maven" as well as "multijob", "flow", "pipeline" or "externaljob" can also be specified.
o defaults: Specifies a set of Defaults to use for this job, defaults to \(aq\(aqglobal\(aq\(aq. If you have values that are common to all of your jobs, create a global Defaults object to hold them, and no further configuration of individual jobs is necessary. If some jobs should not use the global defaults, use this field to specify a different set of defaults.
o description: The description for the job. By default, the description "!-- Managed by Jenkins Job Builder" is applied.
o disabled: Boolean value to set whether or not this job should be disabled in Jenkins. Defaults to false (job will be enabled).
o display-name: Optional name shown for the project throughout the Jenkins web GUI in place of the actual job name. The jenkins_jobs tool cannot fully remove this trait once it is set, so use caution when setting it. Setting it to the same string as the job\(aqs name is an effective un-set workaround. Alternately, the field can be cleared manually using the Jenkins web interface.
o concurrent: Boolean value to set whether or not Jenkins can run this job concurrently. Defaults to false.
o workspace: Path for a custom workspace. Defaults to Jenkins default configuration.
o folder: The folder attribute provides an alternative to using \(aq<path>/<name>\(aq as the job name to specify which Jenkins folder to upload the job to. Requires the CloudBees Folders Plugin.
o child-workspace: Path for a child custom workspace. Defaults to Jenkins default configuration. This parameter is only valid for matrix type jobs.
o quiet-period: Number of seconds to wait between consecutive runs of this job. Defaults to 0.
o block-downstream: Boolean value to set whether or not this job must block while downstream jobs are running. Downstream jobs are determined transitively. Defaults to false.
o block-upstream: Boolean value to set whether or not this job must block while upstream jobs are running. Upstream jobs are determined transitively. Defaults to false.
o auth-token: Specifies an authentication token that allows new builds to be triggered by accessing a special predefined URL. Only those who know the token will be able to trigger builds remotely.
o retry-count: If a build fails to checkout from the repository, Jenkins will retry the specified number of times before giving up.
o node: Restrict where this job can be run. If there is a group of machines that the job can be built on, you can specify that label as the node to tie on, which will cause Jenkins to build the job on any of the machines with that label. For matrix projects, this parameter will only restrict where the parent job will run.
o logrotate: The Logrotate section allows you to automatically remove old build history. It adds the logrotate attribute to the Job definition. All logrotate attributes default to "-1" (keep forever). Deprecated on jenkins >=1.637: use the build-discarder property instead
o jdk: The name of the jdk to use
o raw: If present, this section should contain a single xml entry. This XML will be inserted at the top-level of the Job definition.

Job Template

If you need several jobs defined that are nearly identical, except perhaps in their names, SCP targets, etc., then you may use a Job Template to specify the particulars of the job, and then use a Project to realize the job with appropriate variable substitution. Any variables not specified at the project level will be inherited from the Defaults.
A Job Template has the same syntax as a Job, but you may add variables anywhere in the definition. Variables are indicated by enclosing them in braces, e.g., {name} will substitute the variable name. When using a variable in a string field, it is good practice to wrap the entire string in quotes, even if the rules of YAML syntax don\(aqt require it because the value of the variable may require quotes after substitution. In the rare situation that you must encode braces within literals inside a template (for example a shell function definition in a builder), doubling the braces will prevent them from being interpreted as a template variable.
You must include a variable in the name field of a Job Template (otherwise, every instance would have the same name). For example:
- job-template:
    name: \(aq{name}-unit-tests\(aq
Will not cause any job to be created in Jenkins, however, it will define a template that you can use to create jobs with a Project definition. It\(aqs name will depend on what is supplied to the Project.
If you use the variable {template-name}, the name of the template itself (e.g. {name}-unit-tests in the above example) will be substituted in. This is useful in cases where you need to trace a job back to its template.
Sometimes it is useful to have the same job name format used even where the template contents may vary. Ids provide a mechanism to support such use cases in addition to simplifying referencing templates when the name contains the more complex substitution with default values.

Default Values for Template Variables

To facilitate reuse of templates with many variables that can be substituted, but where in most cases the same or no value is needed, it is possible to specify defaults for the variables within the templates themselves.
There are 2 ways JJB allows us to define defaults for a parameter in a job-template.
1. Defining the default variable value in the job-template itself
With this method we declare the default value of the variable in the job-template itself just once. We can section off the job-template into two sections like this:
- job-template:
    name: \(aq{project-name}-verify\(aq

##################### # Variable Defaults # #####################
branch: master
##################### # Job Configuration # #####################
parameters: - string: name: BRANCH default: \(aq{branch}\(aq
scm: - git: refspec: \(aqrefs/heads/{branch}\(aq
In this case there is still two branch definitions for the job-template. However we also provide the default value for the {branch} variable at the top of the file. Just once. This will be the value that the job takes on if it is not passed in by a project using the template.
2. Using {var|default}
In this method we can define the default with the definition of the variable. For example:
- job-template:
    name: \(aq{project-name}-verify\(aq
    parameters:
      - string:
          name: BRANCH
          default: \(aq{branch|master}\(aq
However where this method falls apart if we need to use the same JJB variable in more than one place as we will have multiple places to define the default value for the template. For example:
- job-template:
    name: \(aq{project-name}-verify\(aq
    parameters:
      - string:
          name: BRANCH
          default: \(aq{branch|master}\(aq

scm: - git: refspec: \(aqrefs/heads/{branch|master}\(aq
We can see in this case the {branch|master} variable is defined in two places. Not ideal.
More complex example:
- project:
    name: template_variable_defaults
    jobs:
        - \(aqtemplate-variable-defaults-{num}\(aq:
            num: 1
            disabled_var: true
        - \(aqtemplate-variable-defaults-{num}\(aq:
            test_var: Goodbye World
            num: 2

- job-template: # template specific defaults # empty value causes disabled_var to be ignored internally disabled_var: test_var: Hello World type: periodic
# template settings name: \(aqtemplate-variable-defaults-{num}-{type}\(aq id: \(aqtemplate-variable-defaults-{num}\(aq disabled: \(aq{obj:disabled_var}\(aq builders: - shell: | echo "Job Name: template-variable-defaults-{num}-{type}" echo "Variable: {test_var}"
To use a default value for a variable used in the name would be uncommon unless it was in addition to another variable. However you can use Ids simplify such use cases.

Project

The purpose of a project is to collect related jobs together, and provide values for the variables in a Job Template. It looks like this:
- project:
    name: project-name
    jobs:
      - \(aq{name}-unit-tests\(aq
Any number of arbitrarily named additional fields may be specified, and they will be available for variable substitution in the job template. Any job templates listed under jobs: will be realized with those values. The example above would create the job called \(aqproject-name-unit-tests\(aq in Jenkins.
The jobs: list can also allow for specifying job-specific substitutions as follows:
- project:
    name: project-name
    jobs:
      - \(aq{name}-unit-tests\(aq:
          mail-to: 
      - \(aq{name}-perf-tests\(aq:
          mail-to: 
If a variable is a list, the job template will be realized with the variable set to each value in the list. Multiple lists will lead to the template being realized with the cartesian product of those values. Example:
- project:
    name: project-name
    pyver:
      - 26
      - 27
    jobs:
      - \(aq{name}-{pyver}\(aq
If there are templates being realized that differ only in the variable used for its name (thus not a use case for job-specific substitutions), additional variables can be specified for project variables. Example:
- job-template:
    name: \(aq{name}-{pyver}\(aq
    builders:
      - shell: \(aqgit co {branch_name}\(aq

- project: name: project-name pyver: - 26: branch_name: old_branch - 27: branch_name: new_branch jobs: - \(aq{name}-{pyver}\(aq
You can also specify some variable combinations to exclude from the matrix with the exclude keyword, to avoid generating jobs for those combinations. You can specify all the variables of the combination or only a subset, if you specify a subset, any value of the omited variable will match:
- project:
    name: project-name
    axe1:
      - axe1val1
      - axe1val2
    axe2:
      - axe2val1
      - axe2val2
    axe3:
      - axe3val1
      - axe3val2
    exclude:
      - axe1: axe1val1
        axe2: axe2val1
        axe3: axe3val2
      - axe2: axe2val2
        axe3: axe3val1
    jobs:
      - build-{axe1}-{axe2}-{axe3}

- job-template: name: build-{axe1}-{axe2}-{axe3} builders: - shell: "echo Combination {axe1}:{axe2}:{axe3}"
The above example will omit the jobs:
o build-axe1val1-axe2val1-axe3val2
o build-axe1val1-axe2val2-axe3val1
o build-axe1val2-axe2val2-axe3val1
To achieve the same without the exclude tag one would have to do something a bit more complicated, that gets more complicated for each dimension in the combination, for the previous example, the counterpart would be:
- project:
    name: project-name_comb1
    axe1:
      - axe1val1
      - axe1val2
    axe2: axe2val1
    axe3: axe3val1
    jobs:
      - build-{axe1}-{axe2}-{axe3}

- project: name: project-name_comb2 axe1: - axe1val1 - axe1val2 axe2: axe2val2 axe3: axe3val2 jobs: - build-{axe1}-{axe2}-{axe3}
- project: name: project-name_comb3 axe1: axe1val2 axe2: axe2val1 axe3: axe3val2 jobs: - build-{axe1}-{axe2}-{axe3}
- job-template: name: build-{axe1}-{axe2}-{axe3} builders: - shell: "echo Combination {axe1}:{axe2}:{axe3}"

Job Group

If you have several Job Templates that should all be realized together, you can define a Job Group to collect them. Simply use the Job Group where you would normally use a Job Template and all of the Job Templates in the Job Group will be realized. For example:
- job-template:
    name: \(aq{name}-unit-tests\(aq
    builders:
    - shell: unittest
    publishers:
    - email:
        recipients: \(aq{mail-to}\(aq

- job-template: name: \(aq{name}-perf-tests\(aq builders: - shell: perftest publishers: - email: recipients: \(aq{mail-to}\(aq
- job-group: name: \(aq{name}-tests\(aq jobs: - \(aq{name}-unit-tests\(aq: mail-to: - \(aq{name}-perf-tests\(aq: mail-to:
- project: name: project-name jobs: - \(aq{name}-tests\(aq
Would cause the jobs project-name-unit-tests and project-name-perf-tests to be created in Jenkins.

Views

A view is a particular way of displaying a specific set of jobs. To create a view, you must define a view in a YAML file and have a variable called view-type with a valid value. It looks like this:
- view:
    name: view-name
    view-type: list
Views are processed differently than Jobs and therefore will not work within a Project or a Job Template.

View Template

Allow views to also be configured via templates similar to job-templates. This is useful when you have multiple views defined that have similar configuration except for a few variables. View Templates can be passed variables to fill in sections automatically via a project configuration using the new \(aqviews\(aq key.
Minimal Example:
- view-template:
    name: \(aq{name}-template-{seq}\(aq
    description: \(aqtesting view templates feature\(aq
    view-type: list
    regex: \(aqtest-view-.*\(aq

- project: name: \(aqtest-view\(aq views: - \(aq{name}-template-{seq}\(aq seq: - a - b - c

Macro

Many of the actions of a Job, such as builders or publishers, can be defined as a Macro, and then that Macro used in the Job description. Builders are described later, but let\(aqs introduce a simple one now to illustrate the Macro functionality. This snippet will instruct Jenkins to execute "make test" as part of the job:
- job:
    name: foo-test
    builders:
      - shell: \(aqmake test\(aq
If you wanted to define a macro (which won\(aqt save much typing in this case, but could still be useful to centralize the definition of a commonly repeated task), the configuration would look like:
- builder:
    name: make-test
    builders:
      - shell: \(aqmake test\(aq

- job: name: foo-test builders: - make-test
This allows you to create complex actions (and even sequences of actions) in YAML that look like first-class Jenkins Job Builder actions. Not every attribute supports Macros, check the documentation for the action before you try to use a Macro for it.
Macros can take parameters, letting you define a generic macro and more specific ones without having to duplicate code:
# The \(aqadd\(aq macro takes a \(aqnumber\(aq parameter and will creates a
# job which prints \(aqAdding \(aq followed by the \(aqnumber\(aq parameter:
- builder:
    name: add
    builders:
     - shell: "echo Adding {number}"

# A specialized macro \(aqaddtwo\(aq reusing the \(aqadd\(aq macro but with # a \(aqnumber\(aq parameter hardcoded to \(aqtwo\(aq: - builder: name: addtwo builders: - add: number: "two"
# Glue to have Jenkins Job Builder to expand this YAML example: - job: name: "testingjob" builders: # The specialized macro: - addtwo # Generic macro call with a parameter - add: number: "ZERO" # Generic macro called without a parameter. Never do this! # See below for the resulting wrong output :( - add
Then <builders /> section of the generated job show up as:
<builders>
  <hudson.tasks.Shell>
    <command>echo Adding two</command>
  </hudson.tasks.Shell>
  <hudson.tasks.Shell>
    <command>echo Adding ZERO</command>
  </hudson.tasks.Shell>
  <hudson.tasks.Shell>
    <command>echo Adding {number}</command>
  </hudson.tasks.Shell>
</builders>
As you can see, the specialized macro addtwo reused the definition from the generic macro add.

Macro Notes

If a macro is not passed any parameters it will not have any expansion performed on it. Thus if you forget to provide any parameters to a macro that expects some, the parameter-templates ({foo}) will be left as is in the resulting output; this is almost certainly not what you want. Note if you provide an invalid parameter, the expansion will fail; the expansion will only be skipped if you provide no parameters at all.
Macros are expanded using Python string substitution rules. This can especially cause confusion with shell snippets that use { as part of their syntax. As described, if a macro has no parameters, no expansion will be performed and thus it is correct to write the script with no escaping, e.g.:
- builder:
  name: a_builder
  builders:
    - shell: |
        VARIABLE=${VARIABLE:-bar}
        function foo {
            echo "my shell function"
        }
However, if the macro has parameters, you must escape the { you wish to make it through to the output, e.g.:
- builder:
  name: a_builder
  builders:
     - shell: |
       PARAMETER={parameter}
       VARIABLE=${{VARIABLE:-bar}}
       function foo {{
            echo "my shell function"
       }}
Note that a job-template will have parameters by definition (at least a name). Thus embedded-shell within a job-template should always use {{ to achieve a literal {. A generic builder will need to consider the correct quoting based on its use of parameters.

Folders

Jenkins supports organising jobs, views, and slaves using a folder hierarchy. This allows for easier separation of access as well credentials and resources which can be assigned to only be available for a specific folder.
JJB has two methods of supporting uploading jobs to a specific folder:
o Name the job to contain the desired folder <folder>/my-job-name
o Use the folder attribute on a job definition, via a template, or through Defaults.
Supporting both an attributed and use of it directly in job names allows for teams to have all jobs using their defaults automatically use a top-level folder, while still allowing for them to additionally nest jobs for their own preferences.
Job Name Example:
- job:
    name: python-jobs/tox-py27
    builders:
      - shell: |
          tox -e py27

Folder Attribute Example:
- defaults:
    name: team1
    folder: team1-jobs

- job: name: ruby-jobs/rspec defaults: team1 builders: - shell: | rvm use --create ruby-2.3.0@rspec bundle install bundle exec rspec

Item ID\(aqs

It\(aqs possible to assign an id to any of the blocks and then use that to reference it instead of the name. This has two primary functions:
o A unique identifier where you wish to use the same naming format for multiple templates. This allows you to follow a naming scheme while still using multiple templates to handle subtle variables in job requirements.
o Provides a simpler name for a job-template where you have multiple variables including default values in the name and don\(aqt wish to have to include this information in every use. This also makes changing the template output name without impacting references.
Example:
- project:
    name: test_template_id
    jobs:
        - \(aqsimple-template\(aq:
            test_var: Hello World
            type: periodic
            num: 1
        - \(aqnot-as-simple-template\(aq:
            test_var: Goodbye World
            type: canary
            num: 2

- job-template: name: \(aqtemplate-test-ids-{num}-{type}\(aq id: simple-template builders: - shell: | echo "Template name: {template-name}" echo "Job name: template-test-ids-{num}-{type}" echo "{test_var}"
- job-template: name: \(aqtemplate-test-ids-{num}-{type}\(aq id: not-as-simple-template builders: - shell: | echo "Template name: {template-name}" echo "Job name: template-test-ids-{num}-{type}" - shell: | echo "{test_var}"

Raw config

It is possible, but not recommended, to use raw within a module to inject raw xml into the job configs.
This is relevant in case there is no appropriate module for a Jenkins plugin or the module does not behave as you expect it to do.
For example:
wrappers:
  - raw:
      xml: |
        <hudson.plugins.xvnc.Xvnc>
          <takeScreenshot>true</takeScreenshot>
          <useXauthority>false</useXauthority>
        </hudson.plugins.xvnc.Xvnc>

Is the raw way of adding support for the xvnc wrapper.
To get the appropriate xml to use you would need to create/edit a job in Jenkins and grab the relevant raw xml segment from the config.xml.
The xml string can refer to variables just like anything else and as such can be parameterized like anything else.
You can use raw in most locations, the following example show them with arbitrary xml-data:
- project:
    name: complete002
    version:
        - 1.2
    jobs:
        - \(aqcomplete001_{version}\(aq

- job-template: name: \(aqcomplete001_{version}\(aq project-type: maven scm: - raw: xml: | <!-- <scm> for raw replaces the whole scm section. where as for others the raw part is added to the existing. --> <scm> <scmraw/> </scm> triggers: - raw: xml: | <triggersraw/> wrappers: - raw: xml: | <wrappersraw/> builders: - raw: xml: | <buildersraw/> publishers: - raw: xml: | <publishersraw/> properties: - raw: xml: | <propertiesraw/> parameters: - raw: xml: | <parametersraw/> notifications: - raw: xml: | <metadataraw/> reporters: - raw: xml: <reportersraw/>
Note: If you have a need to use raw please consider submitting a patch to add or fix the module that will remove your need to use raw.

Defaults

Defaults collect job attributes (including actions) and will supply those values when the job is created, unless superseded by a value in the \(aqJob\(aq_ definition. If a set of Defaults is specified with the name global, that will be used by all Job (and Job Template) definitions unless they specify a different Default object with the defaults attribute. For example:
- defaults:
    name: global
    description: \(aqDo not edit this job through the web!\(aq
Will set the job description for every job created.
You can define variables that will be realized in a Job Template.
- defaults:
    name: global
    arch: \(aqi386\(aq

- project: name: project-name jobs: - \(aqbuild-{arch}\(aq - \(aqbuild-{arch}\(aq: arch: \(aqamd64\(aq
- job-template: name: \(aqbuild-{arch}\(aq builders: - shell: "echo Build arch {arch}."
Would create jobs build-i386 and build-amd64.
You can also reference a variable {template-name} in any value and it will be subtitued by the name of the current job template being processed.

Variable References

If you want to pass an object (boolean, list or dict) to templates you can use an {obj:key} variable in the job template. This triggers the use of code that retains the original object type.
For example:
- project:
    name: test_custom_distri
    disabled: true
    distributions: !!python/tuple [precise, jessie]
    architectures: !!python/tuple &architectures
      - amd64
      - i386
    axis_a:
        type: user-defined
        name: architectures
        values: *architectures
    jobs:
      - \(aq{name}-source\(aq

- job-template: name: \(aq{name}-source\(aq project-type: matrix disabled: \(aq{obj:disabled}\(aq axes: - axis: type: user-defined name: distribution values: \(aq{obj:distributions}\(aq - axis: \(aq{obj:axis_a}\(aq
JJB also supports interpolation of parameters within parameters. This allows a little more flexibility when ordering template jobs as components in different projects and job groups.
For example:
- job-template:
    name: \(aq{value-stream}_{project-id}_foo\(aq
    display-name: \(aq{value-stream} {project-id} foo\(aq
    publishers:
        - trigger-parameterized-builds:
            - project: \(aq{downstream}\(aq
              current-parameters: False
              condition: ALWAYS
              git-revision: True

- job-template: name: \(aq{value-stream}_{project-id}_bar\(aq display-name: \(aq{value-stream} {project-id} bar\(aq publishers: - trigger-parameterized-builds: - project: \(aq{downstream}\(aq current-parameters: False condition: ALWAYS git-revision: True
- job-group: name: \(aqpipeline2\(aq project-id: \(aqp2\(aq jobs: - \(aq{value-stream}_{project-id}_foo\(aq: downstream: \(aq{value-stream}_{project-id}_bar\(aq - \(aq{value-stream}_{project-id}_bar\(aq:
- job-group: name: \(aqpipeline1\(aq project-id: \(aqp1\(aq jobs: - \(aq{value-stream}_{project-id}_bar\(aq: downstream: \(aq{value-stream}_{project-id}_foo\(aq - \(aq{value-stream}_{project-id}_foo\(aq:
- project: name: derp jobs: - \(aqpipeline1\(aq: value-stream: \(aqproduction\(aq - \(aqpipeline2\(aq: value-stream: \(aqexperimental\(aq
- defaults: name: \(aqglobal\(aq downstream: \(aq\(aq
By default JJB will fail if it tries to interpolate a variable that was not defined, but you can change that behavior and allow empty variables with the allow_empty_variables configuration option.
For example, having a configuration file with that option enabled:
[job_builder]
allow_empty_variables = True

Will prevent JJb from failing if there are any non-initialized variables used and replace them with the empty string instead.
TIP: Refer to Default Values for Template Variables for details on setting variable defaults.

Variable Inheritence

It is possible in JJB to define defaults for variables at different levels such that it is possible for users of job-templates to override variables defined in the job-template.
Variable priorities for each definition type are as follows:
1. job-group
2. project
3. job-template
4. defaults
From this list we can immediately see that if we want to make variables in job-templates override-able then using defaults configuration is useless as it has the lowest precedence when JJB is deciding where to pull from.
On the other side of the spectrum, job-groups has the highest precedence. Which unfortunately means if we define a variable in a job-group with the intention of overriding it at the project level then we are out of luck. For this reason avoid setting variables in job-groups unless we want to enforce a setting for a set of jobs and prevent projects from overriding it.

Declaring variable defaults

Refer to Default Values for Template Variables for details on how to declare variable defaults.

Overriding job-template variables

When a project wants to use a job-template it can use override it as follows:
- project:
    name: foo
    jobs:
      - \(aq{project-name}-merge\(aq
      - \(aq{project-name}-verify\(aq

branch: master
This is the standard way that most folks use and it will set branch: master for every job-template in the list. However sometimes we may want to provide an alternative value for a specific job in the list. In this case the more specific declaration takes precendence:
- project:
    name: foo
    jobs:
      - \(aq{project-name}-merge\(aq:
          branch: production
      - \(aq{project-name}-verify\(aq

branch: master
In this case the verify job will get the value master but the merge job will instead get the branch value production.

Yaml Anchors & Aliases

The yaml specification supports anchors and aliases which means that JJB definitions allow references to variables in templates.
For example:
- wrapper_defaults: &wrapper_defaults
    name: \(aqwrapper_defaults\(aq
    wrappers:
      - timeout:
          timeout: 180
          fail: true
      - timestamps

- job_defaults: &job_defaults name: \(aqdefaults\(aq <<: *wrapper_defaults
- job-template: name: \(aqmyjob\(aq <<: *job_defaults
- project: name: myproject jobs: - myjob
The anchors and aliases are expanded internally within JJB\(aqs yaml loading calls and are not limited to individual documents. That means you can\(aqt use the same anchor name in included files without collisions.
A simple example can be seen in the specs full length example with the following being more representative of usage within JJB:
- wrapper_defaults: &wrapper_defaults
    name: \(aqwrapper_defaults\(aq
    wrappers:
      - timeout:
          timeout: 180
          fail: true
      - timestamps

- job_defaults: &job_defaults name: \(aqdefaults\(aq <<: *wrapper_defaults
- job-template: name: \(aqmyjob\(aq <<: *job_defaults
Which will be expanded to the following yaml before being processed:
- wrapper_defaults:
    name: wrapper_defaults
    wrappers:
    - timeout:
        fail: true
        timeout: 180
    - timestamps
- job_defaults:
    name: defaults
    wrappers:
    - timeout:
        fail: true
        timeout: 180
    - timestamps
- job-template:
    name: myjob
    wrappers:
    - timeout:
        fail: true
        timeout: 180
    - timestamps

Custom Yaml Tags

Custom application specific yamls tags are supported to provide enhancements when reading yaml configuration.

Action Tags

These allow manipulation of data being stored in one layout in the source yaml for convenience and/or clarity, to another format to be processed by the targeted module instead of requiring all modules in JJB being capable of supporting multiple input formats.
The tag !join: will treat the first element of the following list as the delimiter to use, when joining the remaining elements into a string and returning a single string to be consumed by the specified module option.
This allows users to maintain elements of data in a list structure for ease of review/maintenance, and have the yaml parser convert it to a string for consumption as any argument for modules. The main expected use case is to allow for generic plugin data such as shell properties to be populated from a list construct which the yaml parser converts to a single string, instead of trying to support this within the module code which would require a templating engine similar to Jinja.
Generic Example:
- string-with-comma: !join:
    - \(aq,\(aq
    -
        - item1
        - item2
        - item3

- string-with-space: !join: - \(aq \(aq - - item1 - item2 - item3
Environment Inject:
- project:
    name: string_join_example
    jobs:
        - \(aqstring-join-data-{name}\(aq:
            name: set1
            files: !join:
              - \(aq,\(aq
              -
                - /path/to/file1
                - /path/to/file2
                - /path/to/file3
                - /path/to/file4
                - /path/to/file5
                - /path/to/file6
                - /path/to/file7
                - /path/to/file8
                - /path/to/file9
                - /path/to/file10
                - /path/to/file11
                - /path/to/file12
                - /path/to/file13
                - /path/to/file14
                - /path/to/file15
                - /path/to/file16
                - /path/to/file17
                - /path/to/file18
                - /path/to/file19
                - /path/to/file20
        - \(aqstring-join-data-{name}\(aq:
            name: set2
            files: !join:
              - \(aq,\(aq
              -
                - /another/different/path/to/file1
                - /another/different/path/to/file2
                - /another/different/path/to/file3
                - /another/different/path/to/file4
                - /another/different/path/to/file5
                - /another/different/path/to/file6
                - /another/different/path/to/file7
                - /another/different/path/to/file8
                - /another/different/path/to/file9
                - /another/different/path/to/file10
                - /another/different/path/to/file11
                - /another/different/path/to/file12
                - /another/different/path/to/file13
                - /another/different/path/to/file14
                - /another/different/path/to/file15
                - /another/different/path/to/file16
                - /another/different/path/to/file17
                - /another/different/path/to/file18
                - /another/different/path/to/file19
                - /another/different/path/to/file20

- job-template: name: \(aqstring-join-data-{name}\(aq properties: - inject: keep-system-variables: true properties-content: | FILE_LIST={files} builders: - shell: | echo "Template name: {template-name}" echo "Data to be processed:" echo "${{INPUT_DATA}}"
While this mechanism can also be used items where delimiters are supported by the module, that should be considered a bug that the existing code doesn\(aqt handle being provided a list and delimiter to perform the correct conversion for you. Should you discover a module that takes arguments with delimiters and the existing JJB codebase does not handle accepting lists, then this can be used as a temporary solution in place of using very long strings:
Extended Params Example:
parameters:
  - extended-choice:
      name: OPTIONS
      description: "Available options"
      property-file: /home/foo/property.prop
      property-key: key
      quote-value: true
      type: multi-select
      value: "foo|bar|select"
      visible-items: 2
      multi-select-delimiter: \(aq|\(aq
      default-value: foo
      default-property-file: /home/property.prop
      default-property-key: fookey
  - extended-choice:
      name: OPTIONS_CHECKBOX
      type: checkbox
      value: !join:
        - \(aq,\(aq
        -
            - OptionA
            - OptionB
            - OptionC
      visible-items: 2
  - extended-choice:
      name: MULTISELECTOPTIONS
      description: "Available options"
      property-key: key
      quote-value: true
      type: multi-select
      value: !join:
        - \(aq|\(aq
        -
            - foo
            - bar
            - select
      visible-items: 2
      multi-select-delimiter: \(aq|\(aq
      default-value: foo

Inclusion Tags

These allow inclusion of arbitrary files as a method of having blocks of data managed separately to the yaml job configurations. A specific usage of this is inlining scripts contained in separate files, although such tags may also be used to simplify usage of macros or job templates.
The tag !include: will treat the following string as file which should be parsed as yaml configuration data.
Example:
- job:
    name: test-job-1
    builders:
      !include: include001.yaml.inc

contents of include001.yaml.inc:
- timeout-wrapper
- pre-scm-shell-ant
- copy-files

The tag !include-raw: will treat the given string or list of strings as filenames to be opened as one or more data blob, which should be read into the calling yaml construct without any further parsing. Any data in a file included through this tag, will be treated as string data.
Examples:
- job:
    name: test-job-include-raw-1
    builders:
      - shell:
          !include-raw: include-raw001-hello-world.sh
      - shell:
          !include-raw: include-raw001-vars.sh

contents of include-raw001-hello-world.sh:
#!/bin/bash
#
# Sample script showing how the yaml include-raw tag can be used
# to inline scripts that are maintained outside of the jenkins
# job yaml configuration.

echo "hello world"
exit 0
contents of include-raw001-vars.sh:
#!/bin/bash
#
# sample script to check that brackets aren\(aqt escaped
# when using the include-raw application yaml tag

VAR1="hello" VAR2="world" VAR3="${VAR1} ${VAR2}"
[[ -n "${VAR3}" ]] && { # this next section is executed as one echo "${VAR3}" exit 0 }
using a list of files:
- job:
    name: test-job-include-raw-1
    builders:
      - shell:
          !include-raw:
              - include-raw001-hello-world.sh
              - include-raw001-vars.sh

The tag !include-raw-escape: treats the given string or list of strings as filenames to be opened as one or more data blobs, which should be escaped before being read in as string data. This allows job-templates to use this tag to include scripts from files without needing to escape braces in the original file.
WARNING: When used as a macro !include-raw-escape: should only be used if parameters are passed into the escaped file and you would like to escape those parameters. If the file does not have any jjb parameters passed into it then !include-raw: should be used instead otherwise you will run into an interesting issue where include-raw-escape: actually adds additional curly braces around existing curly braces. For example ${PROJECT} becomes ${{PROJECT}} which may break bash scripts.
Examples:
- job-template:
    name: test-job-include-raw-{num}
    builders:
      - shell:
          !include-raw-escape: include-raw001-hello-world.sh
      - shell:
          !include-raw-escape: include-raw001-vars.sh

- project: name: test-job-template-1 num: 1 jobs: - \(aqtest-job-include-raw-{num}\(aq
contents of include-raw001-hello-world.sh:
#!/bin/bash
#
# Sample script showing how the yaml include-raw tag can be used
# to inline scripts that are maintained outside of the jenkins
# job yaml configuration.

echo "hello world"
exit 0
contents of include-raw001-vars.sh:
#!/bin/bash
#
# sample script to check that brackets aren\(aqt escaped
# when using the include-raw application yaml tag

VAR1="hello" VAR2="world" VAR3="${VAR1} ${VAR2}"
[[ -n "${VAR3}" ]] && { # this next section is executed as one echo "${VAR3}" exit 0 }
using a list of files:
- job-template:
    name: test-job-include-raw-{num}
    builders:
      - shell:
          !include-raw-escape:
              - include-raw001-hello-world.sh
              - include-raw001-vars.sh

- project: name: test-job-template-1 num: 1 jobs: - \(aqtest-job-include-raw-{num}\(aq
For all the multi file includes, the files are simply appended using a newline character.
To allow for job templates to perform substitution on the path names, when a filename containing a python format placeholder is encountered, lazy loading support is enabled, where instead of returning the contents back during yaml parsing, it is delayed until the variable substitution is performed.
Example:
- wrapper:
    !include: lazy-load-jobs-timeout.yaml.inc

- project: name: test version: - 1.1 jobs: - \(aqbuild_myproject_{version}\(aq
- job-template: name: \(aqbuild_myproject_{version}\(aq wrappers: !include: lazy-load-wrappers-{version}.yaml.inc builders: - shell: !include-raw: echo_vars_{version}.sh
using a list of files:
- wrapper:
    !include: lazy-load-jobs-timeout.yaml.inc

- project: name: test num: "002" version: - 1.1 jobs: - \(aqbuild_myproject_{version}\(aq
- job-template: name: \(aqbuild_myproject_{version}\(aq wrappers: !include: lazy-load-wrappers-{version}.yaml.inc builders: - shell: !include-raw: - lazy-load-scripts/echo_vars_{version}.sh - include-raw{num}-cool.sh
NOTE: Because lazy-loading involves performing the substitution on the file name, it means that jenkins-job-builder can not call the variable substitution on the contents of the file. This means that the !include-raw: tag will behave as though !include-raw-escape: tag was used instead whenever name substitution on the filename is to be performed.
Given the behaviour described above, when substitution is to be performed on any filename passed via !include-raw-escape: the tag will be automatically converted to !include-raw: and no escaping will be performed.
The tag !include-jinja2: will treat the given string or list of strings as filenames to be opened as Jinja2 templates, which should be rendered to a string and included in the calling YAML construct. (This is analogous to the templating that will happen with !include-raw.)
Examples:
- builder:
    name: test-builder
    builders:
        - shell:
            !include-jinja2: jinja01.yaml.inc

- job: name: test-job builders: - test-builder: var: "test variable" test_list: - a - b - c
contents of jinja01.yaml.inc:
{{ var }}
{% for item in test_list -%}
{{ item }}
{% endfor %}

The tag !j2: takes a string and treats it as a Jinja2 template. It will be rendered (with the variables in that context) and included in the calling YAML construct.
Examples:
- builder:
    name: test-builder
    builders:
        - shell:
            !j2: |
                {{ var }}
                {% for item in test_list -%}
                {{ item }}
                {% endfor %}

- job: name: test-job builders: - test-builder: var: "test variable" test_list: - a - b - c

Modules

The bulk of the job definitions come from the following modules.

ExternalJob Project

The External Job Project module handles creating ExternalJob Jenkins projects. You may specify externaljob in the project-type attribute of the Job definition.
This type of job allows you to record the execution of a process run outside Jenkins, even on a remote machine. This is designed so that you can use Jenkins as a dashboard of your existing automation system.
Requires the Jenkins External Monitor Job Type Plugin.
Example:
name: openstack-infra
project-type: externaljob

class project_externaljob.ExternalJob(registry)

Flow Project

The flow Project module handles creating Jenkins flow projects. You may specify flow in the project-type attribute of the Job definition.
Requires the Jenkins Build Flow Plugin.
In order to use it for job-template you have to escape the curly braces by doubling them in the DSL: { -> {{ , otherwise it will be interpreted by the python str.format() command.
Job Parameters
o dsl (str): The DSL content. (optional)
o needs-workspace (bool): This build needs a workspace. (default false)
o dsl-file (str): Path to the DSL script in the workspace. Has effect only when needs-workspace is true. (optional)
Job example:
- job:
      name: test_job
      project-type: flow
      dsl: |
        build("job1")
        parallel (
          { build("job2a") },
          { build("job2b") }
        )

Job template example:
- job-template:
    name: \(aq{name}-unit-tests\(aq
    project-type: flow
    dsl: |
        build("job1")
        parallel (
            {{ build("job2a") }},
            {{ build("job2b") }}
        )
        build("job2c")
    builders:
    - shell: unittest
    publishers:
    - email:
        recipients: \(aq{mail-to}\(aq

- job-group: name: \(aq{name}-tests\(aq jobs: - \(aq{name}-unit-tests\(aq: mail-to:
- project: name: project-name jobs: - \(aq{name}-tests\(aq
Job example runninng a DSL file from the workspace:
- job:
      name: test_job
      project-type: flow
      needs-workspace: true
      dsl-file: script.groovy

class project_flow.Flow(registry)

Folder Project

The folder Project module handles creating Jenkins folder projects. You may specify folder in the project-type attribute of the Job definition.
Requires the Jenkins CloudBees Folders Plugin.
Job example:
- job:
    name: folder_test
    project-type: folder

Job template example:
- job-template:
    name: \(aqfolder-{name}\(aq
    project-type: folder

- project: name: test jobs: - \(aqfolder-{name}\(aq
class project_folder.Folder(registry)

Freestyle Project

The Freestyle Project module handles creating freestyle Jenkins projects (i.e., those that do not use Maven). You may specify freestyle in the project-type attribute to the Job definition if you wish, though it is the default, so you may omit project-type altogether if you are creating a freestyle project.
Example:
job:
  name: test_job
  project-type: freestyle
class project_freestyle.Freestyle(registry)

Matrix Project

The matrix project module handles creating Jenkins matrix projects. To create a matrix project specify matrix in the project-type attribute to the Job definition. Currently it supports four axes which share the same internal YAML structure:
o label expressions (label-expression)
o user-defined values (user-defined)
o slave name or label (slave)
o JDK name (jdk)
Requires the Jenkins Matrix Project Plugin.
The module also supports additional, plugin-defined axes:
o DynamicAxis (dynamic), requires the Jenkins DynamicAxis Plugin
o GroovyAxis (groovy), requires the Jenkins GroovyAxis Plugin
o YamlAxis (yaml), requires the Jenkins Yaml Axis Plugin
To tie the parent job to a specific node, you should use node parameter. On a matrix project, this will tie only the parent job. To restrict axes jobs, you can define a single value slave axis.
Job Parameters
NOTE: You can only pick one of the strategies.
o
execution-strategy (optional, built in Jenkins):
o combination-filter (str): axes selection filter
o sequential (bool): run builds sequentially (default false)
o
touchstone (optional):
o expr (str) -- selection filter for the touchstone build
o result (str) -- required result of the job: stable (default) or unstable
o yaml-strategy (optional, requires Yaml Axis Plugin):
o exclude-key (str) -- top key containing exclusion rules
o Either one of:
o filename (str) -- Yaml file containing exclusions
o text (str) -- Inlined Yaml. Should be literal text: | exclude:...
o
axes (list):
o
axis:
o type (str) -- axis type, must be either type defined by Matrix Project Plugin (label-expression, user-defined, slave or jdk) or a type defined by a plugin (see top of this document for a list of supported plugins).
o name (str) -- name of the axis
o values (list) -- values of the axis
The module supports also ShiningPanda axes:
Example:
name: matrix-test003
project-type: matrix
axes:
    - axis:
        type: python
        values:
        - python-2.6
        - python-2.7
        - python-3.4
    - axis:
        type: tox
        values:
        - py26
        - py27
        - py34

Requires the Jenkins ShiningPanda Plugin.
Example:
- job:
    name: matrix-test
    project-type: matrix
    execution-strategy:
      combination-filter: |
        !(os=="fedora11" && arch=="amd64")
      sequential: true
      touchstone:
        expr: \(aqos == "fedora11"\(aq
        result: unstable
    axes:
      - axis:
         type: label-expression
         name: os
         values:
          - ubuntu12.04
          - fedora11
      - axis:
         type: label-expression
         name: arch
         values:
          - amd64
          - i386
      - axis:
         type: slave
         name: nodes
         values:
          - node1
          - node2
      - axis:
         type: dynamic
         name: config
         values:
          - config_list
      - axis:
         type: user-defined
         name: database
         values:
          - mysql
          - postgresql
          - sqlite
      - axis:
         type: groovy
         name: foo
         command: return [one,two,three]
    builders:
      - shell: make && make check

Examples for yaml axis:
name: matrix-with-yaml-axis
project-type: matrix
axes:
    - axis:
        type: yaml
        filename: config.yaml
        name: python
    - axis:
        type: yaml
        filename: config.yaml
        name: database

name: matrix-with-yaml-strategy-and-exclude-in-file
project-type: matrix
yaml-strategy:
    exclude-key: \(aqexclude\(aq
    filename: \(aqexclude.yaml\(aq
axes:
    - axis:
        type: yaml
        filename: \(aqconfig.yaml\(aq
        name: python
    - axis:
        type: yaml
        filename: \(aqconfig.yaml\(aq
        name: database

name: matrix-with-yaml-strategy-and-inlined-exclude
project-type: matrix
yaml-strategy:
    exclude-key: \(aqexclude\(aq
    text: |
        exclude:
            - database: postgre
              python: py27
            - python: py35
              database: mysql
axes:
    - axis:
        type: yaml
        filename: config.yaml
        name: python
    - axis:
        type: yaml
        filename: config.yaml
        name: database

class project_matrix.Matrix(registry)

Maven Project

The Maven Project module handles creating Maven Jenkins projects.
To create a Maven project, specify maven in the project-type attribute to the Job definition. It also requires a maven section in the Job definition.
Job Parameters
o
root-module:
o group-id (str): GroupId.
o artifact-id (str): ArtifactId.
o root-pom (str): The path to the pom.xml file. (default \(aqpom.xml\(aq)
o goals (str): Goals to execute. (required)
o maven-opts (str): Java options to pass to maven (aka MAVEN_OPTS)
o maven-name (str): Installation of maven which should be used. Not setting maven-name appears to use the first maven install defined in the global jenkins config.
o private-repository (\(aqstr\(aq): Whether to use a private maven repository Possible values are default, local-to-workspace and local-to-executor.
o ignore-upstream-changes (bool): Do not start a build whenever a SNAPSHOT dependency is built or not. (default true)
o incremental-build (bool): Activate incremental build - only build changed modules (default false).
o automatic-archiving (bool): Activate automatic artifact archiving (default true).
o automatic-site-archiving (bool): Activate automatic site documentation artifact archiving (default true).
o automatic-fingerprinting (bool): Activate automatic fingerprinting of consumed and produced artifacts (default true).
o per-module-email (bool): Send an e-mail for each failed module (default true).
o parallel-build-modules (bool): Build modules in parallel (default false)
o resolve-dependencies (bool): Resolve Dependencies during Pom parsing (default false).
o run-headless (bool): Run headless (default false).
o disable-downstream (bool): Disable triggering of downstream projects (default false).
o process-plugins (bool): Process Plugins during Pom parsing (default false).
o custom-workspace (str): Path to the custom workspace. If no path is provided, custom workspace is not used. (optional)
o settings (str): Path to custom maven settings file. If settings type is \(aqfile\(aq then this is a Path. Otherwise it is the id for ConfigFileProvider. (optional)
o settings-type (str): Type of settings file file|cfp. (default file)
o global-settings (str): Path to custom maven global settings file. If settings type is \(aqfile\(aq then this is a Path. Otherwise it is the id for ConfigFileProvider. (optional)
o global-settings-type (str): Type of settings file file|cfp. (default file)
o post-step-run-condition (str): Run the post-build steps only if the build succeeds (\(aqSUCCESS\(aq), build succeeds or is unstable (\(aqUNSTABLE\(aq), regardless of build result (\(aqFAILURE\(aq). (default \(aqFAILURE\(aq).
Requires the Jenkins Config File Provider Plugin for the Config File Provider "settings" and "global-settings" config.
Example:
project-type: maven
maven:
  root-pom: pom.xml
  goals: deploy
  root-module:
    group-id: gabba.gabba
    artifact-id: hey
  settings: test
  global-settings: test
  incremental-build: true
  automatic-archiving: false
  automatic-site-archiving: false
  parallel-build-modules: true
  resolve-dependencies: true
  process-plugins: true
  run-headless: true
  disable-downstream: true
  custom-workspace: path/to/some/repository

CFP Example:
project-type: maven
maven:
  root-pom: pom.xml
  goals: deploy
  settings: org.jenkinsci.plugins.configfiles.maven.MavenSettingsConfig0123456789012
  global-settings: org.jenkinsci.plugins.configfiles.maven.GlobalMavenSettingsConfig0123456789012
  post-step-run-condition: SUCCESS

class project_maven.Maven(registry)

MultiJob Project

The MultiJob Project module handles creating MultiJob Jenkins projects. You may specify multijob in the project-type attribute of the Job definition.
This project type may use jenkins_jobs.modules.builders.multijob() builders.
Requires the Jenkins Multijob Plugin.
Example:
job:
  name: test_job
  project-type: multijob
  builders:
    - multijob:
        name: PhaseOne
        condition: SUCCESSFUL
        projects:
          - name: PhaseOneJobA
            current-parameters: true
            git-revision: true
          - name: PhaseOneJobB
            current-parameters: true
            property-file: build.props
    - multijob:
        name: PhaseTwo
        condition: UNSTABLE
        projects:
          - name: PhaseTwoJobA
            current-parameters: true
            predefined-parameters: foo=bar
          - name: PhaseTwoJobB
            current-parameters: false
class project_multijob.MultiJob(registry)

Pipeline Project

The Pipeline Project module handles creating Jenkins Pipeline projects (formerly known as the Workflow projects). You may specify pipeline in the project-type attribute of the Job definition.
Requires the Jenkins Pipeline Plugin:
In order to write an inline script within a job-template you have to escape the curly braces by doubling them in the DSL: { -> {{ , otherwise it will be interpreted by the python str.format() command.
Job Parameters
o sandbox (bool): If the script should run in a sandbox (default false)
o dsl (str): The DSL content or,
o pipeline-scm (str): in case "Pipeline as code" feature is used. Then you should specify:
o scm: single scm component (or a reference) describing the source code repository
o script-path: path to the Groovy file containing the job\(aqs steps (optional, default: Jenkinsfile)
o lightweight-checkout (bool): If selected, try to obtain the Pipeline script contents directly from the SCM without performing a full checkout. (optional, default: false)
Note that dsl and pipeline-scm parameters are mutually exclusive.
Inline DSL job example:
- job:
    name: test_job
    project-type: pipeline
    dsl: |
      build job: "job1"
      parallel [
        2a: build job: "job2a",
        2b: node "dummynode" {
          sh "echo I\(aqm alive!"
        }
      ]

Inline DSL job template example:
- job-template:
    name: \(aq{name}-unit-tests\(aq
    project-type: pipeline
    dsl: |
        build job: "job1"
        parallel [
          2a: build job: "job2a",
          2b: node "dummynode" {{
            sh "echo {isay}"
          }}
        ]

- job-group: name: \(aq{name}-tests\(aq jobs: - \(aq{name}-unit-tests\(aq: isay: \(aqhello\(aq
- project: name: project-name jobs: - \(aq{name}-tests\(aq
"Pipeline as code" example:
- job:
    name: test-job
    project-type: pipeline
    sandbox: true
    pipeline-scm:
      scm:
        - hg:
            url: http://hg.example.org/test_job
            clean: true
      script-path: Jenkinsfile.groovy
      lightweight-checkout: true

"Pipeline as code" example using templates:
- scm:
    name: project-scm
    scm:
      - hg:
         url: http://hg.example.org/project
         clean: true

- job-template: name: \(aq{name}-unit-tests\(aq project-type: pipeline pipeline-scm: scm: - project-scm sandbox: true publishers: - email: recipients: \(aq{mail-to}\(aq
- job-template: name: \(aq{name}-perf-tests\(aq project-type: pipeline pipeline-scm: scm: - project-scm sandbox: false publishers: - email: recipients: \(aq{mail-to}\(aq
- job-group: name: \(aq{name}-tests\(aq jobs: - \(aq{name}-unit-tests\(aq: mail-to: - \(aq{name}-perf-tests\(aq: mail-to:
- project: name: project-name jobs: - \(aq{name}-tests\(aq
"Pipeline as nested stage" example :
- job-template:
    name: \(aq{name}-unit-tests\(aq
    project-type: pipeline
    dsl: |
      stage(\(aqBuild another job\(aq) {{
        build(job: "{isay}")
      }}

- job-group: name: \(aq{name}-tests\(aq jobs: - \(aq{name}-unit-tests\(aq: isay: \(aqhello\(aq
- project: name: project-name jobs: - \(aq{name}-tests\(aq
class project_pipeline.Pipeline(registry)

Workflow Project

Deprecated: please use project_pipeline instead.
The workflow Project module handles creating Jenkins workflow projects. You may specify workflow in the project-type attribute of the Job definition. For now only inline scripts are supported.
Requires the Jenkins Workflow Plugin.
In order to use it for job-template you have to escape the curly braces by doubling them in the DSL: { -> {{ , otherwise it will be interpreted by the python str.format() command.
Job Parameters
o dsl (str): The DSL content.
o sandbox (bool): If the script should run in a sandbox (default false)
Job example:
- job:
    name: test_job
    project-type: workflow
    dsl: |
      build job: "job1"
      parallel [
        2a: build job: "job2a",
        2b: node "dummynode" {
          sh "echo I\(aqm alive!"
        }
      ]

Job template example:
- job-template:
    name: \(aq{name}-unit-tests\(aq
    project-type: workflow
    dsl: |
        build job: "job1"
        parallel [
          2a: build job: "job2a",
          2b: node "dummynode" {{
            sh "echo {isay}"
          }}
        ]

- job-group: name: \(aq{name}-tests\(aq jobs: - \(aq{name}-unit-tests\(aq: isay: \(aqhello\(aq
- project: name: project-name jobs: - \(aq{name}-tests\(aq
class project_workflow.Workflow(registry)

Multibranch Pipeline Project

The Multibranch Pipeline project module handles creating Jenkins workflow projects. You may specify multibranch in the project-type attribute of the Job definition.
Multibranch Pipeline implementantion in JJB is marked as experimental which means that there is no guarantee that its behavior (or configuration) will not change, even between minor releases.
Plugins required:
o Workflow Plugin.
o Pipeline Multibranch Defaults Plugin (optional)
o Basic Branch Build Strategies Plugin (optional)
Job Parameters
o scm (list): The SCM definition.
o bitbucket (dict): Refer to ~bitbucket_scm for documentation.
o gerrit (dict): Refer to ~gerrit_scm for documentation.
o git (dict): Refer to ~git_scm for documentation.
o github (dict): Refer to ~github_scm for documentation.
o periodic-folder-trigger (str): How often to scan for new branches or pull/change requests. Valid values: 1m, 2m, 5m, 10m, 15m, 20m, 25m, 30m, 1h, 2h, 4h, 8h, 12h, 1d, 2d, 1w, 2w, 4w. (default none)
o prune-dead-branches (bool): If dead branches upon check should result in their job being dropped. (default true)
o number-to-keep (int): How many builds should be kept. (default \(aq-1, all\(aq)
o days-to-keep (int): For how many days should a build be kept. (default \(aq-1, forever\(aq)
o script-path (str): Path to Jenkinsfile, relative to workspace. (default \(aqJenkinsfile\(aq)
Job examples:
name: \(aqdemo-multibranch-defaults\(aq
project-type: multibranch-defaults
scm:
    - github:
        repo: \(aqfoo\(aq
        repo-owner: \(aqjohndoe\(aq
        credentials-id: \(aqsecret\(aq

name: \(aqdemo-multibranch-multi-scm-full\(aq
description: \(aqWorkflow demo\(aq

project-type: multibranch
periodic-folder-trigger: 1d prune-dead-branches: True number-to-keep: \(aq10\(aq days-to-keep: \(aq10\(aq script-path: \(aqsome.Jenkinsfile\(aq scm: - bitbucket: repo-owner: \(aqSANDBOX\(aq repo: \(aqtest\(aq credentials-id: \(aqsecret\(aq - git: url: \(aqhttps://example.com/jonhndoe/keep-frontend.git\(aq credentials-id: \(aqsecret\(aq - github: repo: \(aqfoo\(aq repo-owner: \(aqjohndoe\(aq credentials-id: \(aqsecret\(aq
class project_multibranch.WorkflowMultiBranch(registry)
class project_multibranch.WorkflowMultiBranchDefaults(registry)
project_multibranch.bitbucket_scm(xml_parent, data)
Configure BitBucket scm
Requires the Bitbucket Branch Source Plugin.
Parameters
o credentials-id (str) -- The credential to use to scan BitBucket. (required)
o repo-owner (str) -- Specify the name of the Bitbucket Team or Bitbucket User Account. (required)
o repo (str) -- The BitBucket repo. (required)
o discover-tags (bool) -- Discovers tags on the repository. (default false)
o server-url (str) -- The address of the bitbucket server. (optional)
o head-filter-regex (str) -- A regular expression for filtering discovered source branches. Requires the SCM API Plugin.
o discover-branch (str) -- Discovers branches on the repository. Valid options: ex-pr, only-pr, all. Value is not specified by default.
o discover-pr-origin (str) -- Discovers pull requests where the origin repository is the same as the target repository. Valid options: mergeOnly, headOnly, mergeAndHead. Value is not specified by default.
o discover-pr-forks-strategy (str) -- Fork strategy. Valid options: merge-current, current, both, false. (default \(aqmerge-current\(aq)
o discover-pr-forks-trust (str) -- Discovers pull requests where the origin repository is a fork of the target repository. Valid options: contributors, everyone, permission or nobody. (default \(aqcontributors\(aq)
o build-strategies (list) -- Provides control over whether to build a branch (or branch like things such as change requests and tags) whenever it is discovered initially or a change from the previous revision has been detected. (optional) Refer to ~build_strategies.
o property-strategies (dict) -- Provides control over how to build a branch (like to disable SCM triggering or to override the pipeline durability) (optional) Refer to ~property_strategies.
o local-branch (bool) -- Check out to matching local branch If given, checkout the revision to build as HEAD on this branch. If selected, then the branch name is computed from the remote branch without the origin. In that case, a remote branch origin/master will be checked out to a local branch named master, and a remote branch origin/develop/new-feature will be checked out to a local branch named develop/newfeature. Requires the Git Plugin.
o checkout-over-ssh (dict) --
Checkout repo over ssh.
o
credentials (\(aqstr\(aq): Credentials to use for
checkout of the repo over ssh.
o filter-by-name-wildcard (dict) --
Enable filter by name with wildcards. Requires the SCM API Plugin.
o
includes (\(aqstr\(aq): Space-separated list
of name patterns to consider. You may use * as a wildcard; for example: master release*
o
excludes (\(aqstr\(aq): Name patterns to
ignore even if matched by the includes list. For example: release*
Extensions
o
clean (dict)
o after (bool) - Clean the workspace after checkout
o before (bool) - Clean the workspace before checkout
o prune (bool) - Prune remote branches (default false)
o shallow-clone (bool) - Perform shallow clone (default false)
o depth (int) - Set shallow clone depth (default 1)
o
do-not-fetch-tags (bool) - Perform a clone without tags
(default false)
o
submodule (dict)
o disable (bool) - By disabling support for submodules you can still keep using basic git plugin functionality and just have Jenkins to ignore submodules completely as if they didn\(aqt exist.
o recursive (bool) - Retrieve all submodules recursively (uses \(aq--recursive\(aq option which requires git>=1.6.5)
o tracking (bool) - Retrieve the tip of the configured branch in .gitmodules (Uses \(aq--remote\(aq option which requires git>=1.8.2)
o parent-credentials (bool) - Use credentials from default remote of parent repository (default false).
o reference-repo (str) - Path of the reference repo to use during clone (optional)
o timeout (int) - Specify a timeout (in minutes) for submodules operations (default 10).
o timeout (str) - Timeout for git commands in minutes (optional)
o
use-author (bool): Use author rather than committer in Jenkin\(aqs
build changeset (default false)
o
wipe-workspace (bool) - Wipe out workspace before build
(default true)
Minimal Example:
name: \(aqdemo-multibranch-bitbucket-min\(aq
project-type: multibranch
scm:
    - bitbucket:
        repo-owner: \(aqSANDBOX\(aq
        repo: \(aqtest\(aq

Full Example:
name: \(aqdemo-multibranch-bitbucket-min\(aq
project-type: multibranch
script-path: \(aqsome.Jenkinsfile\(aq
scm:
    - bitbucket:
        credentials-id: \(aqsecret\(aq
        repo-owner: \(aqSANDBOX\(aq
        repo: \(aqtest\(aq
        server-url: https://bitbucket.example.com:8080
        discover-tags: true
        head-filter-regex: \(aqmaster|\d+\.\d+\(aq
        discover-pr-origin: headOnly
        discover-branch: all
        discover-pr-forks-strategy: current
        discover-pr-forks-trust: everyone
        local-branch: true
        checkout-over-ssh:
            credentials: \(aqssh_secret\(aq
        filter-by-name-wildcard:
            includes: \(aq*\(aq
            excludes: \(aqmaster\(aq
        property-strategies:
            all-branches:
                - suppress-scm-triggering: true
                - pipeline-branch-durability-override: max-survivability
        build-strategies:
            - tags:
                ignore-tags-newer-than: 1
                ignore-tags-older-than: 7
            - tags: {}
            - change-request:
                ignore-target-only-changes: true
            - change-request: {}
            - regular-branches: true
            - skip-initial-build: true
            - named-branches:
                - exact-name:
                    name: \(aqtest\(aq
                    case-sensitive: true
                - regex-name:
                    regex: \(aqtest.*$\(aq
                    case-sensitive: true
                - wildcards-name:
                    excludes: \(aqtestexclude\(aq
                    includes: \(aqtestinclude\(aq
            - named-branches:
                - exact-name: {}
                - regex-name: {}
                - wildcards-name: {}
        clean:
            after: true
            before: true
        prune: true
        shallow-clone: true
        depth: 3
        do-not-fetch-tags: true
        submodule:
            disable: false
            recursive: true
            parent-credentials: true
            timeout: 100
        timeout: "100"
        use-author: true
        wipe-workspace: true

project_multibranch.build_strategies(xml_parent, data)
Configure Basic Branch Build Strategies.
Requires the Basic Branch Build Strategies Plugin.
Parameters
build-strategies (list) --
Definition of build strategies.
o
tags (dict): Builds tags
o
ignore-tags-newer-than (int) The number of days since the tag
was created before it is eligible for automatic building. (optional, default -1)
o
ignore-tags-older-than (int) The number of days since the tag
was created after which it is no longer eligible for automatic building. (optional, default -1)
o
change-request (dict): Builds change requests / pull requests
o
ignore-target-only-changes (bool) Ignore rebuilding merge
branches when only the target branch changed. (optional, default false)
o
regular-branches (bool): Builds regular branches whenever a
change is detected. (optional, default None)
o
skip-initial-build (bool): Skip initial build on first branch
indexing. (optional, default None)
o named-branches (list): Builds named branches whenever a change is detected.
o
exact-name (dict) Matches the name verbatim.
o name (str) The name to match. (optional)
o
case-sensitive (bool) Check this box if the name should
be matched case sensitively. (default false)
o regex-name (dict) Matches the name against a regular expression.
o
regex (str) A Java regular expression to restrict the
names. Names that do not match the supplied regular expression will be ignored. (default ^.*$)
o
case-sensitive (bool) Check this box if the name should
be matched case sensitively. (default false)
o wildcards-name (dict) Matches the name against an include/exclude set of wildcards.
o
includes (str) Space-separated list of name patterns to
consider. You may use * as a wildcard; for example: master release* (default *)
o
excludes (str) Name patterns to ignore even if matched
by the includes list. For example: release (optional)
project_multibranch.gerrit_scm(xml_parent, data)
Configure Gerrit SCM
Requires the Gerrit Code Review Plugin.
Parameters
o url (str) -- The git url. (required)
o credentials-id (str) -- The credential to use to connect to the GIT URL.
o ignore-on-push-notifications (bool) -- If a job should not trigger upon push notifications. (default false)
o refspecs (list(str)) -- Which refspecs to look for. (default [\(aq+refs/changes/*:refs/remotes/@{remote}/*\(aq, \(aq+refs/heads/*:refs/remotes/@{remote}/*\(aq])
o includes (str) -- Comma-separated list of branches to be included. (default \(aq*\(aq)
o excludes (str) -- Comma-separated list of branches to be excluded. (default \(aq\(aq)
o build-strategies (list) -- Provides control over whether to build a branch (or branch like things such as change requests and tags) whenever it is discovered initially or a change from the previous revision has been detected. (optional) Refer to ~build_strategies.
o property-strategies (dict) -- Provides control over how to build a branch (like to disable SCM triggering or to override the pipeline durability) (optional) Refer to ~property_strategies.
Minimal Example:
name: \(aqdemo-multibranch-gerrit-min\(aq
project-type: multibranch
scm:
    - gerrit:
        url: \(aqhttps://review.gerrithub.io/johndoe/foo\(aq

Full Example:
name: \(aqdemo-multibranch-gerrit-min\(aq
project-type: multibranch
script-path: some.Jenkinsfile
scm:
    - gerrit:
        url: \(aqhttps://review.gerrithub.io/johndoe/foo\(aq
        credentials-id: secret
        ignore-on-push-notifications: true
        refspecs: \(aqrefs/heads/*\(aq
        property-strategies:
            all-branches:
                - suppress-scm-triggering: true
                - pipeline-branch-durability-override: max-survivability
        build-strategies:
            - tags:
                ignore-tags-newer-than: 1
                ignore-tags-older-than: 7
            - tags: {}
            - change-request:
                ignore-target-only-changes: true
            - change-request: {}
            - regular-branches: true
            - skip-initial-build: true
            - named-branches:
                - exact-name:
                    name: \(aqtest\(aq
                    case-sensitive: true
                - regex-name:
                    regex: \(aqtest.*$\(aq
                    case-sensitive: true
                - wildcards-name:
                    excludes: \(aqtestexclude\(aq
                    includes: \(aqtestinclude\(aq
            - named-branches:
                - exact-name: {}
                - regex-name: {}
                - wildcards-name: {}

project_multibranch.git_scm(xml_parent, data)
Configure Git SCM
Requires the Git Plugin.
Parameters
o url (str) -- The git repo url. (required)
o credentials-id (str) -- The credential to use to connect to the GIT repo. (default \(aq\(aq)
o discover-branches (bool) -- Discovers branches on the repository. (default true)
o discover-tags (bool) -- Discovers tags on the repository. (default false)
o ignore-on-push-notifications (bool) -- If a job should not trigger upon push notifications. (default false)
o head-filter-regex (str) -- A regular expression for filtering discovered source branches. Requires the SCM API Plugin.
o build-strategies (list) -- Provides control over whether to build a branch (or branch like things such as change requests and tags) whenever it is discovered initially or a change from the previous revision has been detected. (optional) Refer to ~build_strategies.
o property-strategies (dict) -- Provides control over how to build a branch (like to disable SCM triggering or to override the pipeline durability) (optional) Refer to ~property_strategies.
Extensions
o
clean (dict)
o after (bool) - Clean the workspace after checkout
o before (bool) - Clean the workspace before checkout
o prune (bool) - Prune remote branches (default false)
o shallow-clone (bool) - Perform shallow clone (default false)
o depth (int) - Set shallow clone depth (default 1)
o
do-not-fetch-tags (bool) - Perform a clone without tags
(default false)
o
submodule (dict)
o disable (bool) - By disabling support for submodules you can still keep using basic git plugin functionality and just have Jenkins to ignore submodules completely as if they didn\(aqt exist.
o recursive (bool) - Retrieve all submodules recursively (uses \(aq--recursive\(aq option which requires git>=1.6.5)
o tracking (bool) - Retrieve the tip of the configured branch in .gitmodules (Uses \(aq--remote\(aq option which requires git>=1.8.2)
o parent-credentials (bool) - Use credentials from default remote of parent repository (default false).
o reference-repo (str) - Path of the reference repo to use during clone (optional)
o timeout (int) - Specify a timeout (in minutes) for submodules operations (default 10).
o timeout (str) - Timeout for git commands in minutes (optional)
o
use-author (bool): Use author rather than committer in Jenkin\(aqs
build changeset (default false)
o
wipe-workspace (bool) - Wipe out workspace before build
(default true)
Minimal Example:
name: \(aqdemo-multibranch-git-min\(aq
project-type: multibranch
scm:
    - git:
        url: \(aqhttps://example.com/jonhndoe/keep-frontend.git\(aq

Full Example:
name: \(aqdemo-multibranch-git-min\(aq
project-type: multibranch
script-path: some.Jenkinsfile
scm:
    - git:
        url: \(aqhttps://example.com/jonhndoe/keep-frontend.git\(aq
        credentials-id: secret
        discover-branches: false
        ignore-on-push-notifications: true
        discover-tags: true
        head-filter-regex: \(aqmaster|\d+\.\d+\(aq
        property-strategies:
            all-branches:
                - suppress-scm-triggering: true
                - pipeline-branch-durability-override: max-survivability
        build-strategies:
            - tags:
                ignore-tags-newer-than: 1
                ignore-tags-older-than: 7
            - tags: {}
            - change-request:
                ignore-target-only-changes: true
            - change-request: {}
            - regular-branches: true
            - skip-initial-build: true
            - named-branches:
                - exact-name:
                    name: \(aqtest\(aq
                    case-sensitive: true
                - regex-name:
                    regex: \(aqtest.*$\(aq
                    case-sensitive: true
                - wildcards-name:
                    excludes: \(aqtestexclude\(aq
                    includes: \(aqtestinclude\(aq
            - named-branches:
                - exact-name: {}
                - regex-name: {}
                - wildcards-name: {}
        clean:
            after: true
            before: true
        prune: true
        shallow-clone: true
        depth: 3
        do-not-fetch-tags: true
        submodule:
            disable: false
            recursive: true
            parent-credentials: true
            timeout: 100
        timeout: "100"
        use-author: true
        wipe-workspace: true

project_multibranch.github_scm(xml_parent, data)
Configure GitHub SCM
Requires the GitHub Branch Source Plugin.
Parameters
o api-uri (str) -- The GitHub API uri for hosted / on-site GitHub. Must first be configured in Global Configuration. (default GitHub)
o ssh-checkout (bool) --
Checkout over SSH.
o
credentials (\(aqstr\(aq): Credentials to use for
checkout of the repo over ssh.
o credentials-id (str) -- Credentials used to scan branches and pull requests, check out sources and mark commit statuses. (optional)
o repo-owner (str) -- Specify the name of the GitHub Organization or GitHub User Account. (required)
o repo (str) -- The GitHub repo. (required)
o branch-discovery (str) -- Discovers branches on the repository. Valid options: no-pr, only-pr, all, false. (default \(aqno-pr\(aq)
o discover-pr-forks-strategy (str) -- Fork strategy. Valid options: merge-current, current, both, false. (default \(aqmerge-current\(aq)
o discover-pr-forks-trust (str) -- Discovers pull requests where the origin repository is a fork of the target repository. Valid options: contributors, everyone, permission or nobody. (default \(aqcontributors\(aq)
o discover-pr-origin (str) -- Discovers pull requests where the origin repository is the same as the target repository. Valid options: merge-current, current, both. (default \(aqmerge-current\(aq)
o discover-tags (bool) -- Discovers tags on the repository. (default false)
o build-strategies (list) -- Provides control over whether to build a branch (or branch like things such as change requests and tags) whenever it is discovered initially or a change from the previous revision has been detected. (optional) Refer to ~build_strategies.
o notification-context (str) -- Change the default GitHub check notification context from "continuous-integration/jenkins/SUFFIX" to a custom text, Requires the Github Custom Notification Context SCM Behaviour.
o property-strategies (dict) -- Provides control over how to build a branch (like to disable SCM triggering or to override the pipeline durability) (optional) Refer to ~property_strategies.
Extensions
o
clean (dict)
o after (bool) - Clean the workspace after checkout
o before (bool) - Clean the workspace before checkout
o prune (bool) - Prune remote branches (default false)
o shallow-clone (bool) - Perform shallow clone (default false)
o depth (int) - Set shallow clone depth (default 1)
o
do-not-fetch-tags (bool) - Perform a clone without tags
(default false)
o
disable-pr-notifications (bool) - Disable default github status
notifications on pull requests (default false) (Requires the GitHub Branch Source Plugin.)
o
submodule (dict)
o disable (bool) - By disabling support for submodules you can still keep using basic git plugin functionality and just have Jenkins to ignore submodules completely as if they didn\(aqt exist.
o recursive (bool) - Retrieve all submodules recursively (uses \(aq--recursive\(aq option which requires git>=1.6.5)
o tracking (bool) - Retrieve the tip of the configured branch in .gitmodules (Uses \(aq--remote\(aq option which requires git>=1.8.2)
o parent-credentials (bool) - Use credentials from default remote of parent repository (default false).
o reference-repo (str) - Path of the reference repo to use during clone (optional)
o timeout (int) - Specify a timeout (in minutes) for submodules operations (default 10).
o timeout (str) - Timeout for git commands in minutes (optional)
o
use-author (bool): Use author rather than committer in Jenkin\(aqs
build changeset (default false)
o
wipe-workspace (bool) - Wipe out workspace before build
(default true)
Minimal Example:
name: \(aqdemo-multibranch-github-min\(aq
project-type: multibranch
scm:
    - github:
        repo: \(aqfoo\(aq
        repo-owner: \(aqjohndoe\(aq

Full Example:
name: scm-github-full
project-type: multibranch
script-path: some.Jenkinsfile
scm:
    - github:
        api-uri: http://example.org/github
        ssh-checkout:
            credentials: \(aqssh_secret\(aq
        repo: example-repo
        repo-owner: example-owner
        credentials-id: example-credential
        branch-discovery: all
        head-filter-regex: "(.*/master|.*/release/.*)"
        discover-pr-forks-strategy: both
        discover-pr-forks-trust: everyone
        discover-pr-origin: both
        discover-tags: true
        notification-context: \(aqjenkins.example.com/my_context\(aq
        property-strategies:
            all-branches:
                - suppress-scm-triggering: true
                - pipeline-branch-durability-override: max-survivability
        build-strategies:
            - tags:
                ignore-tags-newer-than: 1
                ignore-tags-older-than: 7
            - tags: {}
            - change-request:
                ignore-target-only-changes: true
            - change-request: {}
            - regular-branches: true
            - skip-initial-build: true
            - named-branches:
                - exact-name:
                    name: \(aqtest\(aq
                    case-sensitive: true
                - regex-name:
                    regex: \(aqtest.*$\(aq
                    case-sensitive: true
                - wildcards-name:
                    excludes: \(aqtestexclude\(aq
                    includes: \(aqtestinclude\(aq
            - named-branches:
                - exact-name: {}
                - regex-name: {}
                - wildcards-name: {}
        clean:
            after: true
            before: true
        prune: true
        shallow-clone: true
        depth: 3
        do-not-fetch-tags: true
        disable-pr-notifications: true
        submodule:
            disable: false
            recursive: true
            parent-credentials: true
            timeout: 100
        timeout: "100"
        use-author: true
        wipe-workspace: true

project_multibranch.property_strategies(xml_parent, data)
Configure Basic Branch Property Strategies.
Requires the Branch API Plugin.
Parameters
property-strategies (dict) --
Definition of property strategies. Either named-branches or all-branches may be specified, but not both.
o
all-branches (list): A list of property strategy definitions
for use with all branches.
o
suppress-scm-triggering (bool): Suppresses automatic SCM
triggering (optional)
o
pipeline-branch-durability-override (str): Set a custom
branch speed/durability level. Valid values: performance-optimized, survivable-nonatomic, or max-survivability (optional) Requires the :jenkins-wiki: Pipeline Multibranch Plugin <Pipeline+Multibranch+Plugin>
o
named-branches (dict): Named branches get different properties.
Comprised of a list of defaults and a list of property strategy exceptions for use with specific branches.
o
defaults (list): A list of property strategy definitions
to be applied by default to all branches, unless overridden by an entry in exceptions
o
suppress-scm-triggering (bool): Suppresses automatic SCM
triggering (optional)
o
pipeline-branch-durability-override (str): Set a custom
branch speed/durability level. Valid values: performance-optimized, survivable-nonatomic, or max-survivability (optional) Requires the :jenkins-wiki: Pipeline Multibranch Plugin <Pipeline+Multibranch+Plugin>
o
exceptions (list): A list of branch names and the property
strategies to be used on that branch, instead of any listed in defaults.
o
exception (dict): Defines exception
o
branch-name (str): Name of the branch to which these
properties will be applied.
o
properties (list): A list of properties to apply to
this branch.
o
suppress-scm-triggering (bool): Suppresses
automatic SCM triggering (optional)
o
pipeline-branch-durability-override (str): Set a
custom branch speed/durability level. Valid values: performance-optimized, survivable-nonatomic, or max-survivability (optional) Requires the Pipeline Multibranch Plugin

List View

The view list module handles creating Jenkins List views.
To create a list view specify list in the view-type attribute to the List View definition.
View Parameters
o name (str): The name of the view.
o view-type (str): The type of view.
o description (str): A description of the view. (default \(aq\(aq)
o filter-executors (bool): Show only executors that can execute the included views. (default false)
o filter-queue (bool): Show only included jobs in builder queue. (default false)
o job-name (list): List of jobs to be included.
o job-filters (dict): Job filters to be included. Requires View Job Filters
o
most-recent (dict)
most-recent
o max-to-include (int): Maximum number of jobs to include. (default 0)
o check-start-time (bool): Check job start time. (default false)
o
build-duration (dict)
build-duration
o match-type (\(aqstr\(aq): Jobs that match a filter to include. (default includeMatched)
o build-duration-type (\(aqstr\(aq): Duration of the build. (default Latest)
o amount-type: (\(aqstr\(aq): Duration in hours, days or builds. (default Hours)
o amount: (\(aqint\(aq): How far back to check. (default 0)
o less-than: (\(aqbool\(aq): Check build duration less than or more than. (default True)
o build-duration-minutes: (\(aqint\(aq): Build duration minutes. (default 0)
o
build-trend (dict)
build-trend
o match-type (\(aqstr\(aq): Jobs that match a filter to include. (default includeMatched)
o build-trend-type (\(aqstr\(aq): Duration of the build. (default Latest)
o amount-type: (\(aqstr\(aq): Duration in hours, days or builds. (default Hours)
o amount: (\(aqint\(aq): How far back to check. (default 0)
o status: (\(aqstr\(aq): Job status. (default Completed)
o
job-status (dict)
job-status
o match-type (\(aqstr\(aq): Jobs that match a filter to include. (default includeMatched)
o unstable (\(aqbool\(aq): Jobs with status unstable. (default False)
o failed (\(aqbool\(aq): Jobs with status failed. (default False)
o aborted (\(aqbool\(aq): Jobs with status aborted. (default False)
o disabled (\(aqbool\(aq): Jobs with status disabled. (default False)
o stable (\(aqbool\(aq): Jobs with status stable. (default False)
o
fallback (dict)
fallback
o fallback-type (\(aqstr\(aq): Fallback type to include/exclude for all jobs in a view, if no jobs have been included by previous filters. (default REMOVE_ALL_IF_ALL_INCLUDED)
o
build-status (dict)
build-status
o match-type (\(aqstr\(aq): Jobs that match a filter to include. (default includeMatched)
o never-built (\(aqbool\(aq): Jobs that are never built. (default False)
o building (\(aqbool\(aq): Jobs that are being built. (default False)
o in-build-queue (\(aqbool\(aq): Jobs that are in the build queue. (default False)
o
user-relevence (dict)
user-relevence
o match-type (\(aqstr\(aq): Jobs that match a filter to include. (default includeMatched)
o build-count (\(aqstr\(aq): Count of builds. (default AtLeastOne)
o amount-type: (\(aqstr\(aq): Duration in hours, days or builds. (default Hours)
o amount: (\(aqint\(aq): How far back to check. (default 0)
o match-user-id (\(aqbool\(aq): Jobs matching user-id. (default False)
o match-user-fullname (\(aqbool\(aq): Jobs matching user fullname. (default False)
o ignore-case (\(aqbool\(aq): Ignore case. (default False)
o ignore-whitespace (\(aqbool\(aq): Ignore whitespace. (default False)
o ignore-non-alphaNumeric (\(aqbool\(aq): Ignore non-alphaNumeric. (default False)
o match-builder (\(aqbool\(aq): Jobs matching builder. (default False)
o match-email (\(aqbool\(aq): Jobs matching email. (default False)
o match-scm-changes (\(aqbool\(aq): Jobs matching scm changes. (default False)
o
regex-job (dict)
regex-job
o match-type (\(aqstr\(aq): Jobs that match a filter to include. (default includeMatched)
o regex-name (\(aqstr\(aq): Regular expression name. (default \(aq\(aq)
o regex (\(aqstr\(aq): Regular expression. (default \(aq\(aq)
o
job-tpye (dict)
job-type
o match-type (\(aqstr\(aq): Jobs that match a filter to include. (default includeMatched)
o job-type (\(aqstr\(aq): Type of Job. (default hudson.model.FreeStyleProject)
o
parameter (dict)
parameter
o match-type (\(aqstr\(aq): Jobs that match a filter to include. (default includeMatched)
o name (\(aqstr\(aq): Job name to match. (default \(aq\(aq)
o value (\(aqstr\(aq): Value to match. (default \(aq\(aq)
o desc (\(aqstr\(aq): Description to match. (default \(aq\(aq)
o use-default-value (\(aqbool\(aq): Use default value. (default False)
o match-builds-in-progress (\(aqbool\(aq): Match build in progress. (default False)
o match-all-builds (\(aqbool\(aq): Match all builds. (default False)
o max-builds-to-match (\(aqint\(aq): Maximum builds to match. (default 0)
o
other-views (dict)
other-views
o match-type (\(aqstr\(aq): Jobs that match a filter to include. (default includeMatched)
o view-name (\(aqstr\(aq): View name. (default select a view other than this one)
o
scm (dict)
scm
o match-type (\(aqstr\(aq): Jobs that match a filter to include. (default includeMatched)
o scm-type (\(aqstr\(aq): Type of SCM. (default hudson.scm.NullSCM)
o
secured-job (dict)
secured-job
o match-type (\(aqstr\(aq): Jobs that match a filter to include. (default includeMatched)
o
user-permissions (dict)
user-permissions
o match-type (\(aqstr\(aq): Jobs that match a filter to include. (default includeMatched)
o configure (\(aqbool\(aq): User with configure permissions. (default false)
o amount-type: (\(aqbool\(aq): User with build permissions. (default false)
o amount: (\(aqbool\(aq): User with workspace permissions. (default false)
o permission-check: (\(aqstr\(aq): Match user permissions. (default MustMatchAll)
o
upstream-downstream (dict)
upstream-downstream
o include-upstream (\(aqbool\(aq): Jobs that match upstream. (default False)
o include-downstream (\(aqbool\(aq): Jobs that match downstream. (default False)
o recursive (\(aqbool\(aq): Jobs that are recursive. (default False)
o exclude-originals (\(aqbool\(aq): Jobs that are originals. (default False)
o
unclassified (dict)
unclassified
o match-type (\(aqstr\(aq): Jobs that match a filter to include. (default includeMatched)
o columns (list): List of columns to be shown in view.
o regex (str): . Regular expression for selecting jobs (optional)
o recurse (bool): Recurse in subfolders.(default false)
o status-filter (bool): Filter job list by enabled/disabled status. (optional)
Example:
name: list-view-name01
view-type: list
description: \(aqSample description\(aq
filter-executors: true
filter-queue: true
job-name:
    - job-name-1
    - job-name-3
    - job-name-2
    - Job-name-4
columns:
    - status
    - weather
    - job
    - last-success
    - last-failure
    - last-duration
    - build-button
    - last-stable
    - robot-list
    - find-bugs
    - jacoco
    - git-branch
    - schedule-build
    - priority-sorter
    - build-filter
    - desc
    - policy-violations
    - member-graph-view
    - extra-tests-total
    - extra-tests-failed
    - extra-tests-passed
    - extra-tests-skipped
    - extra-tests-format-0
    - extra-tests-format-1
    - extra-build-parameters
    - extra-build-description
    - extra-last-user-name
    - extra-workspace-link
    - extra-configure-button
    - extra-last-output
recurse: true
status-filter: false

Example:
name: regex-example
view-type: list
description: \(aqdescription\(aq
columns:
    - status
    - weather
    - job
    - last-success
    - last-failure
    - last-duration
    - extra-build-parameter: MY_PARAMETER
regex: (?!test.*).*

class view_list.List(registry)

Nested View

The view nested module handles creating Jenkins Nested views.
To create a nested view specify nested in the view-type attribute to the Nested View definition.
View Parameters
o name (str): The name of the view.
o view-type (str): The type of view.
o description (str): A description of the view. (default \(aq\(aq)
o filter-executors (bool): Show only executors that can execute the included views. (default false)
o filter-queue (bool): Show only included jobs in builder queue. (default false)
o views (list): The views to nest.
o default-view (str): Name of the view to use as the default from the nested ones. (the first one by default)
o columns (list): List of columns to be shown in view. (default empty list)
Example:
name: NestedViewTest
view-type: nested
views:
  - name: All
    view-type: all
columns:
  - status
  - weather

class view_nested.Nested(registry)

Pipeline View

The view pipeline module handles creating Jenkins Build Pipeline views. To create a pipeline view specify pipeline in the view-type attribute to the Pipeline View definition. Requires the Jenkins Build Pipeline Plugin.
View Parameters
o name (str): The name of the view.
o view-type (str): The type of view.
o description (str): A description of the view. (optional)
o filter-executors (bool): Show only executors that can execute the included views. (default false)
o filter-queue (bool): Show only included jobs in builder queue. (default false)
o first-job (str): Parent Job in the view.
o no-of-displayed-builds (str): Number of builds to display. (default 1)
o title (str): Build view title. (optional)
o linkStyle (str): Console output link style. Can be \(aqLightbox\(aq, \(aqNew Window\(aq, or \(aqThis Window\(aq. (default Lightbox)
o css-Url (str): Url for Custom CSS files (optional)
o latest-job-only (bool) Trigger only latest job. (default false)
o manual-trigger (bool) Always allow manual trigger. (default false)
o show-parameters (bool) Show pipeline parameters. (default false)
o parameters-in-headers (bool) Show pipeline parameters in headers. (default false)
o starts-with-parameters (bool) Use Starts with parameters. (default false)
o refresh-frequency (str) Frequency to refresh in seconds. (default \(aq3\(aq)
o definition-header (bool) Show pipeline definition header. (default false)
Example:
name: testBPview
view-type: pipeline
description: \(aqThis is a description\(aq
filter-executors: false
filter-queue: false
first-job: job-one
no-of-displayed-builds: 5
title: Title
link-style: New Window
css-Url: fake.urlfor.css
latest-job-only: true
manual-trigger: true
show-parameters: true
parameters-in-headers: true
start-with-parameters: true
refresh-frequency: 3
definition-header: true

Example:
name: testBPview
view-type: pipeline
first-job: job-one

class view_pipeline.Pipeline(registry)

Builders

Builders define actions that the Jenkins job should execute. Examples include shell scripts or maven targets. The builders attribute in the Job definition accepts a list of builders to invoke. They may be components defined below, locally defined macros (using the top level definition of builder:, or locally defined components found via the jenkins_jobs.builders entry point.
Component: builders
Macro builder
Entry Point
jenkins_jobs.builders
Example:
job:
  name: test_job

builders: - shell: "make test"
class builders.Builders(registry)
gen_xml(xml_parent, data)
Update the XML element tree based on YAML data. Override this method to add elements to the XML output. Create new Element objects and add them to the xml_parent. The YAML data structure must not be modified.
Parameters
o parser (YAMLParser) -- the global YAML Parser
o xml_parent (Element) -- the parent XML element
o data (dict) -- the YAML data structure
ansible-playbook
This plugin allows you to execute Ansible tasks as a job build step. Requires the Jenkins Ansible Plugin.
Parameters
o playbook (str) -- Path to the ansible playbook file. The path can be absolute or relative to the job workspace. (required)
o inventory-type (str) --
The inventory file form (default path)
inventory-type values
o path
o content
o do-not-specify
o inventory (dict) --
Inventory data, depends on inventory-type
inventory-type == path
o path (str) -- Path to inventory file.
inventory-type == content
o content (str) -- Content of inventory file.
o dynamic (bool) -- Dynamic inventory is used (default false)
o hosts (str) -- Further limit selected hosts to an additional pattern (default \(aq\(aq)
o tags-to-run (str) -- Only run plays and tasks tagged with these values (default \(aq\(aq)
o tags-to-skip (str) -- Only run plays and tasks whose tags do not match these values (default \(aq\(aq)
o task-to-start-at (str) -- Start the playbook at the task matching this name (default \(aq\(aq)
o workers (int) -- Specify number of parallel processes to use (default 5)
o credentials-id (str) -- The ID of credentials for the SSH connections. Only private key authentication is supported (default \(aq\(aq)
o vault-credentials-id (str) -- The ID of credentials for the vault decryption (default \(aq\(aq)
o sudo (bool) -- Run operations with sudo. It works only when the remote user is sudoer with nopasswd option (default false)
o sudo-user (str) -- Desired sudo user. "root" is used when this field is empty. (default \(aq\(aq)
o unbuffered-output (bool) -- Skip standard output buffering for the ansible process. The ansible output is directly rendered into the Jenkins console. This option can be useful for long running operations. (default true)
o colorized-output (bool) -- Check this box to allow ansible to render ANSI color codes in the Jenkins console. (default false)
o host-key-checking (bool) -- Check this box to enforce the validation of the hosts SSH server keys. (default false)
o additional-parameters (str) -- Any additional parameters to pass to the ansible command. (default \(aq\(aq)
o variables (list) --
List of extra variables to be passed to ansible. (optional)
variable item
o name (str) -- Name of variable (required)
o value (str) -- Desired value (default \(aq\(aq)
o hidden (bool) -- Hide variable in build log (default false)
Example:
---
builders:
  - ansible-playbook:
      playbook: "path/to/playbook.yml"
      inventory-type: "path"
      inventory:
        path: "path/to/inventory-file"
      variables:
        - name: "my_variable"
          value: "my_value"

OR
---
builders:
  - ansible-playbook:
      playbook: "path/to/playbook.yml"
      inventory-type: "content"
      inventory:
        content: |
          [all]
          machine01.example.com
          machine02.example.com
      hosts: "masters"
      tags-to-run: "ose"
      tags-to-skip: "ovirt"
      task-to-start-at: "Deploy application"
      workers: 2
      credentials-id: "0891c950-487b-4749-aa69-d87425e14459"
      vault-credentials-id: "0421b950-487b-4749-aa69-d87425e14459"
      sudo: true
      sudo-user: "cloud-user"
      unbuffered-output: false
      colorized-output: true
      host-key-checking: true
      additional-parameters: "-vvv"
      variables:
        - name: "complete_var"
          value: "complete value"
          hidden: false
        - name: "empty_var"
        - name: "hidden_var"
          value: "Do not appear in console"
          hidden: true

ant Execute an ant target. Requires the Jenkins Ant Plugin.
To setup this builder you can either reference the list of targets or use named parameters. Below is a description of both forms:
1) Listing targets:
After the ant directive, simply pass as argument a space separated list of targets to build.
Parameter
space separated list of Ant targets
Example to call two Ant targets:
builders:
  - ant: "target1 target2"

The build file would be whatever the Jenkins Ant Plugin is set to use per default (i.e build.xml in the workspace root).
2) Using named parameters:
Parameters
o targets (str) -- the space separated list of ANT targets.
o buildfile (str) -- the path to the ANT build file.
o properties (list) -- Passed to ant script using -Dkey=value (optional)
o ant-name (str) -- the name of the ant installation, (default \(aqdefault\(aq) (optional)
o java-opts (str) -- java options for ant, can have multiples, must be in quotes (optional)
Example specifying the build file too and several targets:
builders:
  - ant:
     targets: "debug test install"
     buildfile: "build.xml"
     properties:
        builddir: "/tmp/"
        failonerror: true
     java-opts:
        - "-ea"
        - "-Xmx512m"
     ant-name: "Standard Ant"

artifact-resolver
Allows one to resolve artifacts from a maven repository like nexus (without having maven installed) Requires the Jenkins Repository Connector Plugin.
Parameters
o fail-on-error (bool) -- Whether to fail the build on error (default false)
o repository-logging (bool) -- Enable repository logging (default false)
o target-directory (str) -- Where to resolve artifacts to (required)
o artifacts (list) --
list of artifacts to resolve
Artifact
o group-id (str) -- Group ID of the artifact (required)
o artifact-id (str) -- Artifact ID of the artifact (required)
o version (str) -- Version of the artifact (required)
o classifier (str) -- Classifier of the artifact (default \(aq\(aq)
o extension (str) -- Extension of the artifact (default \(aqjar\(aq)
o target-file-name (str) -- What to name the artifact (default \(aq\(aq)
Minimal Example:
builders:
  - artifact-resolver:
      target-directory: foo
      artifacts:
        - group-id: commons-logging
          artifact-id: commons-logging
          version: "1.1"

Full Example:
builders:
  - artifact-resolver:
      fail-on-error: true
      repository-logging: true
      target-directory: foo
      artifacts:
        - group-id: commons-logging
          artifact-id: commons-logging
          version: "1.1"
          classifier: src
          extension: jar
          target-file-name: comm-log.jar
        - group-id: commons-lang
          artifact-id: commons-lang
          version: "1.2"

batch Execute a batch command.
Parameter
the batch command to execute
Example:
builders:
  - batch: "foo/foo.bat"

beaker Execute a beaker build step. Requires the Jenkins Beaker Builder Plugin.
Parameters
o content (str) -- Run job from string (Alternative: you can choose a path instead)
o path (str) -- Run job from file (Alternative: you can choose a content instead)
o download-logs (bool) -- Download Beaker log files (default false)
Example:
builders:
    - beaker:
        path: \(aqtest.xml\(aq
        download-logs: true

builders:
    - beaker:
        content: |
            <job group=\(aqproduct-QA\(aq>
                <whiteboard>
                    Apache 2.2 test
                </whiteboard>
            </job>

build-name-setter
Define Build Name Setter options which allows your build name to be updated during the build process. Requires the Jenkins Build Name Setter Plugin.
Parameters
o name (str) -- Filename to use for Build Name Setter, only used if file bool is true. (default \(aqversion.txt\(aq)
o template (str) -- Macro Template string, only used if macro bool is true. (default \(aq#${BUILD_NUMBER}\(aq)
o file (bool) -- Read from named file (default false)
o macro (bool) -- Read from macro template (default false)
o macro-first (bool) -- Insert macro first (default false)
File Example:
builders:
      - build-name-setter:
          name: \(aqversion.txt\(aq
          file: true

Macro Example:
builders:
      - build-name-setter:
          template: \(aq#${BUILD_NUMBER}\(aq
          macro: true

build-publish-docker-image
Requires the Jenkins CloudBees Docker Build and Publish plugin.
Parameters
o docker-registry-url (str) -- URL to the Docker registry you are using (default \(aq\(aq)
o image (str) -- Repository name to be applied to the resulting image in case of success (default \(aq\(aq)
o docker-file-directory (str) -- Build step that sends a Dockerfile for building to docker host that used for this build run (default \(aq\(aq)
o push-on-success (bool) -- Resulting docker image will be pushed to the registry (or registries) specified within the "Image" field (default false)
o push-credentials-id (str) -- Credentials to push to a private registry (default \(aq\(aq)
o clean-images (bool) -- Option to clean local images (default false)
o jenkins-job-delete (bool) -- Attempt to remove images when jenkins deletes the run (default false)
o cloud (str) -- Cloud to use to build image (default \(aq\(aq)
Minimal example:
builders:
  - build-publish-docker-image

Full example:
builders:
  - build-publish-docker-image:
      docker-registry-url: Docker registry URL
      image: Image string
      docker-file-directory: Directory for Dockerfile
      push-on-success: true
      push-credentials-id: 71e4f29c-162b-40d0-85d9-3ddfba2911a0
      clean-images: true
      jenkins-job-delete: true
      cloud: cloud

builders-from
Use builders from another project. Requires the Jenkins Template Project Plugin.
Parameters
projectName (str) -- the name of the other project
Example:
builders:
  - builders-from: "base-build"

change-assembly-version
Change the assembly version. Requires the Jenkins Change Assembly Version.
Parameters
o version (str) -- Set the new version number for replace (default 1.0.0)
o assemblyFile (str) -- The file name to search (default AssemblyInfo.cs)
Minimal Example:
builders:
  - change-assembly-version

Full Example:
builders:
  - change-assembly-version:
        version: "1.2.3"
        assembly-file: "AFile"

cloudformation
Create cloudformation stacks before running a build and optionally delete them at the end. Requires the Jenkins AWS Cloudformation Plugin.
Parameters
o name (list) -- The names of the stacks to create (required)
o description (str) -- Description of the stack (optional)
o recipe (str) -- The cloudformation recipe file (required)
o parameters (list) -- List of key/value pairs to pass into the recipe, will be joined together into a comma separated string (optional)
o timeout (int) -- Number of seconds to wait before giving up creating a stack (default 0)
o access-key (str) -- The Amazon API Access Key (required)
o secret-key (str) -- The Amazon API Secret Key (required)
o sleep (int) -- Number of seconds to wait before continuing to the next step (default 0)
o region (array) --
The region to run cloudformation in (required)
region values
o us-east-1
o us-west-1
o us-west-2
o eu-central-1
o eu-west-1
o ap-southeast-1
o ap-southeast-2
o ap-northeast-1
o sa-east-1
Example:
builders:
  - cloudformation:
    - 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

cmake Execute a CMake target. Requires the Jenkins CMake Plugin.
This builder is compatible with both versions 2.x and 1.x of the plugin. When specifying paramenters from both versions only the ones from the installed version in Jenkins will be used, and the rest will be ignored.
Parameters
o source-dir (str) -- the source code directory relative to the workspace directory. (required)
o build-type (str) -- Sets the "build type" option for CMake (default "Debug").
o preload-script (str) -- Path to a CMake preload script file. (optional)
o other-arguments (str) -- Other arguments to be added to the CMake call. (optional)
o clean-build-dir (bool) -- If true, delete the build directory before each build (default false).
o generator (list) --
The makefile generator (default "Unix Makefiles").
type Possible generators
o Borland Makefiles
o CodeBlocks - MinGW Makefiles
o CodeBlocks - Unix Makefiles
o Eclipse CDT4 - MinGW Makefiles
o Eclipse CDT4 - NMake Makefiles
o Eclipse CDT4 - Unix Makefiles
o MSYS Makefiles
o MinGW Makefiles
o NMake Makefiles
o Unix Makefiles
o Visual Studio 6
o Visual Studio 7 .NET 2003
o Visual Studio 8 2005
o Visual Studio 8 2005 Win64
o Visual Studio 9 2008
o Visual Studio 9 2008 Win64
o Watcom WMake
Version 2.x
Parameters that available only to versions 2.x of the plugin
o working-dir (str): The directory where the project will be built in. Relative to the workspace directory. (optional)
o installation-name (str): The CMake installation to be used on this builder. Use one defined in your Jenkins global configuration page (default "InSearchPath").
o build-tool-invocations (list): list of build tool invocations that will happen during the build:
Build tool invocations
o
use-cmake (str) -- Whether to run the actual build tool
directly (by expanding $CMAKE_BUILD_TOOL) or to have cmake run the build tool (by invoking cmake --build <dir>) (default false).
o
arguments (str) -- Specify arguments to pass to the
build tool or cmake (separated by spaces). Arguments may contain spaces if they are enclosed in double quotes. (optional)
o
environment-variables (str) -- Specify extra
environment variables to pass to the build tool as key-value pairs here. Each entry must be on its own line, for example: DESTDIR=${WORKSPACE}/artifacts/dir
KEY=VALUE
Version 1.x
Parameters available only to versions 1.x of the plugin
o build-dir (str): The directory where the project will be built in. Relative to the workspace directory. (optional)
o install-dir (str): The directory where the project will be installed in, relative to the workspace directory. (optional)
o build-type (list): Sets the "build type" option. A custom type different than the default ones specified on the CMake plugin can also be set, which will be automatically used in the "Other Build Type" option of the plugin. (default "Debug")
Default types present in the CMake plugin
o Debug
o Release
o RelWithDebInfo
o MinSizeRel
o make-command (str): The make command (default "make").
o install-command (arg): The install command (default "make install").
o custom-cmake-path (str): Path to cmake executable. (optional)
o clean-install-dir (bool): If true, delete the install dir before each build (default false).
Example (Versions 2.x):
builders:
  - cmake:
      source-dir: \(aqpath/to/source\(aq
      working-dir: \(aqpath/to/build\(aq
      install-dir: \(aqpath/to/install\(aq
      build-type: \(aqCustomReleaseType\(aq
      generator: \(aqNMake Makefiles\(aq
      installation-name: \(aqCMake custom install\(aq
      preload-script: \(aqpath/to/source/cmake.preload\(aq
      other-arguments: \(aq-DCMAKE_FIND_ROOT_PATH="path/to/something/else"\(aq
      clean-build-dir: true
      build-tool-invocations:
        - use-cmake: true
          arguments: \(aqclean\(aq
          environment-variables: |
            DESTDIR=${WORKSPACE}/artifacts/dir
            URL=http://www.example.org/
        - use-cmake: false
          arguments: \(aqtest\(aq
          environment-variables: |
            RESTRICT="TRUE"
            TARGET="NONE"

Example (Versions 1.x):
builders:
  - cmake:
      source-dir: \(aqpath/to/source\(aq
      build-dir: \(aqpath/to/build\(aq
      install-dir: \(aqpath/to/install\(aq
      build-type: \(aqCustomReleaseType\(aq
      generator: \(aqNMake Makefiles\(aq
      make-command: \(aq/usr/bin/make\(aq
      install-command: \(aqmake new-install\(aq
      preload-script: \(aqpath/to/source/cmake.preload\(aq
      other-arguments: \(aq-DCMAKE_FIND_ROOT_PATH="path/to/something/else"\(aq
      custom-cmake-path: \(aq/usr/bin/cmake\(aq
      clean-build-dir: true
      clean-install-dir: true

conditional-step
Conditionally execute some build steps. Requires the Jenkins Conditional BuildStep Plugin.
Depending on the number of declared steps, a Conditional step (single) or a Conditional steps (multiple) is created in Jenkins.
Parameters
o condition-kind (str) -- Condition kind that must be verified before the steps are executed. Valid values and their additional attributes are described in the conditions table.
o 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 \(aqfail\(aq).
o steps (list) -- List of steps to run if the condition is verified. Items in the list can be any builder known by Jenkins Job Builder.
Condition kind Description
always Condition is always verified
never Condition is never verified
boolean-expression Run the step if the expression expends to a representation of true Expression to expand (required)
build-cause Run if the current build has a specific cause The cause why the build was triggered. Following causes are supported - build was triggered by a manual interaction. (default) build was triggered by a SCM change. build was triggered by a timer. build was triggered by via CLI interface build was triggered via remote interface. build was triggered by an upstream project. Following supported if XTrigger plugin installed: build was triggered by a file system change (FSTrigger Plugin). build was triggered by a URL change (URLTrigger Plugin) build triggered by an Ivy dependency version has change (IvyTrigger Plugin) build was triggered by a script (ScriptTrigger Plugin) build was triggered by a result of another job (BuildResultTrigger Plugin) (bool) There might by multiple causes causing a build to be triggered, with this true, the cause must be the only one causing this build this build to be triggered. (default false)
day-of-week Only run on specific days of the week. Days you want the build to run on. Following values are supported - Saturday and Sunday (default). Monday - Friday. Selected days, defined by \(aqdays\(aq below. True for days for which the build should run. Definition needed only for \(aqselect-days\(aq day-selector, at the same level as day-selector. Define the days to run under this. Run on Sunday (default false) Run on Monday (default false) Run on Tuesday (default false) Run on Wednesday (default false) Run on Thursday (default false) Run on Friday (default false) Run on Saturday (default false) (bool) Use the build time instead of the the time that the condition is evaluated. (default false)
execution-node Run only on selected nodes. (list) List of nodes to execute on. (required)
strings-match Run the step if two strings match First string (optional) Second string (optional) Case insensitive (default false)
current-status Run the build step if the current build status is within the configured range Accepted values are SUCCESS, UNSTABLE, FAILURE, NOT_BUILD, ABORTED (default SUCCESS) Accepted values are SUCCESS, UNSTABLE, FAILURE, NOT_BUILD, ABORTED (default SUCCESS)
shell Run the step if the shell command succeed Shell command to execute (optional)
windows-shell Similar to shell, except that commands will be executed by cmd, under Windows Command to execute (optional)
file-exists Run the step if a file exists Check existence of this file (required) If condition-filename is relative, it will be considered relative to either workspace, artifact-directory, or jenkins-home. (default \(aqworkspace\(aq)
files-match Run if one or more files match the selectors. (list str) List of Includes Patterns. Since the separator in the patterns is hardcoded as \(aq,\(aq, any use of \(aq,\(aq would need escaping. (optional) (list str) List of Excludes Patterns. Since the separator in the patterns is hardcoded as \(aq,\(aq, any use of \(aq,\(aq would need escaping. (optional) Accepted values are workspace, artifact-directory, or jenkins-home. (default \(aqworkspace\(aq)
num-comp Run if the numerical comparison is true. Left Hand Side. Must evaluate to a number. (required) Right Hand Side. Must evaluate to a number. (required) Accepted values are less-than, greater-than, equal, not-equal, less-than-equal, greater-than-equal. (default \(aqless-than\(aq)
regex-match Run if the Expression matches the Label. The regular expression used to match the label (optional) The label that will be tested by the regular expression. (optional)
time Only run during a certain period of the day. Starting hour (default "09") Starting min (default "00") Ending hour (default "17") Ending min (default "30") (bool) Use the build time instead of the the time that the condition is evaluated. (default false)
not Run the step if the inverse of the condition-operand is true Condition to evaluate. Can be any supported conditional-step condition. (required)
and Run the step if logical and of all conditional-operands is true (list) Conditions to evaluate. Can be any supported conditional-step condition. (required)
or Run the step if logical or of all conditional-operands is true (list) Conditions to evaluate. Can be any supported conditional-step condition. (required)
Examples:
builders:
    - conditional-step:
        condition-kind: always
        steps:
            - shell: \(aqfirst command\(aq
            - shell: \(aqsecond command\(aq

builders:
      - conditional-step:
          condition-kind: current-status
          condition-worst: SUCCESS
          condition-best: FAILURE
          steps:
              - shell: "sl"

builders:
      - conditional-step:
          condition-kind: not
          condition-operand:
              condition-kind: file-exists
              condition-filename: mytestfile
              condition-basedir: workspace
          steps:
              - shell: "touch $WORKSPACE/mytestfile"

builders:
      - conditional-step:
          condition-kind: day-of-week
          day-selector: weekday
          use-build-time: true
          steps:
              - shell: "sl"

builders:
      - conditional-step:
          condition-kind: day-of-week
          day-selector: select-days
          days:
              MON: true
              FRI: true
          use-build-time: true
          steps:
              - shell: "sl"

builders:
    - conditional-step:
        condition-kind: time
        earliest-hour: "4"
        earliest-min: "15"
        latest-hour: "20"
        latest-min: "30"
        steps:
            - shell: "sl"

builders:
    - conditional-step:
        condition-kind: regex-match
        regex: a*b
        label: cadaaab
        steps:
            - shell: "sl"

builders:
      - conditional-step:
          condition-kind: or
          condition-operands:
              - condition-kind: num-comp
                lhs: "2 + 5"
                rhs: "1 + 6"
                comparator: equal
                condition-basedir: "jenkins-home"
              - condition-kind: files-match
                include-pattern:
                    - "inc_pattern1"
                    - "inc_pattern2"
                exclude-pattern:
                    - "exc_pattern1"
                    - "exc_pattern2"
                condition-basedir: "jenkins-home"
          steps:
              - shell: "sl"

builders:
      - conditional-step:
          condition-kind: and
          condition-operands:
              - condition-kind: regex-match
                regex: "*abc*"
                label: "dabcddabc"
              - condition-kind: time
                earliest-hour: "2"
                earliest-min: "0"
                latest-hour: "23"
                latest-min: "40"
                use-build-time: true
          steps:
              - shell: "sl"

config-file-provider
Provide configuration files (i.e., settings.xml for maven etc.) which will be copied to the job\(aqs workspace. Requires the Jenkins Config File Provider Plugin.
Parameters
files (list) --
List of managed config files made up of three parameters
files
o file-id (str) -- The identifier for the managed config file
o target (str) -- Define where the file should be created (default \(aq\(aq)
o variable (str) -- Define an environment variable to be used (default \(aq\(aq)
o replace-tokens (bool) -- Replace tokens in config file. For example "password: ${PYPI_JENKINS_PASS}" will be replaced with the global variable configured in Jenkins.
Full Example:
builders:
    - config-file-provider:
        files:
            - file-id: org.jenkinsci.plugins.configfiles.maven.MavenSettingsConfig0123456789012
              target: target
              variable: variable
              replace-tokens: true

Minimal Example:
builders:
    - config-file-provider:
        files:
            - file-id: org.jenkinsci.plugins.configfiles.maven.MavenSettingsConfig0123456789012

copyartifact
Copy artifact from another project. Requires the Copy Artifact plugin.
Please note using the multijob-build for which-build argument requires the Multijob plugin
Parameters
o project (str) -- Project to copy from
o filter (str) -- what files to copy
o target (str) -- Target base directory for copy, blank means use workspace
o flatten (bool) -- Flatten directories (default false)
o optional (bool) -- If the artifact is missing (for any reason) and optional is true, the build won\(aqt fail because of this builder (default false)
o do-not-fingerprint (bool) -- Disable automatic fingerprinting of copied artifacts (default false)
o which-build (str) --
which build to get artifacts from (optional, default last-successful)
which-build values
o last-successful
o last-completed
o specific-build
o last-saved
o upstream-build
o permalink
o workspace-latest
o build-param
o downstream-build
o multijob-build
o build-number (str) -- specifies the build number to get when when specific-build is specified as which-build
o permalink (str) --
specifies the permalink to get when permalink is specified as which-build
permalink values
o last
o last-stable
o last-successful
o last-failed
o last-unstable
o last-unsuccessful
o stable (bool) -- specifies to get only last stable build when last-successful is specified as which-build
o fallback-to-last-successful (bool) -- specifies to fallback to last successful build when upstream-build is specified as which-build
o param (string) -- specifies to use a build parameter to get the build when build-param is specified as which-build
o upstream-project-name (str) -- specifies the project name of downstream when downstream-build is specified as which-build
o upstream-build-number (str) -- specifies the number of the build to find its downstream build when downstream-build is specified as which-build
o parameter-filters (string) -- Filter matching jobs based on these parameters (optional)
o exclude (string) -- Specify paths or patterns of artifacts to exclude, even if specified in "Artifacts to copy". (default \(aq\(aq)
o result-var-suffix (string) -- The build number of the selected build will be recorded into the variable named COPYARTIFACT_BUILD_NUMBER_(SUFFIX) for later build steps to reference. (default \(aq\(aq)
Example:
builders:
  - copyartifact:
      project: foo
      filter: "*.tar.gz"
      target: /home/foo
      which-build: specific-build
      build-number: "123"
      optional: true
      flatten: true
      do-not-fingerprint: true
      parameter-filters: PUBLISH=true

Multijob Example:
builders:
  - copyartifact:
      project: foo
      filter: "*.json"
      target: /home/foo
      which-build: multijob-build
      optional: true
      flatten: true
      parameter-filters: PUBLISH=true
      exclude: "*.txt"
      result-var-suffix: "PROJECT_ABC"

critical-block-end
Designate the end of a critical block. Must be used in conjunction with critical-block-start.
Must also add a build wrapper (exclusion), specifying the resources that control the critical block. Otherwise, this will have no effect.
Requires Jenkins Exclusion Plugin.
Example:
- wrapper:
    name: critical-block-exclusion
    wrappers:
      - exclusion:
          resources:
            - myresource1

- job: name: critical-block-example project-type: freestyle wrappers: - critical-block-exclusion builders: - critical-block-start - shell: #!/bin/bash -ex rollback-my-data-base - critical-block-end
critical-block-start
Designate the start of a critical block. Must be used in conjunction with critical-block-end.
Must also add a build wrapper (exclusion), specifying the resources that control the critical block. Otherwise, this will have no effect.
Requires Jenkins Exclusion Plugin.
Example:
- wrapper:
    name: critical-block-exclusion
    wrappers:
      - exclusion:
          resources:
            - myresource1

- job: name: critical-block-example project-type: freestyle wrappers: - critical-block-exclusion builders: - critical-block-start - shell: #!/bin/bash -ex rollback-my-data-base - critical-block-end
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
o regexp (str) -- A RegEx which is used to scan the build log file (default \(aq\(aq)
o description (str) -- The description to set on the build (optional)
Example:
builders:
  - description-setter:
      regexp: ".*(<a href=.*a>)"
      description: "some description"

docker-build-publish
Requires the Jenkins Docker build publish Plugin.
Parameters
o repo-name (str) -- Name of repository to push to.
o repo-tag (str) -- Tag for image. (default \(aq\(aq)
o server (dict) --
The docker daemon (optional)
o uri (str): Define the docker server to use. (optional)
o credentials-id (str): ID of credentials to use to connect (optional)
o registry (dict) --
Registry to push to
o url (str) repository url to use (optional)
o credentials-id (str): ID of credentials to use to connect (optional)
o no-cache (bool) -- If build should be cached. (default false)
o no-force-pull (bool) -- Don\(aqt update the source image before building when it exists locally. (default false)
o skip-build (bool) -- Do not build the image. (default false)
o skip-decorate (bool) -- Do not decorate the build name. (default false)
o skip-tag-latest (bool) -- Do not tag this build as latest. (default false)
o skip-push (bool) -- Do not push. (default false)
o file-path (str) -- Path of the Dockerfile. (default \(aq\(aq)
o build-context (str) -- Project root path for the build, defaults to the workspace if not specified. (default \(aq\(aq)
o create-fingerprint (bool) -- If enabled, the plugin will create fingerprints after the build of each image. (default false)
o build-args (str) -- Additional build arguments passed to docker build (default \(aq\(aq)
o force-tag (bool) -- Force tag replacement when tag already exists (default false)
Minimal example:
builders:
    - docker-build-publish:
        repo-name: \(aqtest\(aq
        repo-tag: \(aqtest-tag\(aq
        no-cache: true
        no-force-pull: false
        skip-build: false
        skip-decorate: false
        skip-latest: false
        skip-tag: false
        file-path: \(aq/tmp/\(aq
        build-context: \(aq/tmp/\(aq
        create-fingerprint: true
        build-args: --build-arg https_proxy="http://some.proxy:port"
        force-tag: true

Full example:
builders:
    - docker-build-publish:
        repo-name: \(aqtest\(aq
        repo-tag: \(aqtest-tag\(aq
        no-cache: true
        no-force-pull: false
        skip-build: false
        skip-decorate: false
        skip-latest: false
        skip-tag: false
        file-path: \(aq/tmp/\(aq
        build-context: \(aq/tmp/\(aq
        create-fingerprint: true
        build-args: --build-arg https_proxy="http://some.proxy:port"
        force-tag: true
        registry:
            url: \(aqhttps://registry.example.org\(aq
            credentials-id: \(aqregistry-docker\(aq
        server:
            uri: \(aqunix:///var/run/docker.sock\(aq
            credentials-id: \(aqdocker-server\(aq

docker-pull-image
Provides integration between Jenkins and Docker Hub, utilizing a Docker Hub hook to trigger one (or more) Jenkins job(s). Requires the Jenkins CloudBees Docker Hub Notification.
Parameters
o image (str) -- Image ID on DockerHub (default \(aq\(aq)
o docker-registry-url (str) -- URL to the Docker registry you are using (default \(aq\(aq)
o credentials-id (str) -- Registry credentials (default \(aq\(aq)
Minimal example:
builders:
  - docker-pull-image

Full example:
builders:
  - docker-pull-image:
      image: test-image-id
      docker-registry-url: https://index.docker.io/v1/
      credentials-id: 71e4f29c-162b-40d0-85d9-3ddfba2911a0

doxygen
Builds doxygen HTML documentation. Requires the Jenkins Doxygen plugin.
Parameters
o doxyfile (str) -- The doxyfile path (required)
o install (str) -- The doxygen installation to use (required)
o ignore-failure (bool) -- Keep executing build even on doxygen generation failure (default false)
o unstable-warning (bool) -- Mark the build as unstable if warnings are generated (default false)
Example:
builders:
  - doxygen:
      doxyfile: Doxyfile
      install: doxygen
      ignore-failure: true
      unstable-warning: true

dsl Process Job DSL
Requires the Jenkins Job DSL plugin.
Parameters
o script-text (str) -- dsl script which is Groovy code (Required if targets is not specified)
o targets (str) -- Newline separated list of DSL scripts, located in the Workspace. Can use wildcards like \(aqjobs/*/*/*.groovy\(aq (Required if script-text is not specified)
o ignore-existing (str) -- Ignore previously generated jobs and views
o removed-job-action (str) -- Specifies what to do when a previously generated job is not referenced anymore, can be \(aqIGNORE\(aq, \(aqDISABLE\(aq, or \(aqDELETE\(aq (default \(aqIGNORE\(aq)
o removed-view-action (str) -- Specifies what to do when a previously generated view is not referenced anymore, can be \(aqIGNORE\(aq or \(aqDELETE\(aq. (default \(aqIGNORE\(aq)
o lookup-strategy (str) -- Determines how relative job names in DSL scripts are interpreted, can be \(aqJENKINS_ROOT\(aq or \(aqSEED_JOB\(aq. (default \(aqJENKINS_ROOT\(aq)
o additional-classpath (str) -- Newline separated list of additional classpath entries for the Job DSL scripts. All entries must be relative to the workspace root, e.g. build/classes/main. (optional)
Example:
builders:
  - dsl:
      script-text: "job { name \(aqdsljob\(aq }"
      ignore-existing: "true"
      removed-job-action: "DISABLE"
      removed-view-action: "DELETE"
      lookup-strategy: "SEED_JOB"
      additional-classpath: "*.jar"

builders:
  - dsl:
      target: "jobs/**/*.groovy"
      ignore-existing: "true"
      removed-job-action: "DISABLE"
      removed-view-action: "DELETE"
      lookup-strategy: "SEED_JOB"
      additional-classpath: "*.jar"

fingerprint
Adds the ability to generate fingerprints as build steps instead of waiting for a build to complete. Requires the Jenkins Fingerprint Plugin.
Parameters
targets (str) -- Files to fingerprint (default \(aq\(aq)
Full Example:
builders:
  - fingerprint:
      targets: module/dist/**/*.zip

Minimal Example:
builders:
  - fingerprint

github-notifier
Set pending build status on Github commit. Requires the Jenkins Github Plugin.
Example:
builders:
  - github-notifier

gradle Execute gradle tasks. Requires the Jenkins Gradle Plugin.
Parameters
o tasks (str) -- List of tasks to execute
o gradle-name (str) -- Use a custom gradle name (default \(aq\(aq)
o wrapper (bool) -- use gradle wrapper (default false)
o executable (bool) -- make gradlew executable (default false)
o switches (list) -- Switches for gradle, can have multiples
o use-root-dir (bool) -- Whether to run the gradle script from the top level directory or from a different location (default false)
o root-build-script-dir (str) -- If your workspace has the top-level build.gradle in somewhere other than the module root directory, specify the path (relative to the module root) here, such as ${workspace}/parent/ instead of just ${workspace}.
o build-file (str) -- name of gradle build script (default \(aqbuild.gradle\(aq)
Example:
builders:
  - gradle:
      build-file: "build.gradle"
      gradle-name: "gradle-1.2"
      wrapper: true
      executable: true
      use-root-dir: true
      root-build-script-dir: ${workspace}/tests
      switches:
        - "-g /foo/bar/.gradle"
        - "-PmavenUserName=foobar"
      tasks: |
             init
             build
             tests

grails Execute a grails build step. Requires the Jenkins Grails Plugin.
Parameters
o use-wrapper (bool) -- Use a grails wrapper (default false)
o name (str) -- Select a grails installation to use (default \(aq(Default)\(aq)
o force-upgrade (bool) -- Run \(aqgrails upgrade --non-interactive\(aq first (default false)
o non-interactive (bool) -- append --non-interactive to all build targets (default false)
o targets (str) -- Specify target(s) to run separated by spaces (required)
o server-port (str) -- Specify a value for the server.port system property (default \(aq\(aq)
o work-dir (str) -- Specify a value for the grails.work.dir system property (default \(aq\(aq)
o project-dir (str) -- Specify a value for the grails.project.work.dir system property (default \(aq\(aq)
o base-dir (str) -- Specify a path to the root of the Grails project (default \(aq\(aq)
o properties (str) -- Additional system properties to set (default \(aq\(aq)
o plain-output (bool) -- append --plain-output to all build targets (default false)
o stack-trace (bool) -- append --stack-trace to all build targets (default false)
o verbose (bool) -- append --verbose to all build targets (default false)
o refresh-dependencies (bool) -- append --refresh-dependencies to all build targets (default false)
Full Example:
builders:
  - grails:
      use-wrapper: true
      name: grails-2.2.2
      force-upgrade: true
      non-interactive: true
      targets: war ear
      server-port: 8003
      work-dir: ./grails-work
      project-dir: ./project-work
      base-dir: ./grails/project
      properties: program.name=foo
      plain-output: true
      stack-trace: true
      verbose: true
      refresh-dependencies: true

Minimal Example:
builders:
  - grails:
      targets: foo

groovy Execute a groovy script or command. Requires the Jenkins Groovy Plugin.
Parameters
o file (str) -- Groovy file to run. (Alternative: you can chose a command instead)
o command (str) -- Groovy command to run. (Alternative: you can chose a script file instead)
o version (str) -- Groovy version to use. (default \(aq(Default)\(aq)
o parameters (str) -- Parameters for the Groovy executable. (default \(aq\(aq)
o script-parameters (str) -- These parameters will be passed to the script. (default \(aq\(aq)
o properties (str) -- Instead of passing properties using the -D parameter you can define them here. (default \(aq\(aq)
o java-opts (str) -- Direct access to JAVA_OPTS. Properties allows only -D properties, while sometimes also other properties like -XX need to be setup. It can be done here. This line is appended at the end of JAVA_OPTS string. (default \(aq\(aq)
o class-path (str) -- Specify script classpath here. Each line is one class path item. (default \(aq\(aq)
Minimal Example:
builders:
  - groovy:
      command: "println Hello"

Full Example:
builders:
  - groovy:
      command: "Some command"
      version: "Groovy 1.2"
      parameters: "parameters"
      script-parameters: "script parameters"
      properties: "properties"
      java-opts: "java opts"

http-request
This plugin sends a http request to an url with some parameters. Requires the Jenkins HTTP Request Plugin.
Parameters
o url (str) -- Specify an URL to be requested (required)
o mode (str) --
The http mode of the request (default GET)
mode values
o GET
o POST
o PUT
o DELETE
o HEAD
o content-type (str) -- Add \(aqContent-type: foo\(aq HTTP request headers where foo is the http content-type the request is using. (default NOT_SET)
o accept-type (str) --
Add \(aqAccept: foo\(aq HTTP request headers where foo is the http content-type to accept (default NOT_SET)
content-type and accept-type values
o NOT_SET
o TEXT_HTML
o APPLICATION_JSON
o APPLICATION_TAR
o APPLICATION_ZIP
o APPLICATION_OCTETSTREAM
o output-file (str) -- Name of the file in which to write response data (default \(aq\(aq)
o time-out (int) -- Specify a timeout value in seconds (default 0)
o console-log (bool) -- This allows you to turn off writing the response body to the log (default false)
o pass-build (bool) -- Should build parameters be passed to the URL being called (default false)
o valid-response-codes (str) -- Configure response code to mark an execution as success. You can configure simple code such as "200" or multiple codes separated by comma(\(aq,\(aq) e.g. "200,404,500" Interval of codes should be in format From:To e.g. "100:399". The default (as if empty) is to fail to 4xx and 5xx. That means success from 100 to 399 "100:399" To ignore any response code use "100:599". (default \(aq\(aq)
o valid-response-content (str) -- If set response must contain this string to mark an execution as success (default \(aq\(aq)
o authentication-key (str) -- Authentication that will be used before this request. Authentications are created in global configuration under a key name that is selected here.
o custom-headers (list) --
list of header parameters
custom-header
o name (str) -- Name of the header
o value (str) -- Value of the header
Example:
builders:
  - http-request:
      url: http://example.com/jenkinsTest

builders:
  - http-request:
      url: http://example.com/jenkinsTest
      mode: POST
      pass-build: true
      content-type: TEXT_HTML
      accept-type: TEXT_HTML
      output-file: response_file.txt
      authentication-key: authenticationkey
      console-log: true
      time-out: 10
      valid-response-codes: 100:399
      valid-response-content: foo
      custom-headers:
        - name: header
          value: value
        - name: header2
          value: value2

inject Inject an environment for the job. Requires the Jenkins EnvInject Plugin.
Parameters
o properties-file (str) -- the name of the property file (optional)
o properties-content (str) -- the properties content (optional)
o script-file (str) -- the name of a script file to run (optional)
o script-content (str) -- the script content (optional)
Example:
builders:
  - inject:
      properties-file: example.prop
      properties-content: EXAMPLE=foo-bar
      script-file: script.sh
      script-content: script content

jenkins-jira-issue-updater
Updates issues in Atlassian JIRA as part of a Jenkins job.
Requires the Jenkins Jira Issue Updater Plugin.
Parameters
o base-url (str) -- The base url of the rest API. (default \(aq\(aq)
o username (str) -- The Jira username (required)
o password (str) -- The Jira password (required)
o jql (str) -- The JQL used to select the issues to update. (required)
o workflow (str) -- The Name of the workflow action to be executed. (default \(aq\(aq)
o comment (str) -- The Jira comment to be added. (default \(aq\(aq)
o custom-Id (str) -- The Jira custom field to be edited. (default \(aq\(aq)
o custom-value (str) -- Jira custom field value. (default \(aq\(aq)
o fail-if-error (bool) -- Fail this build if JQL returns error. ((default false)
o fail-if-no-match (bool) -- Fail this build if no issues are matched. (default false)
o fail-if-no-connection (bool) -- Fail this build if can\(aqt connect to Jira. (default false)
Minimal Example:
builders:
  - jenkins-jira-issue-updater:
      username: \(aqUsername\(aq
      password: \(aqPassword\(aq
      jql: \(aqjql\(aq

Full Example:
builders:
  - jenkins-jira-issue-updater:
      base-url: url
      username: your-username
      password: your-password
      jql: project-key
      workflow: workflow-name
      comment: comment
      custom-Id: ID
      custom-value: value
      fail-if-error: true
      fail-if-no-match: true
      fail-if-no-connection: true

jms-messaging
The JMS Messaging Plugin provides the following functionality:
o A build trigger to submit jenkins jobs upon receipt of a matching message.
o A builder that may be used to submit a message to the topic upon the completion of a job
o A post-build action that may be used to submit a message to the topic upon the completion of a job
JMS Messaging provider types supported:
o ActiveMQ
o FedMsg
Requires the Jenkins JMS Messaging Plugin Pipeline Plugin.
Parameters
o override-topic (str) -- If you need to override the default topic. (default \(aq\(aq)
o provider-name (str) -- Name of message provider setup in the global config. (default \(aq\(aq)
o msg-type (str) -- A message type (default \(aqCodeQualityChecksDone\(aq)
o msg-props (str) -- Message header to publish. (default \(aq\(aq)
o msg-content (str) -- Message body to publish. (default \(aq\(aq)
Full Example:
builders:
  - jms-messaging:
      override-topic: org.centos.stage.ci.pipeline.compose.complete
      provider-name: fedmsg
      msg-type: Custom
      msg-props: |
        topic=org.centos.prod.ci.pipeline.compose.complete
        username=fedora-atomic
      msg-content: |
        {
          "build_url": "${BUILD_URL}",
          "compose_url": "<full-url-to-compose>",
          "build_id": "${BUILD_ID}",
          "ref": "fedora/rawhide/${basearch}/atomic-host",
          "rev": "<sha of the commit from dist-git>",
          "namespace": "rpms",
          "repo": "php-simplepie",
          "status": "<success/failure/aborted>",
          "test_guidance": "<comma-separated-list-of-test-suites-to-run>"
        }

Minimal Example:
builders:
  - jms-messaging:
      provider-name: fedmsg
      msg-type: CodeQualityChecksDone
      msg-props: test
      msg-content: test

kmap Publish mobile applications to your Keivox KMAP Private Mobile App Store. Requires the Jenkins Keivox KMAP Private Mobile App Store Plugin.
Parameters
o username (str) -- KMAP\(aqs user email with permissions to upload/publish applications to KMAP (required)
o password (str) -- Password for the KMAP user uploading/publishing applications (required)
o url (str) -- KMAP\(aqs url. This url must always end with "/kmap-client/". For example: http://testing.keivox.com/kmap-client/ (required)
o categories (str) -- Categories\(aq names. If you want to add the application to more than one category, write the categories between commas. (required)
o file-path (str) -- Path to the application\(aqs file (required)
o app-name (str) -- KMAP\(aqs application name (required)
o bundle (str) -- Bundle indentifier (default \(aq\(aq)
o version (str) -- Application\(aqs version (required)
o description (str) -- Application\(aqs description (default \(aq\(aq)
o icon-path (str) -- Path to the application\(aqs icon (default \(aq\(aq)
o publish-optional (bool) --
Publish application after it has been uploaded to KMAP (default false)
publish-optional
o
groups (\(aqstr\(aq) -- groups\(aq names to publish the application
(default \(aq\(aq)
o
users (\(aqstr\(aq) -- users\(aq names to publish the application
(default \(aq\(aq)
o
notify-users (\(aqbool\(aq) -- Send notifications to the users and
groups when publishing the application (default false)
Minimal Example:
builders:
  - kmap:
      username: 
      password: password
      url: http://foo.com/kmap-client/
      categories: Productivity
      file-path: ${WORKSPACE}/path/to/file.extension
      app-name: AppName
      version: b${BUILD_NUMBER}_r${SVN_REVISION}

Full Example:
builders:
  - kmap:
      username: 
      password: password
      url: http://foo.com/kmap-client/
      categories: Productivity
      file-path: ${WORKSPACE}/path/to/file.extension
      app-name: AppName
      bundle: foo.apk
      version: b${BUILD_NUMBER}_r${SVN_REVISION}
      description: description
      icon-path: ${WORKSPACE}/target/application.png
      publish-optional: true
      groups: MobileUsers
      users: 
      notify-users: true

managed-script
This step allows you to reference and execute a centrally managed script within your build. Requires the Jenkins Managed Script Plugin.
Parameters
o script-id (str) -- Id of script to execute (required)
o type (str) --
Type of managed file (default script)
type values
o batch: Execute managed windows batch
o script: Execute managed script
o args (list) -- Arguments to be passed to referenced script
Example:
builders:
  - managed-script:
      script-id: org.jenkinsci.plugins.managedscripts.ScriptConfig1401886156431
      type: script
      args:
        - arg1
        - arg2

builders:
  - managed-script:
      script-id: org.jenkinsci.plugins.managedscripts.WinBatchConfig1402391729132
      type: batch
      args:
        - arg1
        - arg2

maven-builder
Execute Maven3 builder
Allows your build jobs to deploy artifacts automatically to Artifactory.
Requires the Jenkins Artifactory Plugin.
Parameters
o name (str) -- Name of maven installation from the configuration (required)
o pom (str) -- Location of pom.xml (default \(aqpom.xml\(aq)
o goals (str) -- Goals to execute (required)
o maven-opts (str) -- Additional options for maven (default \(aq\(aq)
Example:
builders:
      - maven-builder:
          name: mvn3
          pom: modules/pom.xml
          goals: clean install

maven-target
Execute top-level Maven targets.
Requires the Jenkins Config File Provider Plugin for the Config File Provider "settings" and "global-settings" config.
Parameters
o goals (str) -- Goals to execute
o properties (str) -- Properties for maven, can have multiples
o pom (str) -- Location of pom.xml (default \(aqpom.xml\(aq)
o private-repository (bool) -- Use private maven repository for this job (default false)
o maven-version (str) -- Installation of maven which should be used (optional)
o java-opts (str) -- java options for maven, can have multiples, must be in quotes (optional)
o settings (str) -- Path to use as user settings.xml It is possible to provide a ConfigFileProvider settings file, such as see CFP Example below. (optional)
o settings-type (str) -- Type of settings file file|cfp. (default file)
o global-settings (str) -- Path to use as global settings.xml It is possible to provide a ConfigFileProvider settings file, such as see CFP Example below. (optional)
o global-settings-type (str) -- Type of settings file file|cfp. (default file)
Example:
builders:
        - maven-target:
            maven-version: Maven3
            pom: parent/pom.xml
            goals: clean
            private-repository: true
            properties:
              - foo=bar
              - bar=foo
            java-opts:
              - "-Xms512m -Xmx1024m"
              - "-XX:PermSize=128m -XX:MaxPermSize=256m"
            settings: mvn/settings.xml
            global-settings: mvn/globalsettings.xml

CFP Example:
postbuilders:
      - maven-target:
          maven-version: mvn30
          goals: clean verify
          settings: org.jenkinsci.plugins.configfiles.maven.MavenSettingsConfig0123456789012
          global-settings: org.jenkinsci.plugins.configfiles.maven.GlobalMavenSettingsConfig0123456789012

msbuild
Build .NET project using msbuild. Requires the Jenkins MSBuild Plugin.
Parameters
o msbuild-version (str) -- which msbuild configured in Jenkins to use (default \(aq(Default)\(aq)
o solution-file (str) -- location of the solution file to build (required)
o extra-parameters (str) -- extra parameters to pass to msbuild (default \(aq\(aq)
o pass-build-variables (bool) -- should build variables be passed to msbuild (default true)
o continue-on-build-failure (bool) -- should the build continue if msbuild returns an error (default false)
o unstable-if-warnings (bool) -- If set to true and warnings on compilation, the build will be unstable (>=1.20) (default false)
Full Example:
builders:
  - msbuild:
      solution-file: "MySolution.sln"
      msbuild-version: "msbuild-4.0"
      extra-parameters: "/maxcpucount:4"
      pass-build-variables: False
      continue-on-build-failure: True
      unstable-if-warnings: True

Minimal Example:
builders:
  - msbuild:
      solution-file: MySolution.sln

multijob
Define a multijob phase. Requires the Jenkins Multijob Plugin.
This builder may only be used in jenkins_jobs.modules.project_multijob.MultiJob projects.
Parameters
o name (str) -- MultiJob phase name
o condition (str) -- when to trigger the other job. Can be: \(aqSUCCESSFUL\(aq, \(aqUNSTABLE\(aq, \(aqCOMPLETED\(aq, \(aqFAILURE\(aq, \(aqALWAYS\(aq. (default \(aqSUCCESSFUL\(aq)
o execution-type (str) -- Define how to run jobs in a phase: sequentially or parallel. Can be: \(aqPARALLEL\(aq, \(aqSEQUENTIALLY\(aq (default \(aqPARALLEL\(aq)
o projects (list) --
list of projects to include in the MultiJob phase
Project
o name (str) -- Project name
o alias (str) -- Project alias, which will be shown in MultiJob Overview. Helpful when working with the same project multiple times with different configurations
o current-parameters (bool) -- Pass current build parameters to the other job (default false)
o node-label-name (str) -- Define a list of nodes on which the job should be allowed to be executed on. Requires NodeLabel Parameter Plugin (optional)
o node-label (str) -- Define a label of \(aqRestrict where this project can be run\(aq on the fly. Requires NodeLabel Parameter Plugin (optional)
o node-parameters (bool) -- Use the same Node for the triggered builds that was used for this build. (optional)
o git-revision (bool) -- Pass current git-revision to the other job (default false)
o property-file (str) -- Pass properties from file to the other job (optional)
o predefined-parameters (str) -- Pass predefined parameters to the other job (optional)
o abort-all-job (bool) -- Kill allsubs job and the phase job, if this subjob is killed (default false)
o aggregate-results (bool) -- Aggregate test results. (default false)
o enable-condition (str) -- Condition to run the job in groovy script format (optional)
o kill-phase-on (str) -- Stop the phase execution on specific job status. Can be \(aqFAILURE\(aq, \(aqUNSTABLE\(aq, \(aqNEVER\(aq. (optional)
o restrict-matrix-project (str) -- Filter that restricts the subset of the combinations that the downstream project will run (optional)
o
retry (dict): Enable retry strategy (optional)
retry
o max-retry (int) -- Max number of retries (default 0)
o strategy-path (str) -- Parsing rules path (required)
Example:
builders:
  - multijob:
      name: PhaseOne
      condition: SUCCESSFUL
      execution-type: PARALLEL
      projects:
        - name: PhaseOneJobA
          current-parameters: true
          node-label-name: "vm_name"
          node-label: "agent-${BUILD_NUMBER}"
          git-revision: true
          abort-all-job: true
        - name: PhaseOneJobB
          current-parameters: true
          property-file: build.props
  - multijob:
      name: PhaseTwo
      condition: UNSTABLE
      execution-type: SEQUENTIALLY
      projects:
        - name: PhaseTwoJobA
          current-parameters: true
          predefined-parameters: foo=bar
          node-parameters: true
          aggregate-results: true
        - name: PhaseTwoJobB
          current-parameters: false
          kill-phase-on: UNSTABLE
          enable-condition: "${BUILDNUMBER} % 2 == 1"
          restrict-matrix-project: \(aqJVM_VARIANT == "server"\(aq
  - multijob:
      name: PhaseThree
      condition: ALWAYS
      projects:
        - name: PhaseThreeJobA
          current-parameters: true
          kill-phase-on: FAILURE
  - multijob:
      name: PhaseFour
      execution-type: PARALLEL
      projects:
        - name: PhaseFourJobA
          retry:
              max-retry: 3
              strategy-path: "/PhaseFour/PhaseFourRetry.prop"
  - multijob:
      name: PhaseFive
      projects:
        - name: PhaseFiveJobA
          alias: PhaseFiveJobRunA
        - name: PhaseFiveJobA
          alias: PhaseFiveJobRunB

nexus-artifact-uploader
To upload result of a build as an artifact in Nexus without the need of Maven. Requires the Jenkins :nexus-artifact-uploader: Nexus Artifact Uploader Plugin <Nexus+Artifact+Uploader>.
Parameters
o protocol (str) -- Protocol to use to connect to Nexus (default https)
o nexus_url (str) -- Nexus url (without protocol) (default \(aq\(aq)
o nexus_user (str) -- Username to upload artifact to Nexus (default \(aq\(aq)
o nexus_password (str) -- Password to upload artifact to Nexus (default \(aq\(aq)
o group_id (str) -- GroupId to set for the artifact to upload (default \(aq\(aq)
o artifact_id (str) -- ArtifactId to set for the artifact to upload (default \(aq\(aq)
o version (str) -- Version to set for the artifact to upload (default \(aq\(aq)
o packaging (str) -- Packaging to set for the artifact to upload (default \(aq\(aq)
o type (str) -- Type to set for the artifact to upload (default \(aq\(aq)
o classifier (str) -- Classifier to set for the artifact to upload (default \(aq\(aq)
o repository (str) -- In which repository to upload the artifact (default \(aq\(aq)
o file (str) -- File which will be the uploaded artifact (default \(aq\(aq)
o credentials_id (str) -- Credentials to use (instead of password) (default \(aq\(aq)
File Example:
builders:
  - nexus-artifact-uploader:
      nexus_url: \(aqnexus.org\(aq
      group_id: \(aqcom.example\(aq
      artifact_id: \(aqartifact\(aq
      version: \(aq1.0\(aq
      packaging: \(aqpom\(aq
      type: \(aqzip\(aq
      repository: \(aqmy-hosted-repo\(aq
      file: \(aq/var/lib/jenkins/workspace/my_job/result.zip\(aq

nexus-iq-policy-evaluator
Integrates the Nexus Lifecycle into a Jenkins job. This function triggers \(aqInvokes Nexus Policy Evaluation\(aq. Requires the Jenkins Nexus Platform Plugin.
Parameters
o stage (str) --
Controls the stage the policy evaluation will be run against on the Nexus IQ Server (required)
stage values
o build
o stage-release
o release
o operate
o application-type (dict) --
Specifies an IQ Application (default manual)
application-type values
o manual
o selected
o application-id (str) -- Specify the IQ Application ID (required)
o scan-patterns (list) -- List of Ant-style patterns relative to the workspace root that denote files/archives to be scanned (default [])
o fail-build-network-error (bool) -- Controls the build outcome if there is a failure in communicating with the Nexus IQ Server (default false)
Minimal Example:
builders:
  - nexus-iq-policy-evaluator:
      stage: \(aqbuild\(aq
      application-id: \(aqnexus-iq-application-id001\(aq

Full Example:
builders:
  - nexus-iq-policy-evaluator:
      stage: \(aqstage-release\(aq
      application-type: \(aqselected\(aq
      application-id: \(aqnexus-iq-application-id002\(aq
      scan-patterns:
        - \(aq**/target/*.war\(aq
        - \(aq**/target/*.ear\(aq
      fail-build-network-error: true

nexus-repo-manager
Allows for artifacts selected in Jenkins packages to be available in Nexus Repository Manager. Requires the Jenkins Nexus Platform Plugin.
Parameters
o instance-id (str) -- The ID of the Nexus Instance (required)
o repo-id (str) -- The ID of the Nexus Repository (required)
Minimal Example:
builders:
    - nexus-repo-manager:
        instance-id: Nexus-Repo-Instance
        repo-id: Releases

nodejs This plugin allows you to execute NodeJS scripts as a job build step. Requires the Jenkins NodeJS Plugin.
Parameters
o name (str) -- NodeJS installation name
o script (str) -- NodeJS script (required)
o config-id (str) -- ID of npmrc config file, which is the last field (a 32-digit hexadecimal code) of the path of URL visible after you clicked the file under Jenkins Managed Files.
Minimal Example:
builders:
  - nodejs:
      script: "console.log(\(aqSome output\(aq);"

Full Example:
builders:
  - nodejs:
      name: "NodeJS_8.1"
      script: "console.log(\(aqSome output\(aq);"
      config-id: "e3757442-7c21-4a65-a1ff-6c70f5c6df34"

openshift-build-verify
Performs the equivalent of an \(aqoc get builds` command invocation for the provided buildConfig key provided; once the list of builds are obtained, the state of the latest build is inspected for up to a minute to see if it has completed successfully. Requires the Jenkins OpenShift Pipeline Plugin.
Parameters
o api-url (str) -- this would be the value you specify if you leverage the --server option on the OpenShift oc command. (default \(aqhttps://openshift.default.svc.cluster.local\(aq)
o bld-cfg (str) -- The value here should be whatever was the output form oc project when you created the BuildConfig you want to run a Build on (default \(aqfrontend\(aq)
o namespace (str) -- If you run oc get bc for the project listed in "namespace", that is the value you want to put here. (default \(aqtest\(aq)
o auth-token (str) -- The value here is what you supply with the --token option when invoking the OpenShift oc command. (default \(aq\(aq)
o verbose (bool) -- This flag is the toggle for turning on or off detailed logging in this plug-in. (default false)
Full Example:
builders:
  - openshift-build-verify:
      api-url: https://openshift.example.local.url/
      bld-cfg: front
      namespace: test-build
      auth-token: ose-key-buildv1
      verbose: true

Minimal Example:
builders:
  - openshift-build-verify

openshift-builder
Perform builds in OpenShift for the job. Requires the Jenkins OpenShift Pipeline Plugin.
Parameters
o api-url (str) -- this would be the value you specify if you leverage the --server option on the OpenShift oc command. (default \(aqhttps://openshift.default.svc.cluster.local\(aq)
o bld-cfg (str) -- The value here should be whatever was the output form oc project when you created the BuildConfig you want to run a Build on (default \(aqfrontend\(aq)
o namespace (str) -- If you run oc get bc for the project listed in "namespace", that is the value you want to put here. (default \(aqtest\(aq)
o auth-token (str) -- The value here is what you supply with the --token option when invoking the OpenShift oc command. (default \(aq\(aq)
o commit-ID (str) -- The value here is what you supply with the --commit option when invoking the OpenShift oc start-build command. (default \(aq\(aq)
o verbose (bool) -- This flag is the toggle for turning on or off detailed logging in this plug-in. (default false)
o build-name (str) -- TThe value here is what you supply with the --from-build option when invoking the OpenShift oc start-build command. (default \(aq\(aq)
o show-build-logs (bool) -- Indicates whether the build logs get dumped to the console of the Jenkins build. (default false)
Full Example:
builders:
  - openshift-builder:
      api-url: https://openshift.example.local.url/
      bld-cfg: front
      namespace: test9
      auth-token: ose-builder1
      commit-ID: ae489f7d
      verbose: true
      build-name: ose-test-build
      show-build-logs: true

Minimal Example:
builders:
  - openshift-builder

openshift-creator
Performs the equivalent of an oc create command invocation; this build step takes in the provided JSON or YAML text, and if it conforms to OpenShift schema, creates whichever OpenShift resources are specified. Requires the Jenkins OpenShift Pipeline Plugin.
Parameters
o api-url (str) -- this would be the value you specify if you leverage the --server option on the OpenShift oc command. (default \(aqhttps://openshift.default.svc.cluster.local\(aq)
o jsonyaml (str) -- The JSON or YAML formatted text that conforms to the schema for defining the various OpenShift resources. (default \(aq\(aq)
o namespace (str) -- If you run oc get bc for the project listed in "namespace", that is the value you want to put here. (default \(aqtest\(aq)
o auth-token (str) -- The value here is what you supply with the --token option when invoking the OpenShift oc command. (default \(aq\(aq)
o verbose (bool) -- This flag is the toggle for turning on or off detailed logging in this plug-in. (default false)
Full Example:
builders:
  - openshift-creator:
      api-url: https://openshift.example.local.url/
      jsonyaml: \(aqfront: back\(aq
      namespace: test6
      auth-token: ose-key-creator1
      verbose: true

Minimal Example:
builders:
  - openshift-creator

openshift-dep-verify
Determines whether the expected set of DeploymentConfig\(aqs, ReplicationController\(aqs, and active replicas are present based on prior use of the scaler (2) and deployer (3) steps Requires the Jenkins OpenShift Pipeline Plugin._
Parameters
o api-url (str) -- this would be the value you specify if you leverage the --server option on the OpenShift oc command. (default https://openshift.default.svc.cluster.local)
o dep-cfg (str) -- The value here should be whatever was the output form oc project when you created the BuildConfig you want to run a Build on (default frontend)
o namespace (str) -- If you run oc get bc for the project listed in "namespace", that is the value you want to put here. (default test)
o replica-count (int) -- The value here should be whatever the number of pods you want started for the deployment. (default 0)
o auth-token (str) -- The value here is what you supply with the --token option when invoking the OpenShift oc command. (default \(aq\(aq)
o verbose (bool) -- This flag is the toggle for turning on or off detailed logging in this plug-in. (default false)
Full Example:
builders:
  - openshift-dep-verify:
      api-url: https://openshift.example.local.url/
      dep-cfg: front
      namespace: test6
      replica-count: 4
      auth-token: ose-key-dep-verify1
      verbose: true

Minimal Example:
builders:
  - openshift-dep-verify

openshift-deployer
Start a deployment in OpenShift for the job. Requires the Jenkins OpenShift Pipeline Plugin.
Parameters
o api-url (str) -- this would be the value you specify if you leverage the --server option on the OpenShift oc command. (default \(aqhttps://openshift.default.svc.cluster.local\(aq)
o dep-cfg (str) -- The value here should be whatever was the output form oc project when you created the BuildConfig you want to run a Build on (default \(aqfrontend\(aq)
o namespace (str) -- If you run oc get bc for the project listed in "namespace", that is the value you want to put here. (default \(aqtest\(aq)
o auth-token (str) -- The value here is what you supply with the --token option when invoking the OpenShift oc command. (default \(aq\(aq)
o verbose (bool) -- This flag is the toggle for turning on or off detailed logging in this plug-in. (default false)
Full Example:
builders:
  - openshift-deployer:
      api-url: https://openshift.example.local.url/
      dep-cfg: front
      namespace: test3
      auth-token: ose-key-deployer1
      verbose: true

Minimal Example:
builders:
  - openshift-deployer

openshift-img-tagger
Performs the equivalent of an oc tag command invocation in order to manipulate tags for images in OpenShift ImageStream\(aqs Requires the Jenkins OpenShift Pipeline Plugin.
Parameters
o api-url (str) -- this would be the value you specify if you leverage the --server option on the OpenShift oc command. (default \(aqhttps://openshift.default.svc.cluster.local\(aq)
o test-tag (str) -- The equivalent to the name supplied to a oc get service command line invocation. (default \(aqorigin-nodejs-sample:latest\(aq)
o prod-tag (str) -- The equivalent to the name supplied to a oc get service command line invocation. (default \(aqorigin-nodejs-sample:prod\(aq)
o namespace (str) -- If you run oc get bc for the project listed in "namespace", that is the value you want to put here. (default \(aqtest\(aq)
o auth-token (str) -- The value here is what you supply with the --token option when invoking the OpenShift oc command. (default \(aq\(aq)
o verbose (bool) -- This flag is the toggle for turning on or off detailed logging in this plug-in. (default false)
Full Example:
builders:
  - openshift-img-tagger:
      api-url: https://openshift.example.local.url/
      test-tag: origin-nodejs-sample:test
      prod-tag: origin-nodejs-sample:production
      namespace: test5
      auth-token: ose-key-img1
      verbose: true

Minimal Example:
builders:
  - openshift-img-tagger

openshift-scaler
Scale deployments in OpenShift for the job. Requires the Jenkins OpenShift Pipeline Plugin.
Parameters
o api-url (str) -- this would be the value you specify if you leverage the --server option on the OpenShift oc command. (default \(aqhttps://openshift.default.svc.cluster.local\(aq)
o dep-cfg (str) -- The value here should be whatever was the output form oc project when you created the BuildConfig you want to run a Build on (default \(aqfrontend\(aq)
o namespace (str) -- If you run oc get bc for the project listed in "namespace", that is the value you want to put here. (default \(aqtest\(aq)
o replica-count (int) -- The value here should be whatever the number of pods you want started for the deployment. (default 0)
o auth-token (str) -- The value here is what you supply with the --token option when invoking the OpenShift oc command. (default \(aq\(aq)
o verbose (bool) -- This flag is the toggle for turning on or off detailed logging in this plug-in. (default false)
Full Example:
builders:
  - openshift-scaler:
      api-url: https://openshift.example.local.url/
      dep-cfg: front
      namespace: test2
      replica-count: 4
      auth-token: ose-key-scaler1
      verbose: true

Minimal Example:
builders:
  - openshift-scaler

openshift-svc-verify
Verify a service is up in OpenShift for the job. Requires the Jenkins OpenShift Pipeline Plugin.
Parameters
o api-url (str) -- this would be the value you specify if you leverage the --server option on the OpenShift oc command. (default \(aqhttps://openshift.default.svc.cluster.local\(aq)
o svc-name (str) -- The equivalent to the name supplied to a oc get service command line invocation. (default \(aqfrontend\(aq)
o namespace (str) -- If you run oc get bc for the project listed in "namespace", that is the value you want to put here. (default \(aqtest\(aq)
o auth-token (str) -- The value here is what you supply with the --token option when invoking the OpenShift oc command. (default \(aq\(aq)
o verbose (bool) -- This flag is the toggle for turning on or off detailed logging in this plug-in. (default false)
Full Example:
builders:
  - openshift-svc-verify:
      api-url: https://openshift.example.local.url/
      svc-name: front
      namespace: test4
      auth-token: ose-key-svc-verify1
      verbose: true

Minimal Example:
builders:
  - openshift-svc-verify

powershell
Execute a powershell command. Requires the Powershell Plugin.
Parameter
the powershell command to execute
Example:
builders:
  - powershell: "foo/foo.ps1"

publish-over-cifs
Upload files via CIFS. Requires the Jenkins Publish over CIFS Plugin.
Parameters
o site (str) -- name of the ssh site
o target (str) -- destination directory
o target-is-date-format (bool) -- whether target is a date format. If true, raw text should be quoted (default false)
o clean-remote (bool) -- should the remote directory be deleted before transferring files (default false)
o source (str) -- source path specifier
o excludes (str) -- excluded file pattern (optional)
o remove-prefix (str) -- prefix to remove from uploaded file paths (optional)
o fail-on-error (bool) -- fail the build if an error occurs (default false)
o flatten (bool) -- only create files on the server, don\(aqt create directories (default false)
Example:
builders:
    - publish-over-cifs:
        site: \(aqcifs.share\(aq
        target: \(aqdest/dir\(aq
        source: \(aqbase/source/dir/**\(aq
        remove-prefix: \(aqbase/source/dir\(aq
        excludes: \(aq**/*.excludedfiletype\(aq
        flatten: true

publish-over-ssh
Send files or execute commands over SSH. Requires the Jenkins Publish over SSH Plugin.
Parameters
o site (str) -- name of the ssh site
o target (str) -- destination directory
o target-is-date-format (bool) -- whether target is a date format. If true, raw text should be quoted (default false)
o clean-remote (bool) -- should the remote directory be deleted before transferring files (default false)
o source (str) -- source path specifier
o command (str) -- a command to execute on the remote server (optional)
o timeout (int) -- timeout in milliseconds for the Exec command (optional)
o use-pty (bool) -- run the exec command in pseudo TTY (default false)
o excludes (str) -- excluded file pattern (optional)
o remove-prefix (str) -- prefix to remove from uploaded file paths (optional)
o fail-on-error (bool) -- fail the build if an error occurs (default false)
Example:
builders:
    - publish-over-ssh:
        site: \(aqserver.example.com\(aq
        target: \(aqdest/dir\(aq
        source: \(aqbase/source/dir/**\(aq
        timeout: 1800000

python Execute a python command. Requires the Jenkins Python plugin.
Parameters
parameter (str) -- the python command to execute
Example:
builders:
  - python: \(aqimport foobar\(aq

runscope
Execute a Runscope test. Requires the Jenkins Runscope Plugin.
Parameters
o test-trigger-url (str) -- Trigger URL for test. (required)
o access-token (str) -- OAuth Personal Access token. (required)
o timeout (int) -- Timeout for test duration in seconds. (default 60)
Minimal Example:
builders:
  - runscope:
      test-trigger-url: "https://api.runscope.com/radar/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/trigger"
      access-token: "123456"

Full Example:
builders:
  - runscope:
      test-trigger-url: "https://api.runscope.com/radar/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/trigger"
      access-token: "123456"
      timeout: 123

saltstack
Send a message to Salt API. Requires the saltstack plugin.
Parameters
o servername (str) -- Salt master server name (required)
o authtype (str) -- Authentication type (\(aqpam\(aq or \(aqldap\(aq, default \(aqpam\(aq)
o credentials (str) -- Credentials ID for which to authenticate to Salt master (required)
o target (str) -- Target minions (default \(aq\(aq)
o targettype (str) -- Target type (\(aqglob\(aq, \(aqpcre\(aq, \(aqlist\(aq, \(aqgrain\(aq, \(aqpillar\(aq, \(aqnodegroup\(aq, \(aqrange\(aq, or \(aqcompound\(aq, default \(aqglob\(aq)
o function (str) -- Function to execute (default \(aq\(aq)
o arguments (str) -- Salt function arguments (default \(aq\(aq)
o kwarguments (str) -- Salt keyword arguments (default \(aq\(aq)
o saveoutput (bool) -- Save Salt return data into environment variable (default false)
o clientinterface (str) -- Client interface type (\(aqlocal\(aq, \(aqlocal-batch\(aq, or \(aqrunner\(aq, default \(aqlocal\(aq)
o wait (bool) -- Wait for completion of command (default false)
o polltime (str) -- Number of seconds to wait before polling job completion status (default \(aq\(aq)
o batchsize (str) -- Salt batch size, absolute value or %-age (default 100%)
o mods (str) -- Mods to runner (default \(aq\(aq)
o setpillardata (bool) -- Set Pillar data (default false)
o pillarkey (str) -- Pillar key (default \(aq\(aq)
o pillarvalue (str) -- Pillar value (default \(aq\(aq)
Minimal Example:
builders:
  - saltstack:
      servername: \(aq{{SALT_MASTER}}\(aq
      credentials: \(aqcredentials ID\(aq

Full Example:
builders:
  - saltstack:
      servername: \(aq{{SALT_MASTER}}\(aq
      credentials: \(aqcredentials ID\(aq
      clientinterface: runner
      mods: runner_mods
      setpillardata: true
      pillarkey: pkey
      pillarvalue: pvalue
      wait: true
      polltime: 10
      target: \(aq{{HOSTS}}\(aq
      targettype: list
      function: pkg.update
      saveoutput: true

sbt Execute a sbt build step. Requires the Jenkins Sbt Plugin.
Parameters
o name (str) -- Select a sbt installation to use. If no name is provided, the first in the list of defined SBT builders will be used. (default to first in list)
o jvm-flags (str) -- Parameters to pass to the JVM (default \(aq\(aq)
o actions (str) -- Select the sbt tasks to execute (default \(aq\(aq)
o sbt-flags (str) -- Add flags to SBT launcher (default \(aq-Dsbt.log.noformat=true\(aq)
o subdir-path (str) -- Path relative to workspace to run sbt in (default \(aq\(aq)
Example:
builders:
  - sbt:
      name: "default"
      actions: "clean package"
      jvm-flags: "-Xmx8G"

scan-build
This plugin allows you configure a build step that will execute the Clang scan-build static analysis tool against an XCode project.
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
o target (str) -- Provide the exact name of the XCode target you wish to have compiled and analyzed (required)
o target-sdk (str) -- Set the simulator version of a currently installed SDK (default iphonesimulator)
o config (str) -- Provide the XCode config you wish to execute scan-build against (default Debug)
o clang-install-name (str) -- Name of clang static analyzer to use (default \(aq\(aq)
o xcode-sub-path (str) -- Path of XCode project relative to the workspace (default \(aq\(aq)
o workspace (str) -- Name of workspace (default \(aq\(aq)
o scheme (str) -- Name of scheme (default \(aq\(aq)
o scan-build-args (str) -- Additional arguments to clang scan-build (default --use-analyzer Xcode)
o xcode-build-args (str) -- Additional arguments to XCode (default -derivedDataPath $WORKSPACE/build)
o report-folder (str) -- Folder where generated reports are located (>=1.7) (default clangScanBuildReports)
Full Example:
builders:
  - scan-build:
      target: path/to/target
      target-sdk: iphonesimulator
      config: Debug
      clang-install-name: Analyzer
      xcode-sub-path: myProj/subfolder
      workspace: workspace
      scheme: SchemeName
      scan-build-args: --use-analyzer Xcode
      xcode-build-args: -derivedDataPath $WORKSPACE/build
      report-folder: clangScanBuildReports

Minimal Example:
builders:
  - scan-build:
      target: path/to/target

shell Execute a shell command.
There are two ways of configuring the builder, with a plain string to execute:
Parameters
parameter (str) -- the shell command to execute
Or with a mapping that allows other parameters to be passed:
Parameters
o command (str) -- the shell command to execute
o unstable-return (int) -- the shell exit code to interpret as an unstable build result
Example:
builders:
  - shell: "make test"

builders:
  - shell:
      command: "make test"
      unstable-return: 3

shining-panda
Execute a command inside various python environments. Requires the Jenkins ShiningPanda plugin.
Parameters
build-environment (str) --
Building environment to set up (required).
build-environment values
o python: Use a python installation configured in Jenkins.
o custom: Use a manually installed python.
o virtualenv: Create a virtualenv
For the python environment
Parameters
python-version (str) -- Name of the python installation to use. Must match one of the configured installations on server configuration (default \(aqSystem-CPython-2.7\(aq)
For the custom environment:
Parameters
home (str) -- path to the home folder of the custom installation (required)
For the virtualenv environment:
Parameters
o python-version (str) -- Name of the python installation to use. Must match one of the configured installations on server configuration (default \(aqSystem-CPython-2.7\(aq)
o name (str) -- Name of this virtualenv. Two virtualenv builders with the same name will use the same virtualenv installation (optional)
o clear (bool) -- If true, delete and recreate virtualenv on each build. (default false)
o use-distribute (bool) -- if true use distribute, if false use setuptools. (default true)
o system-site-packages (bool) -- if true, give access to the global site-packages directory to the virtualenv. (default false)
Common to all environments:
Parameters
o nature (str) --
Nature of the command field. (default shell)
nature values
o shell: execute the Command contents with default shell
o xshell: like shell but performs platform conversion first
o python: execute the Command contents with the Python executable
o command (str) -- The command to execute
o ignore-exit-code (bool) -- mark the build as failure if any of the commands exits with a non-zero exit code. (default false)
Examples:
builders:
    - shining-panda:
        build-environment: python
        python-version: System-CPython-2.7
        nature: python
        command: setup.py build
        ignore-exit-code: false

builders:
    - shining-panda:
        build-environment: custom
        home: /usr/local/lib/custom-python-27
        nature: xshell
        command: |
            cd $HOME/build
            python setup.py build
        ignore-exit-code: true

builders:
    - shining-panda:
        build-environment: virtualenv
        python-version: System-CPython-2.7
        nature: shell
        command: python setup.py build
        name: virtvenv1
        clear: true
        use-distribute: true
        system-site-packages: true
        ignore-exit-code: true

sonar Invoke standalone Sonar analysis. Requires the Jenkins Sonar Plugin.
Parameters
o sonar-name (str) -- Name of the Sonar installation.
o sonar-scanner (str) -- Name of the Sonar Scanner.
o task (str) -- Task to run. (default \(aq\(aq)
o project (str) -- Path to Sonar project properties file. (default \(aq\(aq)
o properties (str) -- Sonar configuration properties. (default \(aq\(aq)
o java-opts (str) -- Java options for Sonnar Runner. (default \(aq\(aq)
o additional-arguments (str) -- additional command line arguments (default \(aq\(aq)
o jdk (str) -- JDK to use (inherited from the job if omitted). (optional)
Example:
builders:
  - sonar:
      sonar-name: Sonar
      scanner-name: scanner-3.x
      task: views
      project: sonar-project.properties
      properties: sonar.views.list=myview1,myview2
      java-opts: -Xmx512m
      additional-arguments: -X

sonatype-clm
Requires the Jenkins Sonatype CLM Plugin.
Parameters
o value (str) -- Select CLM application from a list of available CLM applications or specify CLM Application ID (default list)
o application-name (str) -- Determines the policy elements to associate with this build. (required)
o username (str) -- Username on the Sonatype CLM server. Leave empty to use the username configured at global level. (default \(aq\(aq)
o password (str) -- Password on the Sonatype CLM server. Leave empty to use the password configured at global level. (default \(aq\(aq)
o fail-on-clm-server-failure (bool) -- Controls the build outcome if there is a failure in communicating with the CLM server. (default false)
o stage (str) -- Controls the stage the policy evaluation will be run against on the CLM server. Valid stages: build, stage-release, release, operate. (default \(aqbuild\(aq)
o scan-targets (str) -- Pattern of files to include for scanning. (default \(aq\(aq)
o module-excludes (str) -- Pattern of files to exclude. (default \(aq\(aq)
o advanced-options (str) -- Options to be set on a case-by-case basis as advised by Sonatype Support. (default \(aq\(aq)
Minimal Example:
builders:
    - sonatype-clm:
        application-name: jenkins-job-builder

Full Example:
builders:
    - sonatype-clm:
        value: manual
        application-name: jenkins-job-builder
        fail-on-clm-server-failure: true
        stage: release
        scan-targets: \(aq**/*.jar\(aq
        module-excludes: \(aq**/my-module/target/**\(aq
        advanced-options: \(aqtest\(aq
        username: bar
        password: 06XQY39LHGACt3r3kzSULg==

ssh-builder
Executes command on remote host Requires the Jenkins SSH plugin.
Parameters
o ssh-user-ip (str) -- user@ip:ssh_port of machine that was defined in jenkins according to SSH plugin instructions
o command (str) -- command to run on remote server
Example:
builders:
  - ssh-builder:
      ssh-user-ip: foo@bar:22
      command: echo foo

system-groovy
Execute a system groovy script or command. Requires the Jenkins Groovy Plugin.
Parameters
o file (str) -- Groovy file to run. (Alternative: you can chose a command instead)
o command (str) -- Groovy command to run. (Alternative: you can chose a script file instead)
o bindings (str) -- Define variable bindings (in the properties file format). Specified variables can be addressed from the script. (optional)
o class-path (str) -- Specify script classpath here. Each line is one class path item. (optional)
Examples:
builders:
  - system-groovy:
      file: "test.groovy"

builders:
  - system-groovy:
      command: "Some command"
      bindings: "Some bindings"
      class-path: "Some classpath"

tox Use tox to build a multi-configuration project. Requires the Jenkins ShiningPanda plugin.
Parameters
o ini (str) -- The TOX configuration file path (default tox.ini)
o recreate (bool) -- If true, create a new environment each time (default false)
o toxenv-pattern (str) -- The pattern used to build the TOXENV environment variable. (optional)
Example:
builders:
  - tox:
      recreate: True

trigger-builds
Trigger builds of other jobs. Requires the Jenkins Parameterized Trigger Plugin.
Parameters
o project (list) -- the Jenkins project to trigger
o predefined-parameters (str) -- key/value pairs to be passed to the job (optional)
o bool-parameters (list) -- .INDENT 2.0
Bool
o name (str) -- Parameter name
o value (bool) -- Value to set (default false)
o property-file (str) -- Pass properties from file to the other job (optional)
o property-file-fail-on-missing (bool) -- Don\(aqt trigger if any files are missing (default true)
o current-parameters (bool) -- Whether to include the parameters passed to the current build to the triggered job.
o node-label-name (str) -- Define a name for the NodeLabel parameter to be set. Used in conjunction with node-label. Requires NodeLabel Parameter Plugin (optional)
o node-label (str) -- Label of the nodes where build should be triggered. Used in conjunction with node-label-name. Requires NodeLabel Parameter Plugin (optional)
o restrict-matrix-project (str) -- Filter that restricts the subset of the combinations that the triggered job will run (optional)
o svn-revision (bool) -- Whether to pass the svn revision to the triggered job (optional)
o git-revision (dict) --
Passes git revision to the triggered job (optional).
o combine-queued-commits (bool): Whether to combine queued git hashes or not (default false)
o block (bool) -- whether to wait for the triggered jobs to finish or not (default false)
o block-thresholds (dict) --
Fail builds and/or mark as failed or unstable based on thresholds. Only apply if block parameter is true (optional)
block-thresholds
o build-step-failure-threshold (str) - build step failure threshold, valid values are \(aqnever\(aq, \(aqSUCCESS\(aq, \(aqUNSTABLE\(aq, or \(aqFAILURE\(aq. (default \(aqFAILURE\(aq)
o unstable-threshold (str) - unstable threshold, valid values are \(aqnever\(aq, \(aqSUCCESS\(aq, \(aqUNSTABLE\(aq, or \(aqFAILURE\(aq. (default \(aqUNSTABLE\(aq)
o failure-threshold (str) - overall failure threshold, valid values are \(aqnever\(aq, \(aqSUCCESS\(aq, \(aqUNSTABLE\(aq, or \(aqFAILURE\(aq. (default \(aqFAILURE\(aq)
o same-node (bool) -- Use the same node for the triggered builds that was used for this build (optional)
o parameter-factories (list) --
list of parameter factories
Factory
o factory (str) filebuild -- For every property file, invoke one build
o file-pattern (str) -- File wildcard pattern
o no-files-found-action (str) -- Action to perform when no files found. Valid values \(aqFAIL\(aq, \(aqSKIP\(aq, or \(aqNOPARMS\(aq. (default \(aqSKIP\(aq)
Factory
o factory (str) binaryfile -- For every matching file, invoke one build
o file-pattern (str) -- Artifact ID of the artifact
o no-files-found-action (str) -- Action to perform when no files found. Valid values \(aqFAIL\(aq, \(aqSKIP\(aq, or \(aqNOPARMS\(aq. (default \(aqSKIP\(aq)
Factory
o factory (str) counterbuild -- Invoke i=0...N builds
o from (int) -- Artifact ID of the artifact
o to (int) -- Version of the artifact
o step (int) -- Classifier of the artifact
o parameters (str) -- KEY=value pairs, one per line (default \(aq\(aq)
o validation-fail (str) -- Action to perform when stepping validation fails. Valid values \(aqFAIL\(aq, \(aqSKIP\(aq, or \(aqNOPARMS\(aq. (default \(aqFAIL\(aq)
Factory
o factory (str) allnodesforlabel -- Trigger a build on all nodes having specific label. Requires NodeLabel Parameter Plugin (optional)
o name (str) -- Name of the parameter to set (optional)
o node-label (str) -- Label of the nodes where build should be triggered
o ignore-offline-nodes (bool) -- Don\(aqt trigger build on offline nodes (default true)
Factory
o factory (str) allonlinenodes -- Trigger a build on every online node. Requires NodeLabel Parameter Plugin (optional)
Examples:
Basic usage with yaml list of projects.
builders:
  - trigger-builds:
    - project:
        - "foo"
        - "bar"
        - "baz"
      current-parameters: true

Basic usage with passing svn revision through.
builders:
  - trigger-builds:
    - project: "build_started"
      predefined-parameters:
        FOO="bar"
      current-parameters: true
      svn-revision: true
      block: true

Basic usage with passing git revision through.
builders:
  - trigger-builds:
    - project: "build_started"
      predefined-parameters:
        FOO="bar"
      current-parameters: true
      node-label-name: NODE
      node-label: testnodes
      git-revision: true
      block: true

Example with all supported parameter factories.
builders:
  - trigger-builds:
    - project: "build_started"
      predefined-parameters:
        FOO="bar"
      current-parameters: true
      svn-revision: true
      parameter-factories:
        - factory: filebuild
          file-pattern: propfile*.txt
        - factory: binaryfile
          parameter-name: filename
          file-pattern: otherpropfile*.txt
        - factory: counterbuild
          from: 0
          to: 5
          step: 1
        - factory: allnodesforlabel
          name: parametername
          node-label: labelname
          ignore-offline-nodes: false
        - factory: allonlinenodes
      block: true

trigger-remote
Trigger build of job on remote Jenkins instance.
Parameterized Remote Trigger Plugin
Please note that this plugin requires system configuration on the Jenkins Master that is unavailable from individual job views; specifically, one must add remote jenkins servers whose \(aqDisplay Name\(aq field are what make up valid fields on the remote-jenkins-name attribute below.
Parameters
o remote-jenkins-name (str) -- the remote Jenkins server (required)
o job (str) -- the Jenkins project to trigger on the remote Jenkins server (required)
o should-not-fail-build (bool) -- if true, remote job failure will not lead current job to fail (default false)
o prevent-remote-build-queue (bool) -- if true, wait to trigger remote builds until no other builds (default false)
o block (bool) -- whether to wait for the trigger jobs to finish or not (default true)
o poll-interval (str) -- polling interval in seconds for checking statues of triggered remote job, only necessary if current job is configured to block (default 10)
o connection-retry-limit (str) -- number of connection attempts to remote Jenkins server before giving up. (default 5)
o enhanced-logging (bool) -- if this option is enabled, the console output of the remote job is also logged. (default false)
o predefined-parameters (str) -- predefined parameters to send to the remote job when triggering it (optional)
o property-file (str) -- file in workspace of current job containing additional parameters to be set on remote job (optional)
Example:
builders:
  - trigger-remote:
      remote-jenkins-name: "http://example.jenkinsmaster.lan"
      token: "BLAH"
      job: "build-things"
      should-fail-build: True
      prevent-remote-build-queue: True
      poll-interval: 5
      connection-retry-limit: 5
      block: true
      enhanced-logging: True
      property-file: \(aq.props\(aq
      predefined-parameters: |
        FOO="bar"
        herp="derp"

xcode This step allows you to execute an xcode build step. Requires the Jenkins Xcode Plugin.
Parameters
o developer-profile (str) -- the jenkins credential id for a ios developer profile. (optional)
o clean-build (bool) -- if true will delete the build directories before invoking the build. (default false)
o clean-test-reports (bool) -- UNKNOWN. (default false)
o archive (bool) -- if true will generate an xcarchive of the specified scheme. A workspace and scheme are are also needed for archives. (default false)
o configuration (str) -- This is the name of the configuration as defined in the Xcode project. (default \(aqRelease\(aq)
o configuration-directory (str) -- The value to use for CONFIGURATION_BUILD_DIR setting. (default \(aq\(aq)
o target (str) -- Leave empty for all targets. (default \(aq\(aq)
o sdk (str) -- Leave empty for default SDK. (default \(aq\(aq)
o symroot (str) -- Leave empty for default SYMROOT. (default \(aq\(aq)
o project-path (str) -- Relative path within the workspace that contains the xcode project file(s). (default \(aq\(aq)
o project-file (str) -- Only needed if there is more than one project file in the Xcode Project Directory. (default \(aq\(aq)
o build-arguments (str) -- Extra commandline arguments provided to the xcode builder. (default \(aq\(aq)
o schema (str) -- Only needed if you want to compile for a specific schema instead of a target. (default \(aq\(aq)
o workspace (str) -- Only needed if you want to compile a workspace instead of a project. (default \(aq\(aq)
o profile (str) -- The relative path to the mobileprovision to embed, leave blank for no embedded profile. (default \(aq\(aq)
o codesign-id (str) -- Override the code signing identity specified in the project. (default \(aq\(aq)
o allow-failing (bool) -- if true will prevent this build step from failing if xcodebuild exits with a non-zero return code. (default false)
o version-technical (str) -- The value to use for CFBundleVersion. Leave blank to use project\(aqs technical number. (default \(aq\(aq)
o version-marketing (str) -- The value to use for CFBundleShortVersionString. Leave blank to use project\(aqs marketing number. (default \(aq\(aq)
o ipa-export-method (str) -- The export method of the .app to generate the .ipa file. Should be one in \(aqdevelopment\(aq, \(aqad-hoc\(aq, \(aqenterprise\(aq, or \(aqapp-store\(aq. (default \(aq\(aq)
o ipa-version (str) -- A pattern for the ipa file name. You may use ${VERSION} and ${BUILD_DATE} (yyyy.MM.dd) in this string. (default \(aq\(aq)
o ipa-output (str) -- The output directory for the .ipa file, relative to the build directory. (default \(aq\(aq)
o compile-bitcode (bool) -- recompile from Bitcode when exporting the application to IPA. (default true)
o upload-bitcode (bool) -- include Bitcode when exporting applications to IPA. (default true)
o upload-symbols (bool) -- include symbols when exporting applications to IPA. (default true)
o development-team-id -- The ID of the Apple development team to use to sign the IPA (default \(aq\(aq)
o keychain-name (str) -- The globally configured keychain to unlock for this build. (default \(aq\(aq)
o keychain-path (str) -- The path of the keychain to use to sign the IPA. (default \(aq\(aq)
o keychain-password (str) -- The password to use to unlock the keychain. (default \(aq\(aq)
o keychain-unlock (str) -- Unlocks the keychain during use. (default false)
o bundle-id (str) -- The bundle identifier (App ID) for this provisioning profile (default \(aq\(aq)
o provisioning-profile-uuid (str) -- The UUID of the provisioning profile associated to this bundle identifier. (default \(aq\(aq)
Example:
builders:
  - xcode
  - xcode:
      developer-profile: "849b07cd-ac61-4588-89c8-b6606ee84946"
      clean-build: true
      clean-test-reports: true
      configuration: Distribution
      target: TARGET
      sdk: iphonesimulator
      build-arguments: "test ONLY_ACTIVE_ARCH=NO -destination \(aqplatform=iOS Simulator,name=iPhone 6\(aq -derivedDataPath ."
      schema: "UASDKInternal"
      workspace: "UA"
      profile: "PROFILE"
      codesign-id: "iPhone Distribution: MapMyFitness Inc."
      allow-failing: true
      version-technical: "TECHNICAL"
      version-marketing: "MARKETING"
      ipa-export-method: ad-hoc
      ipa-version: "${VERSION}"
      ipa-output: "/output"
      compile-bitcode: false
      upload-bitcode: false
      upload-symbols: false
      development-team-id: foo
      keychain-path: "/Users/jenkins/Library/Keychains/jenkins-uasdk-ios-pre_review"
      keychain-password: "testpass"
      keychain-unlock: true
      provisioning-profiles:
        - bundle-id: foo
          provisioning-profile-uuid: bar
        - bundle-id: foo2
          provisioning-profile-uuid: bar2

xunit Process tests results. Requires the Jenkins xUnit Plugin.
Parameters
o thresholdmode (str) -- Whether thresholds represents an absolute number of tests or a percentage. Either \(aqnumber\(aq or \(aqpercent\(aq. (default \(aqnumber\(aq)
o thresholds (list) --
Thresholds for both \(aqfailed\(aq and \(aqskipped\(aq 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:
o unstable (int)
o unstablenew (int)
o failure (int)
o failurenew (int)
o 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)
o types (list) --
Frameworks to configure, and options. Supports the following: aunit, boosttest, checktype, cpptest, cppunit, ctest, dotnettest, embunit, fpcunit, gtest, junit, mstest, nunit, phpunit, tusar, unittest, and valgrind.
The \(aqcustom\(aq type is not supported.
type (dict)
each type can be configured using the following:
o pattern (str): An Ant pattern to look for Junit result files, relative to the workspace root (default \(aq\(aq)
o requireupdate (bool): fail the build whenever fresh tests results have not been found (default true).
o deleteoutput (bool): delete temporary JUnit files (default true).
o skip-if-no-test-files (bool): Skip parsing this xUnit type report if there are no test reports files (default false).
o stoponerror (bool): Fail the build whenever an error occur during a result file processing (default true).
Minimal Example:
builders:
  - xunit:
      types:
        - junit:
            pattern: "junit.xml"

Full Example:
builders:
  - xunit:
      thresholdmode: \(aqpercent\(aq
      thresholds:
          - failed:
                unstable: 0
                unstablenew: 0
                failure: 0
                failurenew: 0
          - skipped:
                unstable: 0
                unstablenew: 0
                failure: 0
                failurenew: 0
      test-time-margin: 5000
      types:
          - phpunit:
              pattern: "phpunit.log"
              requireupdate: true
              deleteoutput: true
              skip-if-no-test-files: false
              stoponerror: true
          - cppunit:
              pattern: "cppunit.log"
              requireupdate: false
              deleteoutput: false
              skip-if-no-test-files: true
              stoponerror: false
          - gtest:
              pattern: "gtest.log"

Hipchat

Enable HipChat notifications of build execution.
Supports hipchat plugin versions < 1.9. Will automatically redirect to the publishers module for newer versions, but still recommended that you convert to the newer module.
Parameters
o enabled (bool): general cut off switch. If not explicitly set to true, no hipchat parameters are written to XML. For Jenkins HipChat plugin of version prior to 0.1.5, also enables all build results to be reported in HipChat room. For later plugin versions, explicit notify-* setting is required (see below).
o room (str): name of HipChat room to post messages to (default \(aq\(aq)
Deprecated since version 1.2.0: Please use \(aqrooms\(aq.
o rooms (list): list of HipChat rooms to post messages to (default empty)
o start-notify (bool): post messages about build start event
Deprecated since version 1.2.0: use notify-start parameter instead
o notify-start (bool): post messages about build start event (default false)
o notify-success (bool): post messages about successful build event (Jenkins HipChat plugin >= 0.1.5) (default false)
o notify-aborted (bool): post messages about aborted build event (Jenkins HipChat plugin >= 0.1.5) (default false)
o notify-not-built (bool): post messages about build set to NOT_BUILT status (Jenkins HipChat plugin >= 0.1.5). This status code is used in a multi-stage build (like maven2) where a problem in earlier stage prevented later stages from building. (default false)
o notify-unstable (bool): post messages about unstable build event (Jenkins HipChat plugin >= 0.1.5) (default false)
o notify-failure (bool): post messages about build failure event (Jenkins HipChat plugin >= 0.1.5) (default false)
o notify-back-to-normal (bool): post messages about build being back to normal after being unstable or failed (Jenkins HipChat plugin >= 0.1.5) (default false)
Example:
hipchat:
  enabled: true
  rooms:
      - My Room
      - Your Room
  notify-start: true
  notify-success: true
  notify-aborted: true
  notify-not-built: true
  notify-unstable: true
  notify-failure: true
  notify-back-to-normal: true

class hipchat_notif.HipChat(registry)
gen_xml(xml_parent, data)
Update the XML element tree based on YAML data. Override this method to add elements to the XML output. Create new Element objects and add them to the xml_parent. The YAML data structure must not be modified.
Parameters
o parser (YAMLParser) -- the global YAML Parser
o xml_parent (Element) -- the parent XML element
o data (dict) -- the YAML data structure

Metadata

The Metadata plugin module enables the ability to add metadata to the projects that can be exposed to job environment. Requires the Jenkins Metadata Plugin.
Component: metadata
Macro metadata
Entry Point
jenkins_jobs.metadata
Example:
metadata:
  - string:
      name: FOO
      value: bar
      expose-to-env: true
class metadata.Metadata(registry)
gen_xml(xml_parent, data)
Update the XML element tree based on YAML data. Override this method to add elements to the XML output. Create new Element objects and add them to the xml_parent. The YAML data structure must not be modified.
Parameters
o parser (YAMLParser) -- the global YAML Parser
o xml_parent (Element) -- the parent XML element
o data (dict) -- the YAML data structure
date A date metadata
Parameters
o name (str) -- the name of the metadata
o time (str) -- time value in millisec since 1970-01-01 00:00:00 UTC
o timezone (str) -- time zone of the metadata
o expose-to-env (bool) -- expose to environment (optional)
Example:
metadata:
  - date:
      name: FOO
      value: 1371708900268
      timezone: Australia/Melbourne
      expose-to-env: true
number A number metadata.
Parameters
o name (str) -- the name of the metadata
o value (str) -- the value of the metadata
o expose-to-env (bool) -- expose to environment (optional)
Example:
metadata:
  - number:
      name: FOO
      value: 1
      expose-to-env: true
string A string metadata.
Parameters
o name (str) -- the name of the metadata
o value (str) -- the value of the metadata
o expose-to-env (bool) -- expose to environment (optional)
Example:
metadata:
  - string:
      name: FOO
      value: bar
      expose-to-env: true

Notifications

The Notifications module allows you to configure Jenkins to notify other applications about various build phases. It requires the Jenkins notification plugin.
Component: notifications
Macro notification
Entry Point
jenkins_jobs.notifications
class notifications.Notifications(registry)
gen_xml(xml_parent, data)
Update the XML element tree based on YAML data. Override this method to add elements to the XML output. Create new Element objects and add them to the xml_parent. The YAML data structure must not be modified.
Parameters
o parser (YAMLParser) -- the global YAML Parser
o xml_parent (Element) -- the parent XML element
o data (dict) -- the YAML data structure
http Defines an HTTP notification endpoint. Requires the Jenkins Notification Plugin.
Parameters
o format (str) -- notification payload format, JSON (default) or XML
o event (str) -- job events that trigger notifications: started, completed, finalized or all (default)
o url (str) -- URL of the endpoint
o timeout (str) -- Timeout in milliseconds for sending notification request (30 seconds by default)
o log (str) -- Number lines of log messages to send (0 by default). Use -1 for all (use with caution).
Example:
notifications:
  - http:
      url: http://example.com/jenkins_endpoint
      format: xml
      event: completed
      timeout: 40000
      log: -1

Parameters

The Parameters module allows you to specify build parameters for a job.
Component: parameters
Macro parameter
Entry Point
jenkins_jobs.parameters
Example:
job:
  name: test_job

parameters: - string: name: FOO default: bar description: "A parameter named FOO, defaults to \(aqbar\(aq."
class parameters.Parameters(registry)
gen_xml(xml_parent, data)
Update the XML element tree based on YAML data. Override this method to add elements to the XML output. Create new Element objects and add them to the xml_parent. The YAML data structure must not be modified.
Parameters
o parser (YAMLParser) -- the global YAML Parser
o xml_parent (Element) -- the parent XML element
o data (dict) -- the YAML data structure
bool A boolean parameter.
Parameters
o name (str) -- the name of the parameter
o default (str) -- the default value of the parameter (optional)
o description (str) -- a description of the parameter (optional)
Example:
parameters:
  - bool:
      name: FOO
      default: false
      description: "A parameter named FOO, defaults to \(aqfalse\(aq."
choice A single selection parameter.
Parameters
o name (str) -- the name of the parameter
o choices (list) -- the available choices, first one is the default one.
o description (str) -- a description of the parameter (optional)
Example:
parameters:
  - choice:
      name: project
      choices:
        - nova
        - glance
      description: "On which project to run?"
copyartifact-build-selector
Control via a build parameter, which build the copyartifact plugin should copy when it is configured to use \(aqbuild-param\(aq. Requires the Jenkins Copy Artifact plugin.
Parameters
o name (str) -- name of the build parameter to store the selection in
o description (str) -- a description of the parameter (optional)
o which-build (str) -- which to provide as the default value in the UI. See which-build param of copyartifact from the builders module for the available values as well as options available that control additional behaviour for the selected value.
Example:
parameters:
  - copyartifact-build-selector:
      name: BUILD_SELECTOR
      which-build: workspace-latest
      description: \(aqWhich build from upstream to copy artifacts from\(aq

credentials
A credentials selection parameter. Requires the Jenkins Credentials Plugin.
Parameters
o name (str) -- the name of the parameter
o type (str) --
credential type (optional, default \(aqany\(aq)
Allowed Values
o any Any credential type (default)
o usernamepassword Username with password
o sshkey SSH Username with private key
o secretfile Secret file
o secrettext Secret text
o certificate Certificate
o required (bool) -- whether this parameter is required (optional, default false)
o default (string) -- default credentials ID (optional)
o description (str) -- a description of the parameter (optional)
Example:
parameters:
  - credentials:
      name: OS_CREDENTIALS
      type: usernamepassword
      default: "default-credentials-id"
      description: "Test credentials"

dynamic-choice
Dynamic Choice Parameter Requires the Jenkins Jenkins Dynamic Parameter Plug-in.
Parameters
o name (str) -- the name of the parameter
o description (str) -- a description of the parameter (optional)
o script (str) -- Groovy expression which generates the potential choices.
o remote (bool) -- the script will be executed on the slave where the build is started (default false)
o classpath (str) -- class path for script (optional)
o read-only (bool) -- user can\(aqt modify parameter once populated (default false)
Example:
parameters:
  - dynamic-choice:
      name: OPTIONS
      description: "Available options"
      script: "[\(aqoptionA\(aq, \(aqoptionB\(aq]"
      remote: false
      read-only: false
dynamic-choice-scriptler
Dynamic Choice Parameter (Scriptler) Requires the Jenkins Jenkins Dynamic Parameter Plug-in.
Parameters
o name (str) -- the name of the parameter
o description (str) -- a description of the parameter (optional)
o script-id (str) -- Groovy script which generates the default value
o parameters (list) --
parameters to corresponding script
Parameter
o name (str) Parameter name
o value (str) Parameter value
o remote (bool) -- the script will be executed on the slave where the build is started (default false)
o read-only (bool) -- user can\(aqt modify parameter once populated (default false)
Example:
parameters:
  - dynamic-choice-scriptler:
      name: OPTIONS
      description: "Available options"
      script-id: "scriptid.groovy"
      parameters:
        - name: param1
          value: value1
        - name: param2
          value: value2
      remote: false
      read-only: false
dynamic-string
Dynamic Parameter Requires the Jenkins Jenkins Dynamic Parameter Plug-in.
Parameters
o name (str) -- the name of the parameter
o description (str) -- a description of the parameter (optional)
o script (str) -- Groovy expression which generates the potential choices
o remote (bool) -- the script will be executed on the slave where the build is started (default false)
o classpath (str) -- class path for script (optional)
o read-only (bool) -- user can\(aqt modify parameter once populated (default false)
Example:
parameters:
  - dynamic-string:
      name: FOO
      description: "A parameter named FOO, defaults to \(aqbar\(aq."
      script: "bar"
      remote: false
      read-only: false
dynamic-string-scriptler
Dynamic Parameter (Scriptler) Requires the Jenkins Jenkins Dynamic Parameter Plug-in.
Parameters
o name (str) -- the name of the parameter
o description (str) -- a description of the parameter (optional)
o script-id (str) -- Groovy script which generates the default value
o parameters (list) --
parameters to corresponding script
Parameter
o name (str) Parameter name
o value (str) Parameter value
o remote (bool) -- the script will be executed on the slave where the build is started (default false)
o read-only (bool) -- user can\(aqt modify parameter once populated (default false)
Example:
parameters:
  - dynamic-string-scriptler:
      name: FOO
      description: "A parameter named FOO, defaults to \(aqbar\(aq."
      script-id: "scriptid.groovy"
      parameters:
        - name: param1
          value: value1
        - name: param2
          value: value2
      remote: false
      read-only: false
extended-choice
Creates an extended choice parameter where values can be read from a file Requires the Jenkins Extended Choice Parameter Plugin.
Parameters
o name (str) -- name of the parameter
o description (str) -- description of the parameter (optional, default \(aq\(aq)
o property-file (str) -- location of property file to read from (optional, default \(aq\(aq)
o property-key (str) -- key for the property-file (optional, default \(aq\(aq)
o quote-value (bool) -- whether to put quotes around the property when passing to Jenkins (optional, default false)
o visible-items (str) -- number of items to show in the list (optional, default 5)
o type (str) -- type of select, can be single-select, multi-select, radio, checkbox or textbox (optional, default single-select)
o value (str) -- comma separated list of values for the single select or multi-select box (optional, default \(aq\(aq)
o default-value (str) -- used to set the initial selection of the single-select or multi-select box (optional, default \(aq\(aq)
o value-description (str) -- comma separated list of value descriptions for the single select or multi-select box (optional, default \(aq\(aq)
o default-property-file (str) -- location of property file when default value needs to come from a property file (optional, default \(aq\(aq)
o default-property-key (str) -- key for the default property file (optional, default \(aq\(aq)
o description-property-file (str) -- location of property file when value description needs to come from a property file (optional, default \(aq\(aq)
o description-property-key (str) -- key for the value description property file (optional, default \(aq\(aq)
o multi-select-delimiter (str) -- value between selections when the parameter is a multi-select (optional, default \(aq,\(aq)
o groovy-script (str) -- the groovy script contents (optional, default \(aq,\(aq)
o groovy-script-file (str) -- location of groovy script file to generate parameters (optional, default \(aq\(aq)
o bindings (str) -- variable bindings for the groovy script (optional, default \(aq\(aq)
o classpath (str) -- the classpath for the groovy script (optional, default \(aq,\(aq)
o default-groovy-script (str) -- the default groovy script contents (optional, default \(aq\(aq)
o default-groovy-classpath (str) -- the default classpath for the groovy script (optional, default \(aq\(aq)
o description-groovy-script (str) -- location of groovy script when value description needs to come from a groovy script (optional, default \(aq\(aq)
o description-groovy-classpath (str) -- classpath for the value description groovy script (optional, default \(aq\(aq)
Minimal Example:
parameters:
  - extended-choice:
      name: OPTIONS
      description: "Available options"
      type: \(aqPT_CHECKBOX\(aq
      value: OptionA,OptionB,OptionC

Full Example:
parameters:
  - extended-choice:
      name: OPTIONS
      description: "Available options"
      property-file: /home/foo/property.prop
      property-key: key
      quote-value: true
      type: multi-select
      value: "foo|bar|select"
      visible-items: 2
      multi-select-delimiter: \(aq|\(aq
      default-value: foo
      default-property-file: /home/property.prop
      default-property-key: fookey
  - extended-choice:
      name: OPTIONS_CHECKBOX
      type: checkbox
      value: !join:
        - \(aq,\(aq
        -
            - OptionA
            - OptionB
            - OptionC
      visible-items: 2
  - extended-choice:
      name: MULTISELECTOPTIONS
      description: "Available options"
      property-key: key
      quote-value: true
      type: multi-select
      value: !join:
        - \(aq|\(aq
        -
            - foo
            - bar
            - select
      visible-items: 2
      multi-select-delimiter: \(aq|\(aq
      default-value: foo

file A file parameter.
Parameters
o name (str) -- the target location for the file upload
o description (str) -- a description of the parameter (optional)
Example:
parameters:
  - file:
      name: test.txt
      description: "Upload test.txt."
git-parameter
This parameter allows you to select a git tag, branch or revision number as parameter in Parametrized builds. Requires the Jenkins Git Parameter Plugin.
Parameters
o name (str) -- Name of the parameter
o description (str) -- Description of the parameter (default \(aq\(aq)
o type (str) --
The type of the list of parameters (default \(aqPT_TAG\(aq)
Allowed Values
o
PT_TAG list of all commit tags in repository -
returns Tag Name
o
PT_BRANCH list of all branches in repository -
returns Branch Name
o
PT_BRANCH_TAG list of all commit tags and all
branches in repository - returns Tag Name or Branch Name
o
PT_REVISION list of all revision sha1 in repository
followed by its author and date - returns Tag SHA1
o PT_PULL_REQUEST
o branch (str) -- Name of branch to look in. Used only if listing revisions. (default \(aq\(aq)
o branchFilter (str) -- Regex used to filter displayed branches. If blank, the filter will default to ".*". Remote branches will be listed with the remote name first. E.g., "origin/master" (default \(aq.*\(aq)
o tagFilter (str) -- Regex used to filter displayed branches. If blank, the filter will default to ".*". Remote branches will be listed with the remote name first. E.g., "origin/master" (default \(aq*\(aq)
o sortMode (str) --
Mode of sorting. (default \(aqNONE\(aq)
Allowed Values
o NONE
o DESCENDING
o ASCENDING
o ASCENDING_SMART
o DESCENDING_SMART
o defaultValue (str) -- This value is returned when list is empty. (default \(aq\(aq)
o selectedValue (str) --
Which value is selected, after loaded parameters. If you choose \(aqdefault\(aq, but default value is not present on the list, nothing is selected. (default \(aqNONE\(aq)
Allowed Values
o NONE
o TOP
o DEFAULT
o useRepository (str) -- If in the task is defined multiple repositories parameter specifies which the repository is taken into account. If the parameter is not defined, is taken first defined repository. The parameter is a regular expression which is compared with a URL repository. (default \(aq\(aq)
o quickFilterEnabled (bool) -- When this option is enabled will show a text field. Parameter is filtered on the fly. (default false)
Minimal Example:
parameters:
  - git-parameter:
      name: Foo

Full Example:
parameters:
  - git-parameter:
      name: Foo
      description: Lorem ipsum dolor sit amet.
      type: PT_BRANCH_TAG
      branch: baz
      tagFilter: bam
      branchFilter: boo
      sortMode: ASCENDING
      defaultValue: bor
      selectedValue: TOP
      useRepository: buh
      quickFilterEnabled: true

hidden Allows you to use parameters hidden from the build with parameter page. Requires the Jenkins Hidden Parameter Plugin.
Parameters
o name (str) -- the name of the parameter
o default (str) -- the default value of the parameter (optional)
o description (str) -- a description of the parameter (optional)
Example:
parameters:
  - hidden:
      name: FOO
      default: bar
      description: A parameter named FOO, defaults to \(aqbar\(aq

label A node label parameter.
Parameters
o name (str) -- the name of the parameter
o default (str) -- the default value of the parameter (optional)
o description (str) -- a description of the parameter (optional)
o all-nodes (bool) -- to run job on all nodes matching label in parallel (default: false)
o matching-label (str) -- to run all nodes matching label \(aqsuccess\(aq, \(aqunstable\(aq or \(aqallCases\(aq (optional)
o node-eligibility (str) -- all nodes, ignore temporary nodes or ignore temporary offline nodes (optional, default all nodes)
Example:
parameters:
  - label:
      name: EXAMPLE LABEL 1
      description: "EXAMPLE LABEL DESCRIPTION 1"
      matching-label: "success"
      node-eligibility: "all"

matrix-combinations
Matrix combinations parameter Requires the Jenkins Matrix Combinations Plugin.
Parameters
o name (str) -- the name of the parameter
o description (str) -- a description of the parameter (optional)
o filter (str) -- Groovy expression to use filter the combination by default (optional)
Example:
parameters:
  - matrix-combinations:
      name: FOO
      description: "Select matrix combinations"
      filter: "platform == foo"

maven-metadata
This parameter allows the resolution of maven artifact versions by contacting the repository and reading the maven-metadata.xml. Requires the Jenkins Maven Metadata Plugin.
Parameters
o name (str) -- Name of the parameter
o description (str) -- Description of the parameter (optional)
o repository-base-url (str) -- URL from where you retrieve your artifacts (default \(aq\(aq)
o repository-username (str) -- Repository\(aqs username if authentication is required. (default \(aq\(aq)
o repository-password (str) -- Repository\(aqs password if authentication is required. (default \(aq\(aq)
o artifact-group-id (str) -- Unique project identifier (default \(aq\(aq)
o artifact-id (str) -- Name of the artifact without version (default \(aq\(aq)
o packaging (str) -- Artifact packaging option. Could be something such as jar, zip, pom.... (default \(aq\(aq)
o versions-filter (str) -- Specify a regular expression which will be used to filter the versions which are actually displayed when triggering a new build. (default \(aq\(aq)
o default-value (str) -- For features such as SVN polling a default value is required. If job will only be started manually, this field is not necessary. (default \(aq\(aq)
o maximum-versions-to-display (str) -- The maximum number of versions to display in the drop-down. Any non-number value as well as 0 or negative values will default to all. (default 10)
o sorting-order (str) -- ascending or descending (default descending)
Example:
parameters:
  - maven-metadata:
      name: \(aqmaven metadata param\(aq
      repository-base-url: \(aqhttp://nexus.example.com\(aq
      repository-username: \(aqusername\(aq
      repository-password: \(aqpassword\(aq
      artifact-group-id: \(aqcom.example\(aq
      artifact-id: \(aqexample\(aq
      packaging: \(aqjar\(aq
      versions-filter: \(aq[0-9]+\(aq
      default-value: \(aqFIRST\(aq
      maximum-versions-to-display: "5"
      sorting-order: "Ascending"

node Defines a list of nodes where this job could potentially be executed on. Restrict where this project can be run, If your using a node or label parameter to run your job on a particular node, you should not use the option "Restrict where this project can be run" in the job configuration - it will not have any effect to the selection of your node anymore!
Parameters
o name (str) -- the name of the parameter
o description (str) -- a description of the parameter (optional)
o default-slaves (list) -- The nodes used when job gets triggered by anything else other than manually
o allowed-slaves (list) -- The nodes available for selection when job gets triggered manually. Empty means \(aqAll\(aq.
o ignore-offline-nodes (bool) -- Ignore nodes not online or not having executors (default false)
o allowed-multiselect (bool) -- Allow multi node selection for concurrent builds - this option only makes sense (and must be selected!) in case the job is configured with: "Execute concurrent builds if necessary". With this configuration the build will be executed on all the selected nodes in parallel. (default false)
Example:
parameters:
  - node:
      name: SLAVE_NAME
      description: "Select slave"
      allowed-slaves:
        - slave001
        - slave002
        - slave003
      ignore-offline-nodes: true
      allowed-multiselect: true

password
A password parameter.
Parameters
o name (str) -- the name of the parameter
o default (str) -- the default value of the parameter (optional)
o description (str) -- a description of the parameter (optional)
Example:
parameters:
  - password:
      name: FOO
      default: 1HSC0Ts6E161FysGf+e1xasgsHkgleLh09JUTYnipPvw=
      description: "A parameter named FOO."
promoted build
A promoted build parameter. Requires the Jenkins Promoted Builds Plugin.
Parameters
o name (str) -- the name of the parameter (required)
o project-name (str) -- the job from which the user can pick runs (required)
o promotion-name (str) -- promotion process to choose from (optional)
o description (str) -- a description of the parameter (optional)
Example:
parameters:
  - promoted:
      name: FOO
      project-name: "foo-build"
      promotion-name: "passed-promotion"
      description: "Select a foo-build for promotion"

random-string
This parameter generates a random string and passes it to the build, preventing Jenkins from combining queued builds. Requires the Jenkins Random String Parameter Plugin.
Parameters
o name (str) -- Name of the parameter
o description (str) -- Description of the parameter (default \(aq\(aq)
o failed-validation-message (str) -- Failure message to display for invalid input (default \(aq\(aq)
Example:
parameters:
  - random-string:
      name: job-string
      description: "A random string passed to the job"
      failed-validation-message: "Your input string is invalid"

run A run parameter.
Parameters
o name (str) -- the name of the parameter
o project-name (str) -- the name of job from which the user can pick runs
o description (str) -- a description of the parameter (optional)
Example:
parameters:
  - run:
      name: FOO
      project-name: "foo-build"
      description: "Select a foo-build for promotion"

string A string parameter.
Parameters
o name (str) -- the name of the parameter
o default (str) -- the default value of the parameter (optional)
o description (str) -- a description of the parameter (optional)
Example:
parameters:
  - string:
      name: FOO
      default: bar
      description: "A parameter named FOO, defaults to \(aqbar\(aq."
svn-tags A svn tag parameter Requires the Jenkins Parameterized Trigger Plugin.
Parameters
o name (str) -- the name of the parameter
o url (str) -- the url to list tags from
o credentials-id (str) -- Credentials ID to use for authentication (default \(aq\(aq)
o filter (str) -- the regular expression to filter tags (default \(aq\(aq)
o default (str) -- the default value of the parameter (default \(aq\(aq)
o description (str) -- a description of the parameter (default \(aq\(aq)
o max-tags (int) -- the number of tags to display (default \(aq100\(aq)
o sort-newest-first (bool) -- sort tags from newest to oldest (default true)
o sort-z-to-a (bool) -- sort tags in reverse alphabetical order (default false)
Example:
parameters:
  - svn-tags:
      name: BRANCH_NAME
      default: release
      description: A parameter named BRANCH_NAME default is release
      url: http://svn.example.com/repo
      filter: [A-za-z0-9]*
text A text parameter.
Parameters
o name (str) -- the name of the parameter
o default (str) -- the default value of the parameter (optional)
o description (str) -- a description of the parameter (optional)
Example:
parameters:
  - text:
      name: FOO
      default: bar
      description: "A parameter named FOO, defaults to \(aqbar\(aq."
validating-string
A validating string parameter Requires the Jenkins Validating String Plugin.
Parameters
o name (str) -- the name of the parameter
o default (str) -- the default value of the parameter (optional)
o description (str) -- a description of the parameter (optional)
o regex (str) -- a regular expression to validate the string
o msg (str) -- a message to display upon failed validation
Example:
parameters:
  - validating-string:
      name: FOO
      default: bar
      description: "A parameter named FOO, defaults to \(aqbar\(aq."
      regex: [A-Za-z]*
      msg: Your entered value failed validation

Properties

The Properties module supplies a wide range of options that are implemented as Jenkins job properties.
Component: properties
Macro property
Entry Point
jenkins_jobs.properties
Example:
job:
  name: test_job

properties: - github: url: https://github.com/openstack-infra/jenkins-job-builder/
class properties.Properties(registry)
gen_xml(xml_parent, data)
Update the XML element tree based on YAML data. Override this method to add elements to the XML output. Create new Element objects and add them to the xml_parent. The YAML data structure must not be modified.
Parameters
o parser (YAMLParser) -- the global YAML Parser
o xml_parent (Element) -- the parent XML element
o data (dict) -- the YAML data structure
authenticated-build
Specifies an authorization matrix where only authenticated users may trigger a build.
Deprecated since version 0.1.0.: Please use authorization.
Example:
properties:
  - authenticated-build

authorization
Specifies an authorization matrix
Parameters
<name> (list) -- .INDENT 7.0
<name> is the name of the group or user, containing
the list of rights to grant.
<name> rights
o credentials-create
o credentials-delete
o credentials-manage-domains
o credentials-update
o credentials-view
o job-build
o job-cancel
o job-configure
o job-delete
o job-discover
o job-extended-read
o job-move
o job-read
o job-status
o job-workspace
o ownership-jobs
o run-delete
o run-replay
o run-update
o scm-tag
Example:
properties:
    - authorization:
        admin:
            - credentials-create
            - credentials-delete
            - credentials-manage-domains
            - credentials-update
            - credentials-view
            - job-build
            - job-cancel
            - job-configure
            - job-delete
            - job-discover
            - job-move
            - job-read
            - job-status
            - job-workspace
            - ownership-jobs
            - run-delete
            - run-replay
            - run-update
            - scm-tag
        anonymous:
            - job-read
            - job-extended-read

batch-tasks
Batch tasks can be tasks for events like releases, integration, archiving, etc. In this way, anyone in the project team can execute them in a way that leaves a record.
A batch task consists of a shell script and a name. When you execute a build, the shell script gets run on the workspace, just like a build. Batch tasks and builds "lock" the workspace, so when one of those activities is in progress, all the others will block in the queue.
Requires the Jenkins Batch Task Plugin.
Parameters
batch-tasks (list) --
Batch tasks.
Tasks
o name (str) Task name.
o script (str) Task script.
Example:
properties:
  - batch-tasks:
      - name: release
        script: mvn -B release:prepare release:perform
      - name: say hello
        script: echo "Hello world"

branch-api
Enforces a minimum time between builds based on the desired maximum rate. Requires the Jenkins Branch API Plugin.
Parameters
o number-of-builds (int) -- The maximum number of builds allowed within the specified time period. (default 1)
o time-period (str) --
The time period within which the maximum number of builds will be enforced. (default \(aqHour\(aq)
valid values
Hour, Day, Week, Month, Year
o skip-rate-limit (bool) -- Permit user triggered builds to skip the rate limit (default false)
Minimal Example:
properties:
  - branch-api

Full example:
properties:
  - branch-api:
      time-period: Day
      number-of-builds: 5
      skip-rate-limit: true

build-blocker
This plugin keeps the actual job in the queue if at least one name of currently running jobs is matching with one of the given regular expressions.
Requires the Jenkins Build Blocker Plugin.
Parameters
o use-build-blocker (bool) -- Enable or disable build blocker (default true)
o blocking-jobs (list) -- One regular expression per line to select blocking jobs by their names (required)
o block-level (str) -- block build globally (\(aqGLOBAL\(aq) or per node (\(aqNODE\(aq) (default \(aqGLOBAL\(aq)
o queue-scanning (str) -- scan build queue for all builds (\(aqALL\(aq) or only buildable builds (\(aqBUILDABLE\(aq) (default \(aqDISABLED\(aq)
Example:
Minimal Example:
properties:
  - build-blocker:
      blocking-jobs:
        - ".*-deploy"

Full Example:
properties:
  - build-blocker:
      use-build-blocker: true
      blocking-jobs:
        - ".*-deploy"
        - "^maintenance.*"
      block-level: \(aqNODE\(aq
      queue-scanning: \(aqBUILDABLE\(aq

build-discarder
Parameters
o days-to-keep (int) -- Number of days to keep builds for (default -1)
o num-to-keep (int) -- Number of builds to keep (default -1)
o artifact-days-to-keep (int) -- Number of days to keep builds with artifacts (default -1)
o artifact-num-to-keep (int) -- Number of builds with artifacts to keep (default -1)
Example:
properties:
    - build-discarder:
        days-to-keep: 42
        num-to-keep: 43
        artifact-days-to-keep: 44
        artifact-num-to-keep: 45

properties:
    - build-discarder

builds-chain-fingerprinter
Builds chain fingerprinter. Requires the Jenkins Builds chain fingerprinter Plugin.
Parameters
o per-builds-chain (bool) -- enable builds hierarchy fingerprinting (default false)
o per-job-chain (bool) -- enable jobs hierarchy fingerprinting (default false)
Example:
properties:
  - builds-chain-fingerprinter:
      per-builds-chain: true
      per-job-chain: true

cachet-gating
The Cachet Gating Plugin provides a gating mechanism based on the availability of resources.
Requires the Jenkins: Cachet Gate Plugin.
Parameters
o required-resources (bool) -- Confirm availability of listed resources before building. Requires the list of resources to also be defined. (default true)
o resources (list) -- which resources to gate
Example:
properties:
      - cachet-gating:
          required-resources: true
          resources:
              - beaker
              - brew

copyartifact
Specify a list of projects that have access to copy the artifacts of this project.
Requires the Jenkins Copy Artifact plugin.
Parameters
projects (str) -- comma separated list of projects that can copy artifacts of this project. Wild card character \(aq*\(aq is available.
Example:
properties:
  - copyartifact:
      projects: foo*

delivery-pipeline
Requires the Jenkins Delivery Pipeline Plugin.
Parameters
o stage (str) -- Name of the stage for this job (default \(aq\(aq)
o task (str) -- Name of the task for this job (default \(aq\(aq)
o description (str) -- task description template for this job (default \(aq\(aq)
Minimal Example:
properties:
  - delivery-pipeline

Full Example:
properties:
  - delivery-pipeline:
      stage: Stage
      task: Task
      description: Task-Description

disable-resume
Do not allow the pipeline to resume if the master restarts Requires the Jenkins Pipeline Job Plugin.
Example:
properties:
  - disable-resume

disk-usage
Enables the Disk Usage Plugin. Requires the Jenkins Disk Usage Plugin.
Example:
properties:
  - disk-usage

docker-container
Requires the Jenkins: Docker Plugin.
Parameters
o docker-registry-url (str) -- URL of the Docker registry. (default \(aq\(aq)
o credentials-id (str) -- Credentials Id for the Docker registey. (default \(aq\(aq)
o commit-on-success (bool) -- When a job completes, the docker slave instance is committed with repository based on the job name and build number as tag. (default false)
o additional-tag (str) -- Additional tag to apply to the docker slave instance when committing it. (default \(aq\(aq)
o push-on-success (bool) -- Also push the resulting image when committing the docker slave instance. (default false)
o clean-local-images (bool) -- Clean images from the local daemon after building. (default true)
Minimal Example:
properties:
  - docker-container

Full Example:
properties:
  - docker-container:
      commit-on-success: true
      additional-tag: latest
      push-on-success: true
      clean-local-images: true
      docker-registry-url: https://index.docker.io/v1/
      credentials-id: 71e4f29c-162b-40d0-85d9-3ddfba2911a0

gitbucket
Integrate GitBucket to Jenkins. Requires the Jenkins GitBucket Plugin.
Parameters
o url (str) -- GitBucket URL to issue (required)
o link-enabled (bool) -- Enable hyperlink to issue (default false)
Minimal Example:
properties:
  - gitbucket:
      url: https://foo.com

Full Example:
properties:
  - gitbucket:
      url: https://foo.com
      link-enabled: true

github Sets the GitHub URL for the project.
Parameters
o url (str) -- the GitHub URL (required)
o display-name (str) -- This value will be used as context name for commit status if status builder or status publisher is defined for this project. (>= 1.14.1) (default \(aq\(aq)
Minimal Example:
properties:
  - github:
      url: https://github.com/openstack-infra/jenkins-job-builder/

Full Example:
properties:
  - github:
      url: https://github.com/openstack-infra/jenkins-job-builder/
      display-name: foo

gitlab Sets the GitLab connection for the project. Configured via Jenkins Global Configuration. Requires the Jenkins GitLab Plugin.
Parameters
connection (str) -- the GitLab connection name (required)
Example:
properties:
  - gitlab:
      connection: gitlab-connection

gitlab-logo
Configures the GitLab-Logo Plugin. Requires the Jenkins GitLab Logo Plugin.
Parameters
repository-name (str) -- the GitLab repository name (required)
Example:
properties:
  - gitlab-logo:
      repository-name: gitlab-repository-name

groovy-label
This plugin allows you to use Groovy script to restrict where this project can be run.
Requires the Jenkins Groovy Label Assignment Plugin.
Return value from Groovy script is treated as Label Expression. It is treated as followings:
o A non-string value will be converted to a string using toString()
o When null or blank string is returned, node restriction does not take effect (or is not overwritten).
o When exception occurred or Label Expression is not parsed correctly, builds are canceled.
Parameters
o script (str) -- Groovy script (default \(aq\(aq)
o sandbox (bool) -- Use Groovy Sandbox. (default false) If checked, run this Groovy script in a sandbox with limited abilities. If unchecked, and you are not a Jenkins administrator, you will need to wait for an administrator to approve the script
o classpath (list) -- Additional classpath entries accessible from the script, each of which should be an absolute local path or URL to a JAR file, according to "The file URI Scheme" (optional)
Minimal Example:
properties:
    - groovy-label

Full Example:
properties:
    - groovy-label:
        script: "$LABEL_NAME"
        sandbox: true
        classpath:
            - "file:/minimal/absolute/path/to/file.jar"
            - "file:///traditional/absolute/path/to/file.jar"
            - "http://example.org/path/to/file.jar"
            - "https://example.org/path/to/file.jar"

heavy-job
This plugin allows you to define "weight" on each job, and making each job consume that many executors
Requires the Jenkins Heavy Job Plugin.
Parameters
weight (int) -- Specify the total number of executors that this job should occupy (default 1)
Example:
properties:
  - heavy-job:
      weight: 2

inject Allows you to inject environment variables into the build. Requires the Jenkins Env Inject Plugin.
Parameters
o properties-file (str) -- file to read with properties (optional)
o properties-content (str) -- key=value properties (optional)
o script-file (str) -- file with script to run (optional)
o script-content (str) -- script to run (optional)
o groovy-content (str) -- groovy script to run (optional)
o groovy-sandbox (bool) -- run groovy script in sandbox (default false)
o load-from-master (bool) -- load files from master (default false)
o enabled (bool) -- injection enabled (default true)
o keep-system-variables (bool) -- keep system variables (default true)
o keep-build-variables (bool) -- keep build variable (default true)
o override-build-parameters (bool) -- override build parameters (default false)
Example:
properties:
  - inject:
      properties-content: |
        FOO=bar
        BAZ=foobar

least-load
Enables the Least Load Plugin. Requires the Jenkins Least Load Plugin.
Parameters
disabled (bool) -- whether or not leastload is disabled (default true)
Example:
properties:
  - least-load:
      disabled: False

lockable-resources
Requires the Jenkins Lockable Resources Plugin.
Parameters
o resources (str) -- List of required resources, space separated. (required, mutual exclusive with label)
o label (str) -- If you have created a pool of resources, i.e. a label, you can take it into use here. The build will select the resource(s) from the pool that includes all resources sharing the given label. (required, mutual exclusive with resources)
o var-name (str) -- Name for the Jenkins variable to store the reserved resources in. Leave empty to disable. (default \(aq\(aq)
o number (int) -- Number of resources to request, empty value or 0 means all. This is useful, if you have a pool of similar resources, from which you want one or more to be reserved. (default 0)
o match-script (str) -- Groovy script to reserve resource based on its properties. Leave empty to disable. (default None)
o groovy-sandbox (bool) -- Execute the provided match-script in Groovy sandbox. Leave empty to disable. (default False)
Example:
---
properties:
  - lockable-resources:
      resources: "the-resource"

---
properties:
  - lockable-resources:
      label: "pool-1"

---
properties:
  - lockable-resources:
      resources: "the-resource"
      var-name: "RESOURCE_NAME"
      number: 10

---
properties:
  - lockable-resources:
      match-script: "resourceName == MY_VAR"
      groovy-sandbox: true

ownership
Plugin provides explicit ownership for jobs and slave nodes. Requires the Jenkins Ownership Plugin.
Parameters
o enabled (bool) -- whether ownership enabled (default : true)
o owner (str) -- the owner of job
o co-owners (list) -- list of job co-owners
Example:
properties:
 - ownership:
    owner: foo
    co-owners:
     - bar
     - moo

priority-sorter
Allows simple ordering of builds, using a configurable job priority.
Requires the Jenkins Priority Sorter Plugin.
Parameters
priority (int) -- Priority of the job. Higher value means higher priority, with 3 as the default priority. (required)
Example:
properties:
  - priority-sorter:
      priority: 3

promoted-build
Marks a build for promotion. A promotion process with an identical name must be created via the web interface in the job in order for the job promotion to persist. Promotion processes themselves cannot be configured by jenkins-jobs due to the separate storage of plugin configuration files. Requires the Jenkins Promoted Builds Plugin.
Parameters
names (list) -- the promoted build names (optional)
Example:
properties:
  - promoted-build:
      names:
        - "Release to QA"
        - "Jane Must Approve"

rebuild
This plug-in allows the user to rebuild a parameterized build without entering the parameters again.It will also allow the user to edit the parameters before rebuilding. Requires the Jenkins Rebuild Plugin.
Parameters
o auto-rebuild (bool) -- Rebuild without asking for parameters (default false)
o rebuild-disabled (bool) -- Disable rebuilding for this job (default false)
Minimal Example:
properties:
    - rebuild

Full Example:
properties:
    - rebuild:
        auto-rebuild: true
        rebuild-disabled: true

sidebar
Allows you to add links in the sidebar. Requires the Jenkins Sidebar-Link Plugin.
Parameters
o url (str) -- url to link to (optional)
o text (str) -- text for the link (optional)
o icon (str) -- path to icon (optional)
Example:
properties:
   - sidebar:
       url: https://jenkins.debian.net/userContent/about.html
       text: About jenkins.debian.net
       icon: /userContent/images/debian-swirl-24x24.png
   - sidebar:
       url: https://jenkins.debian.net/view/reproducible
       text: reproducible builds jobs
       icon: /userContent/images/debian-jenkins-24x24.png

slack Requires the Jenkins Slack Plugin
When using Slack Plugin version < 2.0, Slack Plugin itself requires a publisher aswell as properties please note that you have to add the publisher to your job configuration aswell. When using Slack Plugin version >= 2.0, you should only configure the publisher.
Parameters
o notify-start (bool) -- Send notification when the job starts (default false)
o notify-success (bool) -- Send notification on success. (default false)
o notify-aborted (bool) -- Send notification when job is aborted. ( default false)
o notify-not-built (bool) -- Send notification when job set to NOT_BUILT status. (default false)
o notify-unstable (bool) -- Send notification when job becomes unstable. (default false)
o notify-failure (bool) -- Send notification when job fails. (default false)
o notify-back-to-normal (bool) -- Send notification when job is succeeding again after being unstable or failed. (default false)
o \(aqnotify-repeated-failure\(aq (bool) -- Send notification when job is still failing after last failure. (default false)
o include-test-summary (bool) -- Include the test summary. (default False)
o include-custom-message (bool) -- Include a custom message into the notification. (default false)
o custom-message (str) -- Custom message to be included. (default \(aq\(aq)
o room (str) -- A comma separated list of rooms / channels to send the notifications to. (default \(aq\(aq)
Example:
properties:
    - slack:
        room: dummy, dummy2
        notify-start: true
        notify-success: true

slave-prerequisites
This plugin allows you to check prerequisites on slave before a job can run a build on it
Requires the Jenkins Slave Prerequisites Plugin.
Parameters
o script (str) -- A script to be executed on slave node. If returning non 0 status, the node will be vetoed from hosting the build. (required)
o interpreter (str) -- Command line interpreter to be used for executing the prerequisite script - either shell for Unix shell or cmd for Windows batch script. (default shell)
Example:
properties:
  - slave-prerequisites:
      script: |
        #!/bin/bash
        AVAILABLE=$(df -BG --output=avail / | tail -1)
        test ${AVAILABLE%G} -ge 10

properties:
  - slave-prerequisites:
      interpreter: cmd
      script: |
        @echo off
        if exist C:\Jenkins\workspace.lock exit /b 1

slave-utilization
This plugin allows you to specify the percentage of a slave\(aqs capacity a job wants to use.
Requires the Jenkins Slave Utilization Plugin.
Parameters
o slave-percentage (int) -- Specify the percentage of a slave\(aqs execution slots that this job should occupy (default 0)
o single-instance-per-slave (bool) -- Control whether concurrent instances of this job will be permitted to run in parallel on a single slave (default false)
Example:
properties:
  - slave-utilization:
      slave-percentage: 40
      single-instance-per-slave: false

throttle
Throttles the number of builds for this job. Requires the Jenkins Throttle Concurrent Builds Plugin.
Parameters
o option (str) -- throttle project (throttle the project alone) or category (throttle the project as part of one or more categories)
o max-per-node (int) -- max concurrent builds per node (default 0)
o max-total (int) -- max concurrent builds (default 0)
o enabled (bool) -- whether throttling is enabled (default true)
o categories (list) -- multiproject throttle categories
o matrix-builds (bool) -- throttle matrix master builds (default true)
o matrix-configs (bool) -- throttle matrix config builds (default false)
o parameters-limit (str) -- prevent jobs with matching parameters from running concurrently (default false)
o parameters-check-list (list) -- Comma-separated list of parameters to use when comparing jobs (optional)
Example:
properties:
  - throttle:
      max-per-node: 2
      max-total: 4
      categories:
        - cat1
        - cat2
      option: category
      matrix-builds: false
      matrix-configs: true

zeromq-event
This is a Jenkins plugin that will publish Jenkins Job run events (start, complete, finish) to a ZMQ PUB socket.
Requires the Jenkins ZMQ Event Publisher.
Example:
properties:
  - zeromq-event

Publishers

Publishers define actions that the Jenkins job should perform after the build is complete.
Component: publishers
Macro publisher
Entry Point
jenkins_jobs.publishers
class publishers.Publishers(registry)
gen_xml(xml_parent, data)
Update the XML element tree based on YAML data. Override this method to add elements to the XML output. Create new Element objects and add them to the xml_parent. The YAML data structure must not be modified.
Parameters
o parser (YAMLParser) -- the global YAML Parser
o xml_parent (Element) -- the parent XML element
o data (dict) -- the YAML data structure
aggregate-flow-tests
Aggregate downstream test results in a Build Flow job. Requires the Jenkins Build Flow Test Aggregator Plugin.
Parameters
show-test-results-trend (bool) -- whether to show test results trend graph (default true)
Example:
publishers:
  - aggregate-flow-tests:
      show-test-results-trend: false

aggregate-tests
Aggregate downstream test results
Parameters
include-failed-builds (bool) -- whether to include failed builds (default false)
Example:
publishers:
  - aggregate-tests:
      include-failed-builds: true

allure Publish Allure report for the build. Requires the Jenkins Allure Plugin.
Parameters
o jdk (str) -- String identifier for a JDK installation in Jenkins
o commandline (str) -- String identifier for a Allure-commandline tool installation
o report-build-policy (str) -- String identifier for a report build policy enum. Possible values: \(aqALWAYS\(aq, \(aqUNSTABLE\(aq, \(aqUNSUCCESSFUL\(aq. (By default is \(aqALWAYS\(aq)
o include-properties (bool) -- Flag to include specified properties
o results-paths (list) -- List of results directories
o properties (list) -- List of key:value property pairs
Minimal Example:
publishers:
  - allure:
      results-paths:
       - path: \(aqbuild/allure-results\(aq

Full Example:
publishers:
  - allure:
      results-paths:
       - path: \(aqbuild/allure-results1\(aq
       - path: \(aqbuild/allure-results2\(aq
      properties:
       - key: \(aqallure.link.issue.pattern\(aq
         value: \(aqhttp://test.tms/{}\(aq
      jdk: openjdk1.8
      commandline: allure2
      report-build-policy: UNSTABLE
      include-properties: true

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

artifact-deployer
This plugin makes it possible to copy artifacts to remote locations.
Requires the Jenkins ArtifactDeployer Plugin.
Parameters
o entries (list) -- .INDENT 2.0
entries
o files (str) - files to deploy
o basedir (str) - the dir from files are deployed
o excludes (str) - the mask to exclude files
o remote (str) - a remote output directory
o flatten (bool) - ignore the source directory structure (default false)
o delete-remote (bool) - clean-up remote directory before deployment (default false)
o delete-remote-artifacts (bool) - delete remote artifacts when the build is deleted (default false)
o fail-no-files (bool) - fail build if there are no files (default false)
o groovy-script (str) - execute a Groovy script before a build is deleted
o deploy-if-fail (bool) -- Deploy if the build is failed (default false)
Example:
publishers:
  - artifact-deployer:
      entries:
        - files: \(aq*.tar.gz\(aq
          basedir: \(aq/opt/data\(aq
          excludes: \(aq*tmp*\(aq
          remote: \(aq/home/test/\(aq
          flatten: true
          delete-remote: true
          delete-remote-artifacts: true
          fail-no-files: true
          groovy-script: \(aqprint 123\(aq
      deploy-if-fail: true

artifactory
Uses/requires the Artifactory plugin to deploy artifacts to Artifactory Server.
Requires the Jenkins Artifactory Plugin.
Parameters
o url (str) -- Artifactory server url (default \(aq\(aq)
o name (str) -- Artifactory user with permissions use for connected to the selected Artifactory Server (default \(aq\(aq)
o release-repo-key (str) -- Release repository name (default \(aq\(aq)
o snapshot-repo-key (str) -- Snapshots repository name (default \(aq\(aq)
o publish-build-info (bool) -- Push build metadata with artifacts (default false)
o discard-old-builds (bool) -- Remove older build info from Artifactory (default false)
o discard-build-artifacts (bool) -- Remove older build artifacts from Artifactory (default false)
o even-if-unstable (bool) -- Deploy artifacts even when the build is unstable (default false)
o run-checks (bool) -- Run automatic license scanning check after the build is complete (default false)
o include-publish-artifacts (bool) -- Include the build\(aqs published module artifacts in the license violation checks if they are also used as dependencies for other modules in this build (default false)
o 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)
o license-auto-discovery (bool) -- Tells Artifactory not to try and automatically analyze and tag the build\(aqs dependencies with license information upon deployment (default true)
o 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)
o 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)
o 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)
o 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)
o 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 \(aq\(aq)
o violation-recipients (str) -- Recipients that need to be notified of license violations in the build info (default \(aq\(aq)
o 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 [])
o black-duck-app-name (str) -- The existing Black Duck Code Center application name (default \(aq\(aq)
o black-duck-app-version (str) -- The existing Black Duck Code Center application version (default \(aq\(aq)
o black-duck-report-recipients (str) -- Recipients that will be emailed a report after the automatic Black Duck Code Center compliance checks finished (default \(aq\(aq)
o 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 \(aq\(aq)
o black-duck-run-checks (bool) -- Automatic Black Duck Code Center compliance checks will occur after the build completes (default false)
o black-duck-include-published-artifacts (bool) -- Include the build\(aqs published module artifacts in the license violation checks if they are also used as dependencies for other modules in this build (default false)
o 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)
o 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)
o deploy-artifacts (bool) -- Push artifacts to the Artifactory Server. Use deployment-include-patterns and deployment-exclude-patterns to filter deploy artifacts. (default true)
o 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 [])
o deployment-exclude-patterns (list) -- New line or comma separated patterns for excluding artifacts from deployment to Artifactory (default [])
o 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)
o 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 [])
o 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: \(aqtest\(aq
      release-repo-key: libs-release-local
      snapshot-repo-key: libs-snapshot-local

publishers:
  - artifactory:
      url: http://artifactory.example.net/artifactory
      name: \(aqtest\(aq
      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: 
      matrix-params: []
      black-duck-app-name: myapp
      black-duck-app-version: \(aq1.0\(aq
      black-duck-report-recipients: 
      black-duck-scopes: []
      black-duck-run-checks: true
      black-duck-include-published-artifacts: true
      auto-create-missing-component-requests: false
      auto-discard-stale-component-requests: false
      deploy-artifacts: true
      deployment-include-patterns: []
      deployment-exclude-patterns: []
      env-vars-include: true
      env-vars-include-patterns: []
      env-vars-exclude-patterns: []

blame-upstream
Notify upstream committers when build fails Requires the Jenkins Blame upstream committers Plugin.
Example:
publishers:
  - blame-upstream

build-publisher
This plugin allows records from one Jenkins to be published on another Jenkins.
Requires the Jenkins Build Publisher Plugin.
Parameters
o publish-unstable-builds (bool) -- publish unstable builds (default true)
o publish-failed-builds (bool) -- publish failed builds (default true)
o days-to-keep (int) -- days to keep when publishing results (optional)
o num-to-keep (int) -- number of jobs to keep in the published results (optional)
Minimal Example:
publishers:
  - build-publisher

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

campfire
Send build notifications to Campfire rooms. Requires the Jenkins Campfire Plugin.
Campfire notifications global default values must be configured for the Jenkins instance. Default values will be used if no specific values are specified for each job, so all config params are optional.
Parameters
o subdomain (str) -- override the default campfire subdomain
o token (str) -- override the default API token
o ssl (bool) -- override the default \(aquse SSL\(aq
o room (str) -- override the default room name
Example:
publishers:
    - campfire:
        subdomain: \(aqsub\(aq
        ssl: true
        token: \(aqTOKEN\(aq
        room: \(aqroom\(aq

checkstyle
Publish trend reports with Checkstyle. Requires the Jenkins Checkstyle Plugin.
The checkstyle component accepts a dictionary with the following values:
Parameters
o pattern (str) -- Report filename pattern (default \(aq\(aq)
o can-run-on-failed (bool) -- Also runs for failed builds, instead of just stable or unstable builds (default false)
o should-detect-modules (bool) -- Determines if Ant or Maven modules should be detected for all files that contain warnings (default false)
o healthy (int) -- Sunny threshold (default \(aq\(aq)
o unhealthy (int) -- Stormy threshold (default \(aq\(aq)
o health-threshold (str) -- Threshold priority for health status (\(aqlow\(aq, \(aqnormal\(aq or \(aqhigh\(aq) (default \(aqlow\(aq)
o thresholds (dict) --
Mark build as failed or unstable if the number of errors exceeds a threshold. (optional)
thresholds
o
unstable (dict)
unstable
o total-all (int)
o total-high (int)
o total-normal (int)
o total-low (int)
o new-all (int)
o new-high (int)
o new-normal (int)
o new-low (int)
o
failed (dict)
failed
o total-all (int)
o total-high (int)
o total-normal (int)
o total-low (int)
o new-all (int)
o new-high (int)
o new-normal (int)
o new-low (int)
o default-encoding (str) -- Encoding for parsing or showing files (default \(aq\(aq)
o do-not-resolve-relative-paths (bool) -- (default false)
o dont-compute-new (bool) -- If set to false, computes new warnings based on the reference build (default true)
o use-previous-build-as-reference (bool) -- determines whether to always use the previous build as the reference build (default false)
o 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)
o 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: \(aq**/checkstyle-result.xml\(aq
    healthy: 0
    unhealthy: 100
    health-threshold: \(aqhigh\(aq
    thresholds:
        unstable:
            total-high: 10
        failed:
            total-high: 1

Full example:
publishers:
 - checkstyle:
    pattern: \(aq**/checkstyle-result.xml\(aq
    can-run-on-failed: true
    should-detect-modules: true
    healthy: 0
    unhealthy: 100
    health-threshold: \(aqhigh\(aq
    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: \(aqutf-8\(aq
    do-not-resolve-relative-paths: true
    dont-compute-new: false
    use-stable-build-as-reference: true
    use-delta-values: true

chuck-norris
Displays a picture of Chuck Norris (instead of Jenkins the butler) and a random Chuck Norris \(aqThe Programmer\(aq fact on each build page. Requires the Jenkins ChuckNorris Plugin.
Example:
publishers:
  - chuck-norris

cifs Upload files via CIFS. Requires the Jenkins Publish over CIFS Plugin.
Parameters
o site (str) -- name of the cifs site/share (required)
o target (str) -- destination directory (required)
o target-is-date-format (bool) -- whether target is a date format. If true, raw text should be quoted (default false)
o clean-remote (bool) -- should the remote directory be deleted before transferring files (default false)
o source (str) -- source path specifier (required)
o excludes (str) -- excluded file pattern (default \(aq\(aq)
o remove-prefix (str) -- prefix to remove from uploaded file paths (default \(aq\(aq)
o fail-on-error (bool) -- fail the build if an error occurs (default false).
o flatten (bool) -- only create files on the server, don\(aqt create directories (default false).
o verbose (bool) -- adds lots of detail useful for debug to the console but generally should be left off (default false)
o retries (int) -- the number of times to retry this server in the event of failure (optional)
o retry-delay (int) -- the time to wait, in milliseconds, before attempting another transfer (default 10000)
Minimal Example:
publishers:
  - cifs:
      site: \(aqcifs.share\(aq
      target: \(aqdest/dir\(aq
      source: \(aqbase/source/dir/**\(aq

Full Example:
publishers:
  - cifs:
      site: \(aqcifs.share\(aq
      target: "\(aqdest/dir/\(aqyyyyMMddHHmmss"
      target-is-date-format: true
      clean-remote: true
      source: \(aqbase/source/dir/**\(aq
      excludes: \(aq**/*.excludedfiletype\(aq
      remove-prefix: \(aqbase/source/dir\(aq
      fail-on-error: true
      flatten: true
      verbose: true
      retries: 99
      retry-delay: 12345

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

claim-build
Claim build failures Requires the Jenkins Claim Plugin.
Example:
publishers:
  - claim-build

clamav Check files with ClamAV, an open source antivirus engine. Requires the Jenkins ClamAV Plugin.
Parameters
o includes (str) -- Comma separated list of files that should be scanned. Must be set for ClamAV to check for artifacts. (default \(aq\(aq)
o excludes (str) -- Comma separated list of files that should be ignored (default \(aq\(aq)
Full Example:
publishers:
  - clamav:
      includes: \(aq*.zip\(aq
      excludes: \(aqfoo.zip\(aq

Minimal Example:
publishers:
  - clamav

clone-workspace
Archive the workspace from builds of one project and reuse them as the SCM source for another project. Requires the Jenkins Clone Workspace SCM Plugin.
Parameters
o workspace-glob (str) -- Files to include in cloned workspace (default \(aq\(aq)
o workspace-exclude-glob (str) -- Files to exclude from cloned workspace
o criteria (str) -- Criteria for build to be archived. Can be \(aqany\(aq, \(aqnot failed\(aq, or \(aqsuccessful\(aq. (default \(aqany\(aq)
o archive-method (str) -- Choose the method to use for archiving the workspace. Can be \(aqtar\(aq or \(aqzip\(aq. (default \(aqtar\(aq)
o override-default-excludes (bool) -- Override default ant excludes. (default false)
Minimal example:
publishers:
  - clone-workspace

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

cloudfoundry
Pushes a project to Cloud Foundry or a CF-based platform (e.g. Stackato) at the end of a build. Requires the Jenkins Cloud Foundry Plugin.
Parameters
o target (str) -- The API endpoint of the platform you want to push to. This is the URL you use to access the platform, possibly with ".api" added. (required)
o organization (str) -- An org is a development account that an individual or multiple collaborators can own and use (required)
o space (str) -- Provide users with access to a shared location for application development, deployment, and maintenance (required)
o credentials-id (str) -- credentials-id of the user (required)
o self-signed (bool) -- Allow self-signed SSL certificates from the target (default false)
o reset-app (bool) -- Delete app before pushing app\(aqs configurations (default false)
o plugin-timeout (int) -- The time in seconds before the Cloud Foundry plugin stops fetching logs and marks the build a failure (default 120)
o create-services (list) --
Create services automatically (default \(aq\(aq)
create-services
o name (\(aqstr\(aq) -- Service name (default \(aq\(aq)
o type (\(aqstr\(aq) -- Service type (default \(aq\(aq)
o plan (\(aqstr\(aq) -- Service plan (default \(aq\(aq)
o
reset-service (\(aqbool\(aq) -- Delete the service before creating
the new one (default false)
o value (str) -- Select to read configuration from manifest file or to enter configuration in Jenkins (default \(aqmanifestFile\(aq)
o manifest-file (str) -- Path to manifest file (default \(aqmanifest.yml\(aq)
o app-name (str) -- The application\(aqs name. Default to Jenkins build name. (default \(aq\(aq)
o memory (int) -- The application\(aqs memory usage in MB (default 512)
o host-name (str) -- The hostname of the URI to access your application. Default to app-name (default \(aq\(aq)
o instances (int) -- Number of instances of your application on creation (default 1)
o manifest-timeout (int) -- The time in seconds before the health-manager gives up on starting the application (default 60)
o no-route (bool) -- No URI path will be created to access the application (default false)
o app-path (str) -- Path to application (default \(aq\(aq)
o build-pack -- If your application requires a custom buildpack, you can use this to specify its URL or name (default \(aq\(aq)
o stack (str) -- If your application requires a custom stack, you can use this to specify its name. (default \(aq\(aq)
o command (str) -- Set a custom start command for your application (default \(aq\(aq)
o domain (str) -- The domain of the URI to access your application (default \(aq\(aq)
o environment-variables (list) --
Inject environment variables
environment-variables
o key (\(aqstr\(aq) -- Environment variable key (default \(aq\(aq)
o value (\(aqstr\(aq) -- Environment variable value (default \(aq\(aq)
o services-names (list) --
Name of service instances
services-names
o name (\(aqstr\(aq) -- Name of the service instance (default \(aq\(aq)
Minimal example:
publishers:
  - cloudfoundry:
      target: https://api.stackato-rkw2.local
      organization: AS
      space: SimpleSpace
      credentials-id: j89jk213

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

cloudformation
Create cloudformation stacks before running a build and optionally delete them at the end. Requires the Jenkins AWS Cloudformation Plugin.
Parameters
o create-stacks (list) --
List of stacks to create
create-stacks attributes
o arg str name - The name of the stack (Required)
o arg str description - Description of the stack (Optional)
o arg str recipe - The cloudformation recipe file (Required)
o arg list parameters - A list of key/value pairs, will be joined together into a comma separated string (Optional)
o arg int timeout - Number of seconds to wait before giving up creating a stack (default 0)
o arg str access-key - The Amazon API Access Key (Required)
o arg str secret-key - The Amazon API Secret Key (Required)
o arg int sleep - Number of seconds to wait before continuing to the next step (default 0)
o arg array region - The region to run cloudformation in. (Required)
region values
o us-east-1
o us-west-1
o us-west-2
o eu-central-1
o eu-west-1
o ap-southeast-1
o ap-southeast-2
o ap-northeast-1
o sa-east-1
o delete-stacks (list) --
List of stacks to delete
delete-stacks attributes
o arg list name - The names of the stacks to delete (Required)
o arg str access-key - The Amazon API Access Key (Required)
o arg str secret-key - The Amazon API Secret Key (Required)
o 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)
o arg array region - The region to run cloudformation in. (Required)
region values
o us-east-1
o us-west-1
o us-west-2
o eu-central-1
o eu-west-1
o ap-southeast-1
o ap-southeast-2
o ap-northeast-1
o sa-east-1
Example:
publishers:
  - cloudformation:
      create-stacks:
        - name: "foo"
          description: "Build the foo stack"
          recipe: "foo.json"
          parameters:
            - "Key1=foo"
            - "Key2=fuu"
          timeout: 3600
          access-key: "$AWS_ACCESS_KEY"
          secret-key: "$AWS_SECRET_KEY"
          region: us-west-2
          sleep: 5
        - name: "bar"
          description: "Build the bar stack"
          recipe: "bar.json"
          parameters:
            - "Key1=bar"
            - "Key2=baa"
          timeout: 3600
          access-key: "$AWS_ACCESS_KEY"
          secret-key: "$AWS_SECRET_KEY"
          region: us-west-1
      delete-stacks:
        - name: "foo"
          prefix: true
          region: us-west-2
          access-key: "$AWS_ACCESS_KEY"
          secret-key: "$AWS_SECRET_KEY"
        - name: "bar"
          region: us-west-1
          access-key: "$AWS_ACCESS_KEY"
          secret-key: "$AWS_SECRET_KEY"

cloverphp
Capture code coverage reports from PHPUnit Requires the Jenkins Clover PHP Plugin.
Your job definition should pass to PHPUnit the --coverage-clover option pointing to a file in the workspace (ex: clover-coverage.xml). The filename has to be filled in the xml-location field.
Parameters
o xml-location (str) -- Path to the coverage XML file generated by PHPUnit using --coverage-clover. Relative to workspace. (required)
o 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):
o
dir (str): Directory where HTML report will be generated relative
to workspace. (required in html dict).
o archive (bool): Whether to archive HTML reports (default true).
o metric-targets (list) --
List of metric targets to reach, must be one of healthy, unhealthy and failing. Each metric target can takes two parameters:
o method Target for method coverage
o 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: \(aqbuild/clover.xml\(aq

Full example:
# Exercise all options with non defaults values
publishers:
 - cloverphp:
       xml-location: \(aqbuild/clover.xml\(aq
       html:
         dir: \(aqhtml\(aq
         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
o report-file (str) -- This is a file name pattern that can be used to locate the cobertura xml report files (optional)
o only-stable (bool) -- Include only stable builds (default false)
o fail-no-reports (bool) -- fail builds if no coverage reports are found (default false)
o fail-unhealthy (bool) -- Unhealthy projects will be failed (default false)
o fail-unstable (bool) -- Unstable projects will be failed (default false)
o health-auto-update (bool) -- Auto update threshold for health on successful build (default false)
o stability-auto-update (bool) -- Auto update threshold for stability on successful build (default false)
o 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)
o source-encoding (str) -- Override the source encoding (default ASCII)
o targets (dict) -- .INDENT 2.0
targets
(packages, files, classes, method, line, conditional)
o healthy (int): Healthy threshold (default 0)
o unhealthy (int): Unhealthy threshold (default 0)
o failing (int): Failing threshold (default 0)
Example:
publishers:
  - cobertura:
      report-file: "/reports/cobertura/coverage.xml"
      only-stable: "true"
      fail-no-reports: "true"
      fail-unhealthy: "true"
      fail-unstable: "true"
      health-auto-update: "true"
      stability-auto-update: "true"
      zoom-coverage-chart: "true"
      source-encoding: "Big5"
      targets:
        - files:
            healthy: 10
            unhealthy: 20
            failing: 30
        - method:
            healthy: 50
            unhealthy: 40
            failing: 30

codecover
This plugin allows you to capture code coverage report from CodeCover. Jenkins will generate the trend report of coverage. Requires the Jenkins CodeCover Plugin.
Parameters
o include (str) -- Specify the path to the CodeCover HTML report file, relative to the workspace root (default \(aq\(aq)
o min-statement (int) -- Minimum statement threshold (default 0)
o max-statement (int) -- Maximum statement threshold (default 90)
o min-branch (int) -- Minimum branch threshold (default 0)
o max-branch (int) -- Maximum branch threshold (default 80)
o min-loop (int) -- Minimum loop threshold (default 0)
o max-loop (int) -- Maximum loop threshold (default 50)
o min-condition (int) -- Minimum condition threshold (default 0)
o max-condition (int) -- Maximum conditon threshold (default 50)
Minimal Example:
publishers:
  - codecover

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

conditional-publisher
Conditionally execute some post-build steps. Requires the Jenkins Flexible Publish Plugin.
A Flexible Publish list of Conditional Actions is created in Jenkins.
Parameters
o 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.
o condition-aggregation (bool) -- If true Matrix Aggregation will be enabled. (default false)
o condition-aggregation-kind (str) -- Condition Aggregation kind that must be verified before the action is executed. Valid values and their additional attributes are described in the conditions table.
o 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.
o 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 Expression to expand
current-status Run the action if the current build status is within the configured range Accepted values are SUCCESS, UNSTABLE, FAILURE, NOT_BUILD, ABORTED Accepted values are SUCCESS, UNSTABLE, FAILURE, NOT_BUILD, ABORTED
shell Run the action if the shell command succeeds Shell command to execute
windows-shell Similar to shell, except that commands will be executed by cmd, under Windows Command to execute
regexp Run the action if a regular expression matches Regular Expression Text to match against the regular expression
file-exists Run the action if a file exists Check existence of this file 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: \(aq**/**\(aq
                  allow-empty: \(aqtrue\(aq

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: \(aq**/**\(aq
                  allow-empty: \(aqtrue\(aq
              - aggregate-tests:
                  include-failed-builds: true

Multiple Conditional Actions Example for pre-v0.13 versions
copy-to-master
Copy files to master from slave Requires the Jenkins Copy To Slave Plugin.
Parameters
o includes (list) -- list of file patterns to copy
o excludes (list) -- list of file patterns to exclude
o destination (string) -- absolute path into which the files will be copied. If left blank they will be copied into the workspace of the current job (default \(aq\(aq)
o run-after-result (bool) -- If this is checked then copying files back to master will not run until the build result is finalized.(default true)
Example:
publishers:
  - copy-to-master:
      includes:
        - file1
        - file2*.txt
      excludes:
        - file2bad.txt

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

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

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

cucumber-reports
This plugin creates pretty cucumber-jvm html reports on jenkins.
Requires the Jenkins cucumber reports.
Parameters
o 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 \(aq\(aq)
o file-include-pattern (str) -- Include pattern (default \(aq\(aq)
o file-exclude-pattern (str) -- Exclude pattern (default \(aq\(aq)
o 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 \(aq\(aq)
o skipped-fails (bool) -- Skipped steps to cause the build to fail (default false)
o pending-fails (bool) -- Pending steps to cause the build to fail (default false)
o undefined-fails (bool) -- Undefined steps to cause the build to fail (default false)
o missing-fails (bool) -- Missing steps to cause the build to fail (default false)
o no-flash-charts (bool) -- Use javascript charts instead of flash charts (default false)
o ignore-failed-tests (bool) -- Entire build to fail when these tests fail (default false)
o parallel-testing (bool) -- Run same test in parallel for multiple devices (default false)
o failed-steps-number (int) -- Maximum number of failed steps above which build result is changed (default 0)
o skipped-steps-number (int) -- Maximum number of skipped steps above which build result is changed (default 0)
o pending-steps-number (int) -- Maximum number of pending steps above which build result is changed (default 0)
o undefined-steps-number (int) -- Maximum number of undefined steps above which build result is changed (default 0)
o failed-scenarios-number (int) -- Maximum number of failed scenarios above which build result is changed (default 0)
o failed-features-number (int) -- Maximum number of failed features above which build result is changed (default 0)
o build-status (list) -- Build result to which the build should be set when the report becomes failed or unstable (default \(aq\(aq)
o trends-limit (int) -- Number of past reports that should be presented. Zero means unlimited number of builds (default 0)
o sorting-method (list) -- Result sorting order (default \(aqNATURAL\(aq)
Full example:
publishers:
  - cucumber-reports:
      json-reports-path: path
      plugin-url-path: http://example.com/
      file-include-pattern: \(aq**/*.json\(aq
      file-exclude-pattern: badfile.txt
      skipped-fails: true
      pending-fails: true
      undefined-fails: true
      missing-fails: true
      no-flash-charts: true
      ignore-failed-tests: true
      parallel-testing: true
      failed-steps-number: 1
      skipped-steps-number: 2
      pending-steps-number: 3
      undefined-steps-number: 4
      failed-scenarios-number: 5
      failed-features-number: 6
      build-status: UNSTABLE
      trends-limit: 7
      sorting-method: ALPHABETICAL
      sorting-values:
        - key-value-pair:
            key: classification key 1
            value: classification value 1
        - key-value-pair:
            key: classification key 2
            value: classification value 2

Minimal Example:
publishers:
  - cucumber-reports

cucumber-testresult
Publish cucumber test results. Requires the Jenkins cucumber testresult.
Parameters
o results (str) -- Results filename (required)
o ignore-bad-steps (bool) -- Ignore not existed step results (default false)
Minimal example:
publishers:
- cucumber-testresult:
    results: nosetests.xml

Full Example:
publishers:
- cucumber-testresult:
    results: nosetests.xml
    ignore-bad-steps: true

dependency-check
Dependency-Check is an open source utility that identifies project dependencies and checks if there are any known, publicly disclosed, vulnerabilities.
Requires the Jenkins OWASP Dependency-Check Plugin.
Parameters
o pattern (str) -- Report filename pattern (optional)
o can-run-on-failed (bool) -- Also runs for failed builds, instead of just stable or unstable builds (default false)
o should-detect-modules (bool) -- Determines if Ant or Maven modules should be detected for all files that contain warnings (default false)
o healthy (int) -- Sunny threshold (optional)
o unhealthy (int) -- Stormy threshold (optional)
o health-threshold (str) -- Threshold priority for health status (\(aqlow\(aq, \(aqnormal\(aq or \(aqhigh\(aq, defaulted to \(aqlow\(aq)
o thresholds (dict) --
Mark build as failed or unstable if the number of errors exceeds a threshold. (optional)
thresholds
o
unstable (dict)
unstable
o total-all (int)
o total-high (int)
o total-normal (int)
o total-low (int)
o new-all (int)
o new-high (int)
o new-normal (int)
o new-low (int)
o
failed (dict)
failed
o total-all (int)
o total-high (int)
o total-normal (int)
o total-low (int)
o new-all (int)
o new-high (int)
o new-normal (int)
o new-low (int)
o default-encoding (str) -- Encoding for parsing or showing files (optional)
o do-not-resolve-relative-paths (bool) -- (default false)
o dont-compute-new (bool) -- If set to false, computes new warnings based on the reference build (default true)
o use-previous-build-as-reference (bool) -- determines whether to always use the previous build as the reference build (default false)
o 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)
o use-delta-values (bool) -- If set then the number of new warnings is calculated by subtracting the total number of warnings of the current build from the reference build. (default false)
Minimal Example:
publishers:
  - dependency-check

Full Example:
publishers:
  - dependency-check:
      pattern: \(aq**/dependency-check-report.xml\(aq
      can-run-on-failed: true
      should-detect-modules: true
      healthy: 0
      unhealthy: 100
      health-threshold: \(aqhigh\(aq
      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: \(aqutf-8\(aq
      do-not-resolve-relative-paths: true
      dont-compute-new: false
      use-previous-build-as-reference: true
      use-stable-build-as-reference: true
      use-delta-values: true

description-setter
This plugin sets the description for each build, based upon a RegEx test of the build log file.
Requires the Jenkins Description Setter Plugin.
Parameters
o regexp (str) -- A RegEx which is used to scan the build log file (default \(aq\(aq)
o regexp-for-failed (str) -- A RegEx which is used for failed builds (default \(aq\(aq)
o description (str) -- The description to set on the build (optional)
o description-for-failed (str) -- The description to set on the failed builds (optional)
o set-for-matrix (bool) -- Also set the description on a multi-configuration build (default false)
Minimal Example:
publishers:
  - description-setter

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

disable-failed-job
Automatically disable failed jobs.
Requires the Jenkins Disable Failed Job Plugin.
Parameters
o when-to-disable (str) --
The condition to disable the job. (required) Possible values are
o Only Failure
o Failure and Unstable
o Unstable
o no-of-failures (int) -- Number of consecutive failures to disable the job. (optional)
Example:
publishers:
  - disable-failed-job:
      when-to-disable: \(aqFailure and Unstable\(aq
      no-of-failures: 3

display-upstream-changes
Display SCM changes of upstream jobs. Requires the Jenkins Display Upstream Changes Plugin.
Example:
publishers:
  - display-upstream-changes

docker-stop-container
This plugin allows removing stopped docker containers. It requires the Docker build step plugin.
Parameters
remove-stopped-containers (bool) -- Boolean value to remove stopped docker containers (default False)
Minimal Example: .. literalinclude:: /../../tests/ publishers/fixtures/docker-stop-container-minimal.yaml
Full Example: .. literalinclude:: /../../tests/ publishers/fixtures/docker-stop-container-full.yaml
downstream-ext
Trigger multiple downstream jobs when a job is completed and condition is met.
Requires the Jenkins Downstream-Ext Plugin.
Parameters
o projects (list) -- Projects to build (required)
o condition (string) -- comparison condition used for the criteria. One of \(aqequal-or-over\(aq, \(aqequal-or-under\(aq, \(aqequal\(aq (default \(aqequal-or-over\(aq)
o criteria (string) -- Trigger downstream job if build results meets condition. One of \(aqsuccess\(aq, \(aqunstable\(aq, \(aqfailure\(aq or \(aqaborted\(aq (default \(aqsuccess\(aq)
o only-on-scm-change (bool) -- Trigger only if downstream project has SCM changes (default false)
o 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
o doxyfile (str) -- The doxyfile path (required)
o slave (str) -- The node or label to pull the doxygen HTML files from (default \(aq\(aq)
o keep-all (bool) -- Retain doxygen generation for each successful build (default false)
o folder (str) -- Folder where you run doxygen (default \(aq\(aq)
Minimal Example:
publishers:
  - doxygen:
      doxyfile: "Doxyfile"

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

dry Publish trend reports with DRY. Requires the Jenkins DRY Plugin.
The DRY component accepts a dictionary with the following values:
Parameters
o pattern (str) -- Report filename pattern (default \(aq\(aq)
o can-run-on-failed (bool) -- Also runs for failed builds, instead of just stable or unstable builds (default false)
o should-detect-modules (bool) -- Determines if Ant or Maven modules should be detected for all files that contain warnings (default false)
o healthy (int) -- Sunny threshold (default \(aq\(aq)
o unhealthy (int) -- Stormy threshold (default \(aq\(aq)
o health-threshold (str) -- Threshold priority for health status (\(aqlow\(aq, \(aqnormal\(aq or \(aqhigh\(aq, defaulted to \(aqlow\(aq)
o high-threshold (int) -- Minimum number of duplicated lines for high priority warnings. (default 50)
o normal-threshold (int) -- Minimum number of duplicated lines for normal priority warnings. (default 25)
o thresholds (dict) --
Mark build as failed or unstable if the number of errors exceeds a threshold. (default \(aq\(aq)
thresholds
o
unstable (dict)
unstable
o total-all (int)
o total-high (int)
o total-normal (int)
o total-low (int)
o new-all (int)
o new-high (int)
o new-normal (int)
o new-low (int)
o
failed (dict)
failed
o total-all (int)
o total-high (int)
o total-normal (int)
o total-low (int)
o new-all (int)
o new-high (int)
o new-normal (int)
o new-low (int)
o default-encoding (str) -- Encoding for parsing or showing files (optional)
o do-not-resolve-relative-paths (bool) -- (default false)
o dont-compute-new (bool) -- If set to false, computes new warnings based on the reference build (default true)
o use-previous-build-as-reference (bool) -- determines whether to always use the previous build as the reference build (default false)
o 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)
o 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: \(aq**/cpd-result.xml\(aq
    healthy: 0
    unhealthy: 100
    health-threshold: \(aqhigh\(aq
    high-threshold: 50
    normal-threshold: 25
    thresholds:
        unstable:
            total-high: 10
        failed:
            total-high: 1

Full example:
publishers:
 - dry:
    pattern: \(aq**/cpd-result.xml\(aq
    can-run-on-failed: true
    should-detect-modules: true
    healthy: 0
    unhealthy: 100
    health-threshold: \(aqhigh\(aq
    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: \(aqutf-8\(aq
    do-not-resolve-relative-paths: true
    dont-compute-new: false
    use-stable-build-as-reference: true
    use-delta-values: true

email Email notifications on build failure. Requires the Jenkins Mailer Plugin.
Parameters
o recipients (str) -- Space separated list of recipient email addresses (required)
o notify-every-unstable-build (bool) -- Send an email for every unstable build (default true)
o send-to-individuals (bool) -- Send an email to the individual who broke the build (default false)
Example:
publishers:
  - email:
      recipients: 

publishers:
  - email:
      recipients:  
      notify-every-unstable-build: false
      send-to-individuals: true

email-ext
Extend Jenkin\(aqs built in email notification Requires the Jenkins Email-ext Plugin.
Parameters
o 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)
o recipients (str) -- Comma separated list of recipient email addresses (default \(aq$DEFAULT_RECIPIENTS\(aq)
o reply-to (str) -- Comma separated list of email addresses that should be in the Reply-To header for this project (default \(aq$DEFAULT_REPLYTO\(aq)
o 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: \(aqhtml\(aq, \(aqtext\(aq, \(aqboth-html-text\(aq or \(aqdefault\(aq (default \(aqdefault\(aq)
o subject (str) -- Subject for the email, can include variables like ${BUILD_NUMBER} or even groovy or javascript code (default \(aq$DEFAULT_SUBJECT\(aq)
o body (str) -- Content for the body of the email, can include variables like ${BUILD_NUMBER}, but the real magic is using groovy or javascript to hook into the Jenkins API itself (default \(aq$DEFAULT_CONTENT\(aq)
o attach-build-log (bool) -- Include build log in the email (default false)
o compress-log (bool) -- Compress build log in the email (default false)
o attachments (str) -- pattern of files to include as attachment (default \(aq\(aq)
o always (bool) -- Send an email for every result (default false)
o unstable (bool) -- Send an email for an unstable result (default false)
o first-failure (bool) -- Send an email for just the first failure (default false)
o first-unstable (bool) -- Send an email for just the first unstable build (default false)
o not-built (bool) -- Send an email if not built (default false)
o aborted (bool) -- Send an email if the build is aborted (default false)
o regression (bool) -- Send an email if there is a regression (default false)
o failure (bool) -- Send an email if the build fails (default true)
o second-failure (bool) -- Send an email for the second failure (default false)
o improvement (bool) -- Send an email if the build improves (default false)
o still-failing (bool) -- Send an email if the build is still failing (default false)
o success (bool) -- Send an email for a successful build (default false)
o fixed (bool) -- Send an email if the build is fixed (default false)
o fixed-unhealthy (bool) -- Send an email if the build status changes from "Failure" or "Unstable" to "Success". Intermediate "Aborted" builds are ignored. (default false)
o still-unstable (bool) -- Send an email if the build is still unstable (default false)
o pre-build (bool) -- Send an email before the build (default false)
o trigger-script (str) -- A Groovy script used to determine if an email should be sent.
o presend-script (str) -- A Groovy script executed prior sending the mail. (default \(aq\(aq)
o postsend-script (str) -- A Goovy script executed after sending the email. (default \(aq\(aq)
o save-output (bool) -- Save email content to workspace (default false)
o matrix-trigger (str) --
If using matrix projects, when to trigger
matrix-trigger values
o both
o only-parent
o only-configurations
o send-to (list) --
list of recipients from the predefined groups
send-to values
o developers (disabled by default)
o requester (disabled by default)
o culprits (disabled by default)
o recipients (enabled by default)
Example:
publishers:
  - email-ext:
      recipients: , 
      reply-to: 
      content-type: html
      subject: Subject for Build ${BUILD_NUMBER}
      body: The build has finished
      attach-build-log: false
      compress-log: false
      attachments: "*/foo*.log"
      always: true
      unstable: true
      first-failure: true
      first-unstable: true
      not-built: true
      aborted: true
      regression: true
      failure: true
      second-failure: true
      improvement: true
      still-failing: true
      success: true
      fixed: true
      fixed-unhealthy: true
      still-unstable: true
      pre-build: true
      matrix-trigger: only-configurations
      presend-script: "cancel=true"
      postsend-script: "cancel=true"
      save-output: true
      send-to:
        - developers
        - requester
        - culprits
        - recipients

emotional-jenkins
Emotional Jenkins. This funny plugin changes the expression of Mr. Jenkins in the background when your builds fail.
Requires the Jenkins Emotional Jenkins Plugin.
Example:
publishers:
  - emotional-jenkins

findbugs
FindBugs reporting for builds
Requires the Jenkins FindBugs Plugin.
Parameters
o pattern (str) -- specifies the generated raw FindBugs XML report files, such as **/findbugs.xml or **/findbugsXml.xml. (default \(aq\(aq)
o rank-priority (bool) -- Use rank as priority (default false)
o include-files (str) -- Comma separated list of files to include. (default \(aq\(aq)
o exclude-files (str) -- Comma separated list of files to exclude. (default \(aq\(aq)
o can-run-on-failed (bool) -- Weather or not to run plug-in on failed builds (default false)
o should-detect-modules (bool) -- Determines if Ant or Maven modules should be detected for all files that contain warnings. (default false)
o healthy (int) -- Sunny threshold (default \(aq\(aq)
o unhealthy (int) -- Stormy threshold (default \(aq\(aq)
o health-threshold (str) -- Threshold priority for health status (\(aqlow\(aq, \(aqnormal\(aq or \(aqhigh\(aq, defaulted to \(aqlow\(aq)
o dont-compute-new (bool) -- If set to false, computes new warnings based on the reference build (default true)
o use-delta-values (bool) -- Use delta for new warnings. (default false)
o 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)
o 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)
o thresholds (dict) -- .INDENT 2.0
thresholds
o
unstable (dict)
unstable
o total-all (int)
o total-high (int)
o total-normal (int)
o total-low (int)
o new-all (int)
o new-high (int)
o new-normal (int)
o new-low (int)
o
failed (dict)
failed
o total-all (int)
o total-high (int)
o total-normal (int)
o total-low (int)
o new-all (int)
o new-high (int)
o new-normal (int)
o new-low (int)
Minimal Example:
publishers:
  - findbugs

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

fingerprint
Fingerprint files to track them across builds. Requires the Jenkins Fingerprint Plugin.
Parameters
o files (str) -- files to fingerprint, follows the @includes of Ant fileset (default \(aq\(aq)
o 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
o token (str) -- API token for the targeted flow. (required)
o tags (str) -- Comma-separated list of tags to include in message (default "")
o chat-notification (bool) -- Send chat notification when build fails (default true)
o notify-success (bool) -- Send notification on build success (default true)
o notify-failure (bool) -- Send notification on build failure (default true)
o notify-fixed (bool) -- Send notification when build is fixed (default true)
o notify-unstable (bool) -- Send notification when build is unstable (default false)
o notify-aborted (bool) -- Send notification when build was aborted (default false)
o 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
o site (str) -- name of the ftp site (required)
o target (str) -- destination directory (required)
o target-is-date-format (bool) -- whether target is a date format. If true, raw text should be quoted (default false)
o clean-remote (bool) -- should the remote directory be deleted before transferring files (default false)
o source (str) -- source path specifier (required)
o excludes (str) -- excluded file pattern (optional)
o remove-prefix (str) -- prefix to remove from uploaded file paths (optional)
o fail-on-error (bool) -- fail the build if an error occurs (default false).
o flatten (bool) -- only create files on the server, don\(aqt create directories (default false).
o verbose (bool) -- adds lots of detail useful for debug to the console but generally should be left off (default false)
o retries (int) -- the number of times to retry this server in the event of failure (optional)
o retry-delay (int) -- the time to wait, in milliseconds, before attempting another transfer (default 10000)
Minimal Example:
publishers:
  - ftp:
      site: \(aqftp.example.com\(aq
      target: \(aqdest/dir\(aq
      source: \(aqbase/source/dir/**\(aq

Full Example:
publishers:
  - ftp:
      site: \(aqftp.example.com\(aq
      target: "\(aqdest/dir/\(aqyyyyMMddHHmmss"
      target-is-date-format: true
      clean-remote: true
      source: \(aqbase/source/dir/**\(aq
      excludes: \(aq**/*.excludedfiletype\(aq
      remove-prefix: \(aqbase/source/dir\(aq
      fail-on-error: true
      flatten: true
      verbose: true
      retries: 99
      retry-delay: 12345

ftp-publisher
This plugin can be used to upload project artifacts and whole directories to an ftp server. Requires the Jenkins FTP-Publisher Plugin.
Parameters
o uploads (list) --
List of files to upload
uploads
o
file-path (\(aqstr\(aq) -- Destination folder. It will be created
if doesn\(aqt exists. Created relative to ftp root directory. (default \(aq\(aq)
o
source-file (\(aqstr\(aq) -- Source files which will be uploaded
(default \(aq\(aq)
o site-name (str) -- Name of FTP server to upload to (required)
o use-timestamps (bool) -- Use timestamps in the FTP directory path (default false)
o flatten-files (bool) -- Flatten files on the FTP host (default false)
o skip-publishing (bool) -- Skip publishing (default false)
Minimal Example:
publishers:
  - ftp-publisher:
      site-name: foo

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

gatling
Publish gatling results as a trend graph Requires the Jenkins Gatling Plugin.
Example:
publishers:
  - gatling

git This plugin will configure the Jenkins Git plugin to push merge results, tags, and/or branches to remote repositories after the job completes.
Requires the Jenkins Git Plugin.
Parameters
o push-merge (bool) -- push merges back to the origin specified in the pre-build merge options (default false)
o push-only-if-success (bool) -- Only push to remotes if the build succeeds - otherwise, nothing will be pushed. (default true)
o force-push (bool) -- Add force option to git push (default false)
o tags (list) --
tags to push at the completion of the build
tag
o remote (str) remote repo name to push to (default \(aqorigin\(aq)
o name (str) name of tag to push
o message (str) message content of the tag
o 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)
o update-tag (bool) whether to overwrite a remote tag or not (default false)
o branches (list) --
branches to push at the completion of the build
branch
o remote (str) remote repo name to push to (default \(aqorigin\(aq)
o name (str) name of remote branch to push to
o notes (list) --
notes to push at the completion of the build
note
o remote (str) remote repo name to push to (default \(aqorigin\(aq)
o message (str) content of the note
o namespace (str) namespace of the note (default master)
o replace-note (bool) whether to overwrite a note or not (default false)
Minimal Example:
publishers:
  - git

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

github-notifier
Set build status on Github commit. Requires the Jenkins Github Plugin.
Example:
publishers:
  - github-notifier

github-pull-request-merge
This action merges the pull request that triggered the build (see the github pull request trigger) Requires the Jenkins GitHub pull request builder plugin.
Parameters
o only-admins-merge (bool) -- if true only administrators can merge the pull request, (default false)
o disallow-own-code (bool) -- if true will allow merging your own pull requests, in opposite to needing someone else to trigger the merge. (default false)
o merge-comment (str) -- Comment to set on the merge commit (default \(aq\(aq)
o fail-on-non-merge (bool) -- fail the job if the merge was unsuccessful (default false)
o delete-on-merge (bool) -- Delete the branch of the pull request on successful merge (default false)
Full Example:
publishers:
  - github-pull-request-merge:
      only-admins-merge: true
      disallow-own-code: true
      merge-comment: \(aqmy fancy commit message\(aq
      fail-on-non-merge: true
      delete-on-merge: true

Minimal Example:
publishers:
  - github-pull-request-merge

gitlab-message
Add note with build status on GitLab merge request. Requires the Jenkins GitLab Plugin.
Parameters
o failure-only (bool) -- make a comment only on failure (default false)
o success-note (bool) -- make a comment on GitLab Merge Request if build succeeds (default false)
o failure-note (bool) -- make a comment on GitLab Merge Request if build failed (default false)
o abort-note (bool) -- make a comment on GitLab Merge Request if build aborted (default false)
o unstable-note (bool) -- make a comment on GitLab Merge Request if build unstable (default false)
o success-note-text (str) -- text of comment on success build (default \(aq\(aq)
o failure-note-text (str) -- text of comment on failed build (default \(aq\(aq)
o abort-note-text (str) -- text of comment on aborted build (default \(aq\(aq)
o unstable-note-text (str) -- text of comment on unstable build (default \(aq\(aq)
Minimal Example:
publishers:
  - gitlab-message

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

gitlab-notifier
Set build status on GitLab commit. Requires the Jenkins GitLab Plugin.
Parameters
o name (str) -- The name of the build in GitLab. With this you can distinguish different Jenkins jobs for the same commit in GitLab. (default \(aqjenkins\(aq)
o mark-unstable-as-success (bool) -- (default false)
Minimal Example:
publishers:
  - gitlab-notifier

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

gitlab-vote
Set vote for build status on GitLab merge request. Requires the Jenkins GitLab Plugin.
Example:
publishers:
  - gitlab-vote

google-cloud-storage
Upload build artifacts to Google Cloud Storage. Requires the Jenkins Google Cloud Storage plugin.
Apart from the Google Cloud Storage Plugin itself, installation of Google OAuth Credentials and addition of required credentials to Jenkins is required.
Parameters
o credentials-id (str) -- The set of Google credentials registered with the Jenkins Credential Manager for authenticating with your project. (required)
o uploads (list) -- .INDENT 2.0
uploads
o
expiring-elements (dict)
params
o bucket-name (str) bucket name to upload artifacts (required)
o days-to-retain (int) days to keep artifacts (required)
o
build-log (dict)
params
o log-name (str) name of the file that the Jenkins console log to be named (required)
o storage-location (str) bucket name to upload artifacts (required)
o share-publicly (bool) whether to share uploaded share uploaded artifacts with everyone (default false)
o upload-for-failed-jobs (bool) whether to upload artifacts even if the build fails (default false)
o show-inline (bool) whether to show uploaded build log inline in web browsers, rather than forcing it to be downloaded (default true)
o strip-prefix (str) strip this prefix off the file names (default not set)
o
classic (dict)
params
o file-pattern (str) ant style globs to match the files to upload (required)
o storage-location (str) bucket name to upload artifacts (required)
o share-publicly (bool) whether to share uploaded share uploaded artifacts with everyone (default false)
o upload-for-failed-jobs (bool) whether to upload artifacts even if the build fails (default false)
o show-inline (bool) whether to show uploaded artifacts inline in web browsers, rather than forcing them to be downloaded (default false)
o strip-prefix (str) strip this prefix off the file names (default not set)
Example:
publishers:
    - google-cloud-storage:
        credentials-id: \(aqmyCredentials\(aq
        uploads:
            - expiring-elements:
                bucket-name: \(aqgs://myBucket\(aq
                days-to-retain: 7

Full example:
publishers:
    - google-cloud-storage:
        credentials-id: \(aqmyCredentials\(aq
        uploads:
            - expiring-elements:
                bucket-name: \(aqgs://myBucket\(aq
                days-to-retain: 7
            - build-log:
                log-name: \(aqconsole.log\(aq
                storage-location: \(aqgs://myBucket\(aq
                upload-for-failed-jobs: true
                share-publicly: true
            - classic:
                file-pattern: \(aqtarget/*.war\(aq
                storage-location: \(aqgs://myBucket\(aq
                upload-for-failed-jobs: true
            - classic:
                file-pattern: \(aq**/build/*.iso\(aq
                storage-location: \(aqgs://myBucket/artifacts/\(aq
                share-publicly: true
                strip-prefix: \(aqpath/to/\(aq

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
o script (str) -- The groovy script to execute
o classpath (list) -- List of additional classpaths (>=1.6)
o 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 \(aqnothing\(aq)
o matrix-parent (bool) -- Run script for matrix parent only (>=1.9) (default false)
o sandbox (bool) -- Execute script inside of groovy sandbox (>=2.0) (default false)
Example:
publishers:
    - groovy-postbuild:
        script: "manager.buildFailure()"
        classpath:
            - "file:///path/to/your/lib"
            - "file:///path/to/your/lib"
        on-failure: "failed"
        matrix-parent: true

growl Push notifications to growl client. Requires the Jenkins Growl Plugin.
Parameters
o ip (str) -- IP address to send growl notifications to (required)
o notify-only-on-fail-or-recovery (bool) -- send a growl only when build fails or recovers from a failure (default false)
Minimal Example:
publishers:
  - growl:
      ip: foo.ip.address

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

hipchat
Publisher that sends hipchat notifications on job events Requires the Jenkins Hipchat Plugin version >=1.9
Please see documentation for older plugin version http://docs.openstack.org/infra/jenkins-job-builder/hipchat.html
Parameters
o token (str) -- This will override the default auth token (optional)
o rooms (list) -- list of HipChat rooms to post messages to, overrides global default (optional)
o notify-start (bool) -- post messages about build start event (default false)
o notify-success (bool) -- post messages about successful build event (default false)
o notify-aborted (bool) -- post messages about aborted build event (default false)
o 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)
o notify-unstable (bool) -- post messages about unstable build event (default false)
o notify-failure (bool) -- post messages about build failure event (default false)
o notify-back-to-normal (bool) -- post messages about build being back to normal after being unstable or failed (default false)
o start-message (str) -- This will override the default start message (optional)
o complete-message (str) -- This will override the default complete message (optional)
Example:
publishers:
  - hipchat:
      token: auth
      rooms:
        - room1
        - room2
      notify-start: true
      notify-aborted: true
      start-message: job started
      complete-message: job completed

hp-alm Publish test results to HP-ALM.
Requires the Jenkins Micro Focus Application Automation Tools.
Parameters
o server-name (str) -- The name of the ALM Server. (required)
o credentials-id (str) -- credentials-id of the user (default \(aq\(aq)
o domaine (str) -- The Domain of the project to be used. (required)
o client-type (str) -- Client type is required for some ALM above 12.60 in authentication.(default \(aq\(aq)
o project (str) -- The project to be used. (required)
o testing-framework (str) -- The testing framework that is used when generate the testing result file. (default Junit)
o testing-tool (str) -- The testing tool that is used when generate the testing result file. (default \(aq\(aq)
o folder (str) -- The path of the test folder that will contain the uploaded test. The path doesn\(aqt include the Root test folder (Subject). For example, sampletestfolder/subfolder means, the tests will be uploaded to test folder named \(aqsubfolder\(aq, which is under the test folder named \(aqsampletestfolder\(aq, and \(aqsampletestfolder\(aq is under the root test folder \(aqSubject\(aq. (required)
o set-folder (str) -- The path of the testset folder that will contain the uploaded testset. The path doesn\(aqt include the Root testset folder. For example, sampletestsetfolder/subfolder means, the testsets will be uploaded to testset folder named \(aqsubfolder\(aq, which is under the testset folder named \(aqsampletestsetfolder\(aq, and \(aqsampletestsetfolder\(aq is under the root testset folder \(aqRoot\(aq. (required)
o testing-result-file (str) -- The condition to find the testing result file, start from the root path of the job. For example, **/junitResult.xml to find testing result file for Junit Plugin, **/testng-results.xml to find testing result file for TestNG plugin. (required)
o jenkins-server-url (str) -- The HTTP URL of the Jenkins Server, form example, http://myjenkinsserver.test.com:8080 . (optional)
Minimal example using defaults:
publishers:
  - hp-alm:
      server-name: HP-ALM
      domain: FOO_COMPANY
      project: foo_project
      folder: \(aqALM/foo/release1/test_case1\(aq
      set-folder: \(aqALM/foo/release1/test_case1/$env\(aq
      testing-result-file: \(aq**/junitResult.xml\(aq

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

html-publisher
This plugin publishes HTML reports.
Requires the Jenkins HTML Publisher Plugin.
Parameters
o name (str) -- Report name (required)
o dir (str) -- HTML directory to archive (required)
o files (str) -- Specify the pages to display (required)
o keep-all (bool) -- keep HTML reports for each past build (default false)
o allow-missing (bool) -- Allow missing HTML reports (default false)
o link-to-last-build (bool) -- If this and \(aqkeep-all\(aq both are true, it publishes the link on project level even if build failed. (default false)
Example:
publishers:
  - html-publisher:
      name: "some name"
      dir: "path/"
      files: "index.html"
      keep-all: true
      allow-missing: true
      link-to-last-build: true

hue-light
This plugin shows the state of your builds using the awesome Philips hue lights.
Requires the Jenkins hue-light Plugin.
Parameters
o light-id (int) -- ID of light. Define multiple lights by a comma as a separator (required)
o pre-build (string) -- Colour of building state (default \(aqblue\(aq)
o good-build (string) -- Colour of successful state (default \(aqgreen\(aq)
o unstable-build (string) -- Colour of unstable state (default \(aqyellow\(aq)
o bad-build (string) -- Colour of unsuccessful state (default \(aqred\(aq)
Full Example:
publishers:
  - hue-light:
      light-id: 123
      pre-build: yellow
      good-build: red
      unstable-build: blue
      bad-build: green

Minimal Example:
publishers:
  - hue-light:
      light-id: 123

image-gallery
Produce an image gallery using Javascript library. Requires the Jenkins Image Gallery Plugin.
Parameters
o gallery-type (str) -- .INDENT 2.0
gallery-type values
o archived-images-gallery (default)
o in-folder-comparative-gallery
o multiple-folder-comparative-gallery
o title (str) -- gallery title (optional)
o image-width (int) -- width of the image (optional)
o unstable-if-no-artifacts (bool) -- mark build as unstable if no archived artifacts were found (default false)
o includes (str) -- include pattern (valid for archived-images-gallery gallery)
o base-root-folder (str) -- base root dir (valid for comparative gallery)
o image-inner-width (int) -- width of the image displayed in the inner gallery popup (valid for comparative gallery, optional)
Example:
publishers:
    - image-gallery:
        - gallery-type: archived-images-gallery
          title: Gallery 1
          includes: path/images
          image-width: 100
          unstable-if-no-artifacts: true
        - gallery-type: in-folder-comparative-gallery
          title: Gallery 2
          base-root-folder: path/images2
          image-width: 321
          image-inner-width: 111
          unstable-if-no-artifacts: false
        - gallery-type: multiple-folder-comparative-gallery
          title: Gallery 3
          base-root-folder: path/images3
          image-width: 222
          image-inner-width: 1

influx-db
Requires the Jenkins :jenkins-wiki: Influx DB <Influx+DB+Plugin>.
ircbot ircbot enables Jenkins to send build notifications via IRC and lets you interact with Jenkins via an IRC bot.
Requires the Jenkins IRC Plugin.
Parameters
o strategy (string) --
When to send notifications
strategy values
o all always (default)
o any-failure on any failure
o failure-and-fixed on failure and fixes
o new-failure-and-fixed on new failure and fixes
o statechange-only only on state change
o notify-start (bool) -- Whether to send notifications to channels when a build starts (default false)
o notify-committers (bool) -- Whether to send notifications to the users that are suspected of having broken this build (default false)
o notify-culprits (bool) -- Also send notifications to \(aqculprits\(aq from previous unstable/failed builds (default false)
o notify-upstream (bool) -- Whether to send notifications to upstream committers if no committers were found for a broken build (default false)
o notify-fixers (bool) -- Whether to send notifications to the users that have fixed a broken build (default false)
o message-type (string) --
Channel Notification Message.
message-type values
o summary-scm for summary and SCM changes (default)
o summary for summary only
o summary-params for summary and build parameters
o summary-scm-fail for summary, SCM changes, failures)
o 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
o name (str) Channel name
o password (str) Channel password (optional)
o notify-only (bool) Set to true if you want to disallow bot commands (default false)
o 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
o all
o only-configurations (default)
o only-parent
Minimal Example:
publishers:
  - ircbot

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

jabber Integrates Jenkins with the Jabber/XMPP instant messaging protocol Requires the Jenkins Jabber Plugin.
Parameters
o notify-on-build-start (bool) -- Whether to send notifications to channels when a build starts (default false)
o notify-scm-committers (bool) -- Whether to send notifications to the users that are suspected of having broken this build (default false)
o notify-scm-culprits (bool) -- Also send notifications to \(aqculprits\(aq from previous unstable/failed builds (default false)
o notify-upstream-committers (bool) -- Whether to send notifications to upstream committers if no committers were found for a broken build (default false)
o notify-scm-fixers (bool) -- Whether to send notifications to the users that have fixed a broken build (default false)
o group-targets (list) -- List of group targets to notify
o individual-targets (list) -- List of individual targets to notify
o strategy (dict) --
When to send notifications (default all)
strategy values
o all -- Always
o failure -- On any failure
o failure-fixed -- On failure and fixes
o new-failure-fixed -- On new failure and fixes
o change -- Only on state change
o message (dict) --
Channel notification message (default summary-scm)
message values
o summary-scm -- Summary + SCM changes
o summary -- Just summary
o summary-build -- Summary and build parameters
o summary-scm-fail -- Summary, SCM changes, and failed tests
Minimal Example:
publishers:
  - jabber

Full Example:
publishers:
  - jabber:
      notify-on-build-start: true
      notify-scm-committers: true
      notify-scm-culprits: true
      notify-upstream-committers: true
      notify-scm-fixers: true
      group-targets:
        - ""
      individual-targets:
        - ""
      strategy: new-failure-fixed
      message: summary

jacoco Generate a JaCoCo coverage report. Requires the Jenkins JaCoCo Plugin.
Parameters
o exec-pattern (str) -- This is a file name pattern that can be used to locate the jacoco report files (default **/**.exec)
o class-pattern (str) -- This is a file name pattern that can be used to locate class files (default **/classes)
o source-pattern (str) -- This is a file name pattern that can be used to locate source files (default **/src/main/java)
o source-inclusion-pattern (str) -- This is a file name pattern that can be used to include certain source files (default **/*.java)
o update-build-status (bool) -- Update the build according to the results (default false)
o inclusion-pattern (str) -- This is a file name pattern that can be used to include certain class files (default \(aq\(aq)
o exclusion-pattern (str) -- This is a file name pattern that can be used to exclude certain class files (default \(aq\(aq)
o targets (dict) -- .INDENT 2.0
targets
(instruction, branch, complexity, line, method, class)
o healthy (int): Healthy threshold (default 0)
o unhealthy (int): Unhealthy threshold (default 0)
Minimal Example:
publishers:
  - jacoco

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

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

jclouds
JClouds Cloud Storage Settings provides a way to store artifacts on JClouds supported storage providers. Requires the Jenkins JClouds Plugin.
JClouds Cloud Storage Settings must be configured for the Jenkins instance.
Parameters
o profile (str) -- preconfigured storage profile (required)
o files (str) -- files to upload (regex) (required)
o basedir (str) -- the source file path (relative to workspace, Optional)
o container (str) -- the destination container name (required)
o hierarchy (bool) -- keep hierarchy (default false)
Example:
publishers:
  - jclouds:
      profile: hp
      files: \(aq*.tar.gz\(aq
      container: jenkins
      basedir: test base dir

jdepend
Publish jdepend report Requires the JDepend Plugin.
Parameters
file (str) -- path to jdepend file (required)
Example:
publishers:
  - jdepend:
      file: build/jdepend/main.xml

jira Update relevant JIRA issues Requires the Jenkins JIRA Plugin.
Example:
publishers:
  - jira

jms-messaging
The JMS Messaging Plugin provides the following functionality:
o A build trigger to submit jenkins jobs upon receipt of a matching message.
o A builder that may be used to submit a message to the topic upon the completion of a job
o A post-build action that may be used to submit a message to the topic upon the completion of a job
JMS Messaging provider types supported:
o ActiveMQ
o FedMsg
Requires the Jenkins JMS Messaging Plugin Pipeline Plugin.
Parameters
o override-topic (str) -- If you need to override the default topic. (default \(aq\(aq)
o provider-name (str) -- Name of message provider setup in the global config. (default \(aq\(aq)
o msg-type (str) -- A message type (default \(aqCodeQualityChecksDone\(aq)
o msg-props (str) -- Message header to publish. (default \(aq\(aq)
o msg-content (str) -- Message body to publish. (default \(aq\(aq)
Full Example:
publishers:
  - jms-messaging:
      override-topic: org.centos.stage.ci.pipeline.compose.complete
      provider-name: fedmsg
      msg-type: Custom
      msg-props: |
        topic=org.centos.prod.ci.pipeline.compose.complete
        username=fedora-atomic
      msg-content: |
        {
          "build_url": "${BUILD_URL}",
          "compose_url": "<full-url-to-compose>",
          "build_id": "${BUILD_ID}",
          "ref": "fedora/rawhide/${basearch}/atomic-host",
          "rev": "<sha of the commit from dist-git>",
          "namespace": "rpms",
          "repo": "php-simplepie",
          "status": "<success/failure/aborted>",
          "test_guidance": "<comma-separated-list-of-test-suites-to-run>"}

Minimal Example:
publishers:
  - jms-messaging:
      provider-name: fedmsg
      msg-type: CodeQualityChecksDone
      msg-props: test
      msg-content: test

join-trigger
Trigger a job after all the immediate downstream jobs have completed. Requires the Jenkins Join Plugin.
Parameters
o even-if-unstable (bool) -- if true jobs will trigger even if some downstream jobs are marked as unstable (default false)
o projects (list) -- list of projects to trigger
o publishers (list) -- list of triggers from publishers module that defines projects that need to be triggered
Example:
publishers:
  - join-trigger:
      projects:
        - project-one
        - project-two
      even-if-unstable: true
      publishers:
        - trigger-parameterized-builds:
          - project: archive
            current-parameters: true
            trigger-from-child-projects: true
            trigger-with-no-params: true
          - project: cleanup
            current-parameters: true
            trigger-with-no-params: false

junit Publish JUnit test results.
Parameters
o results (str) -- results filename (required)
o keep-long-stdio (bool) -- Retain long standard output/error in test results (default true).
o 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)
o allow-empty-results (bool) -- Do not fail the build on empty test results (default false)
o test-stability (bool) -- Add historical information about test results stability (default false). Requires the Jenkins Test stability Plugin.
o claim-build (bool) -- Allow claiming of failed tests (default false) Requires the Jenkins Claim Plugin.
o measurement-plots (bool) -- Create measurement plots (default false) Requires the Jenkins Measurement Plots Plugin.
o flaky-test-reports (bool) -- Publish flaky test reports (default false). Requires the Jenkins Flaky Test Handler Plugin.
o junit-attachments (bool) -- Publish test attachments (default false). Requires the Jenkins JUnit Attachments Plugin.
Minimal example using defaults:
publishers:
- junit:
    results: nosetests.xml

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

logparser
Requires the Jenkins Log Parser Plugin.
Parameters
o parse-rules (str) -- full path to parse rules (default \(aq\(aq)
o use-project-rules (bool) -- use project rules instead of global (default true)
o unstable-on-warning (bool) -- mark build unstable on warning (default false)
o fail-on-error (bool) -- mark build failed on error (default false)
o show-graphs (bool) -- show parser trend graphs (default true)
Minimal Example:
publishers:
  - logparser:
      parse-rules: "project-log-parser-rules.txt"

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

logstash
Send job\(aqs console log to Logstash for processing and analyis of your job data. Also stores test metrics from Junit. Requires the Jenkins Logstash Plugin.
Parameters
o max-lines (int) -- The maximum number of log lines to send to Logstash. (default 1000)
o 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
o id (str) -- Repository ID
o url (str) -- Repository URL (optional)
o unique-version (bool) -- Assign unique versions to snapshots (default true)
o deploy-unstable (bool) -- Deploy even if the build is unstable (default false)
o release-env-var (str) -- If the given variable name is set to "true", the deploy steps are skipped. (optional)
Example:
publishers:
  - maven-deploy:
      id: example
      url: http://repo.example.com/maven2/
      unique-version: true
      deploy-unstable: false
      release-env-var: TIMER

mqtt This plugin lets you send build notifications to a MQTT message queue. Requires the MQTT Notification Plugin.
Parameters
o broker-url (str) -- the broker URL, as protocol://address:port (required)
o credentials-id (str) -- credentials to use to connect to the broker (optional)
o topic (str) -- the message topic (default "jenkins/$PROJECT_URL")
o message (str) -- the message itself (default "$BUILD_RESULT")
o qos (str) -- one of AT_MOST_ONCE, AT_LEAST_ONCE, or EXACTLY_ONCE (default AT_MOST_ONCE)
o retain-message (bool) -- whether to resend message or not when a new client connects (default false)
Minimal Example:
publishers:
  - mqtt:
      broker-url: tcp://localhost:1883

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

naginator
Automatically reschedule a build after a build failure Requires the Jenkins Naginator Plugin.
Parameters
o rerun-unstable-builds (bool) -- Rerun build for unstable builds as well as failures (default false)
o rerun-matrix-part (bool) -- Rerun build only for failed parts on the matrix (>=1.12) (default false)
o fixed-delay (int) -- Fixed delay in seconds before retrying build (cannot be used with progressive-delay-increment or progressive-delay-maximum. This is the default delay type. (default 0)
o progressive-delay-increment (int) -- Progressive delay in seconds before retrying build increment (cannot be used when fixed-delay is being used) (default 0)
o progressive-delay-maximum (int) -- Progressive delay in seconds before retrying maximum delay (cannot be used when fixed-delay is being used) (default 0)
o max-failed-builds (int) -- Maximum number of successive failed builds (default 0)
o regular-expression (str) -- Only rerun build if regular expression is found in output (default \(aq\(aq)
Example:
publishers:
  - naginator:
      rerun-unstable-builds: true
      rerun-matrix-part: true
      progressive-delay-increment: 5
      progressive-delay-maximum: 15
      max-failed-builds: 6
      regular-expression: "foo"

openshift-build-canceller
This action is intended to provide cleanup for a Jenkins job which failed because a build is hung (instead of terminating with a failure code); this step will allow you to perform the equivalent of a oc cancel-build for the provided build config; any builds under that build config which are not previously terminated (either successfully or unsuccessfully) or cancelled will be cancelled. Requires the Jenkins OpenShift Pipeline Plugin.
Parameters
o api-url (str) -- this would be the value you specify if you leverage the --server option on the OpenShift oc command. (default \(aqhttps://openshift.default.svc.cluster.local\(aq)
o bld-cfg (str) -- The value here should be whatever was the output form oc project when you created the BuildConfig you want to run a Build on (default \(aqfrontend\(aq)
o namespace (str) -- If you run oc get bc for the project listed in "namespace", that is the value you want to put here. (default \(aqtest\(aq)
o auth-token (str) -- The value here is what you supply with the --token option when invoking the OpenShift oc command. (default \(aq\(aq)
o verbose (bool) -- This flag is the toggle for turning on or off detailed logging in this plug-in. (default false)
Full Example:
publishers:
  - openshift-build-canceller:
      api-url: https://openshift.example.local.url/
      bld-cfg: front
      namespace: test-build
      auth-token: ose-key-canceller1
      verbose: true

Minimal Example:
publishers:
  - openshift-build-canceller

openshift-deploy-canceller
This action is intended to provide cleanup for any OpenShift deployments left running when the Job completes; this step will allow you to perform the equivalent of a oc deploy --cancel for the provided deployment config. Requires the Jenkins OpenShift Pipeline Plugin.
Parameters
o api-url (str) -- this would be the value you specify if you leverage the --server option on the OpenShift oc command. (default \(aqhttps://openshift.default.svc.cluster.local\(aq)
o dep-cfg (str) -- The value here should be whatever was the output form oc project when you created the BuildConfig you want to run a Build on (default frontend)
o namespace (str) -- If you run oc get bc for the project listed in "namespace", that is the value you want to put here. (default \(aqtest\(aq)
o auth-token (str) -- The value here is what you supply with the --token option when invoking the OpenShift oc command. (default \(aq\(aq)
o verbose (bool) -- This flag is the toggle for turning on or off detailed logging in this plug-in. (default false)
Full Example:
publishers:
  - openshift-deploy-canceller:
      api-url: https://openshift.example.local.url/
      dep-cfg: front
      namespace: test6
      auth-token: ose-key-dep-canceller1
      verbose: true

Minimal Example:
publishers:
  - openshift-deploy-canceller

packer This plugin allows for a job to publish an image generated Packer Requires the Jenkins Packer Plugin.
Parameters
o name (str) -- Name of the packer installation (required)
o json-template (str) -- Path to a Packer JSON template file (default \(aq\(aq)
o json-template-text (str) -- Text of Packer JSON template (default \(aq\(aq)
o add-params (str) -- Specify which additional parameters to pass to packer (default \(aq\(aq)
o use-debug (bool) -- adds -debug argument when packer executes (default false)
o change-dir (str) -- If set, the current directory will be changed to this before starting packer (default \(aq\(aq)
o template-mode (str) --
Packer template option used (default global)
template-mode values
o global
o file
o text
o file-entries (list) -- File entries for the packer configuration (default [])
o variable-name (str) -- Variable name for a file to used in the configuration JSON (default \(aq\(aq)
o contents (str) -- File contents of the configuration JSON (default \(aq\(aq)
Minimal Example:
publishers:
  - packer:
      name: test name

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

performance
Publish performance test results from jmeter and junit. Requires the Jenkins Performance Plugin.
Parameters
o failed-threshold (int) -- Specify the error percentage threshold that set the build failed. A negative value means don\(aqt use this threshold (default 0)
o unstable-threshold (int) -- Specify the error percentage threshold that set the build unstable. A negative value means don\(aqt use this threshold (default 0)
o unstable-response-time-threshold (str) -- Average response time threshold (default \(aq\(aq)
o failed-threshold-positive (float) -- Maximum failed percentage for build comparison (default 0.0)
o failed-threshold-negative (float) -- Minimum failed percentage for build comparison (default 0.0)
o unstable-threshold-positive (float) -- Maximum unstable percentage for build comparison (default 0.0)
o unstable-threshold-negative (float) -- Minimum unstable percentage for build comparison (default 0.0)
o nth-build-number (int) -- Build number for build comparison (default 0)
o mode-relative-thresholds (bool) -- Relative threshold mode (default false)
o config-type (str) --
Compare based on (default \(aqART\(aq)
config-type values
o ART -- Average Response Time
o MRT -- Median Response Time
o PRT -- Percentile Response Time
o mode-of-threshold (bool) -- Mode of threshold, true for relative threshold and false for error threshold (default false)
o fail-build (bool) -- Fail build when result files are not present (default false)
o compare-build-previous (bool) -- Compare with previous build (default false)
o mode-performance-per-test-case (bool) -- Performance Per Test Case Mode (default true)
o mode-thoughput (bool) -- Show Throughput Chart (default false)
o report (dict) -- .INDENT 2.0
(jmeter or junit)
(dict or str): Specify a custom report file (optional; jmeter default **/.jtl, junit default */TEST-*.xml)
Minimal Example:
publishers:
  - performance

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

phabricator
Integrate with Phabricator
Requires the Jenkins Phabricator Plugin.
Parameters
o comment-on-success (bool) -- Post a comment when the build succeeds. (optional)
o uberalls-enabled (bool) -- Integrate with uberalls. (optional)
o comment-file (str) -- Include contents of given file if commenting is enabled. (optional)
o comment-size (int) -- Maximum comment character length. (optional)
o comment-with-console-link-on-failure (bool) -- Post a comment when the build fails. (optional)
Example:
publishers:
  - phabricator:
      comment-on-success: false
      uberalls-enabled: false
      comment-with-console-link-on-failure: false

pipeline
Specify a downstream project in a pipeline. Requires the Jenkins Build Pipeline Plugin.
Use of the node-label-name or node-label parameters requires the Jenkins NodeLabel Parameter Plugin. Note: \(aqnode-parameters\(aq overrides the Node that the triggered project is tied to.
Parameters
o projects (list) -- list the jobs to trigger, will generate comma-separated string containing the named jobs.
o predefined-parameters (str) -- parameters to pass to the other job (optional)
o current-parameters (bool) -- Whether to include the parameters passed to the current build to the triggered job (optional)
o node-parameters (bool) -- Use the same Node for the triggered builds that was used for this build. (optional)
o svn-revision (bool) -- Pass svn revision to the triggered job (optional)
o include-upstream (bool) -- Include/pass through Upstream SVN Revisons. Only valid when \(aqsvn-revision\(aq is true. (default false)
o git-revision (dict) --
Passes git revision to the triggered job (optional).
o combine-queued-commits (bool): Whether to combine queued git hashes or not (default false)
o boolean-parameters (dict) -- Pass boolean parameters to the downstream jobs. Specify the name and boolean value mapping of the parameters. (optional)
o property-file (str) -- Use properties from file (optional)
o fail-on-missing (bool) -- Blocks the triggering of the downstream jobs if any of the property files are not found in the workspace. Only valid when \(aqproperty-file\(aq is specified. (default false)
o file-encoding (str) -- Encoding of contents of the files. If not specified, default encoding of the platform is used. Only valid when \(aqproperty-file\(aq is specified. (optional)
o restrict-matrix-project (str) -- Filter that restricts the subset of the combinations that the downstream project will run (optional)
Example:
publishers:
  - pipeline:
      project: test_project
      current-parameters: true
      predefined-parameters: foo=bar

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

You can build pipeline jobs that are re-usable in different pipelines by using a job-template to define the pipeline jobs, and variable substitution to specify the name of the downstream job in the pipeline. Job-specific substitutions are useful here (see project).
See \(aqsamples/pipeline.yaml\(aq for an example pipeline implementation.
plot Plot provides generic plotting (or graphing).
Requires the Jenkins Plot Plugin.
Parameters
o title (str) -- title for the graph (default \(aq\(aq)
o yaxis (str) -- title of Y axis (default \(aq\(aq)
o width (int) -- the width of the plot in pixels (default 750)
o height (int) -- the height of the plot in pixels (default 450)
o group (str) -- name of the group to which the plot belongs (required)
o num-builds (int) -- number of builds to plot across (default plot all builds)
o style (str) -- Specifies the graph style of the plot Can be: area, bar, bar3d, line, line3d, stackedArea, stackedbar, stackedbar3d, waterfall (default \(aqline\(aq)
o 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)
o 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)
o logarithmic-yaxis (bool) -- When true, the Y-axis will use a logarithmic scale. By default, the Y-axis uses a linear scale. (default false)
o keep-records (bool) -- When true, show all builds up to \(aqNumber of builds to include\(aq. (default false)
o 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)
o series (list) --
list data series definitions
Series
o file (str) : files to include
o inclusion-flag filtering mode for CSV files. Possible values are:
o off (default)
o include-by-string
o exclude-by-string
o include-by-column
o exclude-by-column
o exclude (str) : exclude pattern for CSV file.
o url (str) : for \(aqcsv\(aq and \(aqxml\(aq file types used when you click on a point (default empty)
o display-table (bool) : for \(aqcsv\(aq file type if true, original CSV will be shown above plot (default false)
o label (str) : used by \(aqproperties\(aq file type Specifies the legend label for this data series. (default empty)
o format (str) : Type of file where we get datas. Can be: properties, csv, xml
o 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 \(aqnode\(aq)
o xpath (str) : used by \(aqxml\(aq file type Xpath which selects the values that should be plotted.
Minimal Example:
publishers:
  - plot:
      - yaxis: \(aq\(aq
        group: \(aqbench\(aq
        series:
            - file: \(aqdata.csv\(aq
              format: \(aqcsv\(aq

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

pmd Publish trend reports with PMD. Requires the Jenkins PMD Plugin.
The PMD component accepts a dictionary with the following values:
Parameters
o pattern (str) -- Report filename pattern (optional)
o can-run-on-failed (bool) -- Also runs for failed builds, instead of just stable or unstable builds (default false)
o should-detect-modules (bool) -- Determines if Ant or Maven modules should be detected for all files that contain warnings (default false)
o healthy (int) -- Sunny threshold (optional)
o unhealthy (int) -- Stormy threshold (optional)
o health-threshold (str) -- Threshold priority for health status (\(aqlow\(aq, \(aqnormal\(aq or \(aqhigh\(aq, defaulted to \(aqlow\(aq)
o thresholds (dict) --
Mark build as failed or unstable if the number of errors exceeds a threshold. (optional)
thresholds
o
unstable (dict)
unstable
o total-all (int)
o total-high (int)
o total-normal (int)
o total-low (int)
o new-all (int)
o new-high (int)
o new-normal (int)
o new-low (int)
o
failed (dict)
failed
o total-all (int)
o total-high (int)
o total-normal (int)
o total-low (int)
o new-all (int)
o new-high (int)
o new-normal (int)
o new-low (int)
o default-encoding (str) -- Encoding for parsing or showing files (optional)
o do-not-resolve-relative-paths (bool) -- (default false)
o dont-compute-new (bool) -- If set to false, computes new warnings based on the reference build (default true)
o use-previous-build-as-reference (bool) -- determines whether to always use the previous build as the reference build (default false)
o 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)
o 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: \(aq**/pmd-result.xml\(aq
    healthy: 0
    unhealthy: 100
    health-threshold: \(aqhigh\(aq
    thresholds:
        unstable:
            total-high: 10
        failed:
            total-high: 1

Full example:
publishers:
 - pmd:
    pattern: \(aq**/pmd-result.xml\(aq
    can-run-on-failed: true
    should-detect-modules: true
    healthy: 0
    unhealthy: 100
    health-threshold: \(aqhigh\(aq
    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: \(aqutf-8\(aq

post-tasks
Adds support to post build task plugin
Requires the Jenkins Post Build Task plugin.
Parameters
o task (dict) -- Post build task definition
o task[matches] (list) -- list of matches when to run the task
o task[matches][*] (dict) -- match definition
o task[matches][*][log-text] (str) -- text to match against the log
o task[matches][*][operator] (str) --
operator to apply with the next match
task[matches][*][operator] values (default \(aqAND\(aq)
o AND
o OR
o task[escalate-status] (bool) -- Escalate the task status to the job (default \(aqfalse\(aq)
o task[run-if-job-successful] (bool) -- Run only if the job was successful (default \(aqfalse\(aq)
o task[script] (str) -- Shell script to run (default \(aq\(aq)
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
o generic-script (list) --
Series of Batch/Shell scripts to to run
generic-script
o file-path (str) - Path to Batch/Shell scripts
o role (str) - Execute scripts on. One of MASTER / SLAVE / BOTH. (default \(aqBOTH\(aq)
o build-on (list) - Build statuses which trigger the scripts. Valid options: SUCCESS / UNSTABLE / FAILURE / NOT_BUILT / ABORTED (default \(aqSUCCESS\(aq)
o groovy-script (list) --
Paths to Groovy scripts
groovy-script
o file-path (str) - Path to Groovy scripts
o role (str) - Execute scripts on. One of MASTER / SLAVE / BOTH. (default \(aqBOTH\(aq)
o build-on (list) - Build statuses which trigger the scripts. Valid options: SUCCESS / UNSTABLE / FAILURE / NOT_BUILT / ABORTED (default \(aqSUCCESS\(aq)
o groovy (list) --
Inline Groovy
groovy
o content (str) - Inline Groovy script.
o role (str) - Execute scripts on. One of MASTER / SLAVE / BOTH. (default \(aqBOTH\(aq)
o build-on (list) - Build statuses which trigger the scripts. Valid options: SUCCESS / UNSTABLE / FAILURE / NOT_BUILT / ABORTED (default \(aqSUCCESS\(aq)
o builders (list) --
Execute any number of supported Jenkins builders.
builders
o build-steps (str) - Any supported builders, see builders.
o role (str) - Execute scripts on. One of MASTER / SLAVE / BOTH. (default \(aqBOTH\(aq)
o build-on (list) - Build statuses which trigger the scripts. Valid options: SUCCESS / UNSTABLE / FAILURE / NOT_BUILT / ABORTED (default \(aqSUCCESS\(aq)
o mark-unstable-if-failed (bool) -- Build will be marked unstable if job will be successfully completed but publishing script will return non zero exit code (default false)
Deprecated Options for versions < 2.0 of plugin:
Parameters
o onsuccess (bool) -- Deprecated, replaced with script-only-if-succeeded
o script-only-if-succeeded (bool) -- Scripts and builders are run only if the build succeeded (default true)
o onfailure (bool) -- Deprecated, replaced with script-only-if-failed
o script-only-if-failed (bool) -- Scripts and builders are run only if the build failed (default false)
o execute-on (str) -- For matrix projects, scripts can be run after each axis is built (axes), after all axis of the matrix are built (matrix) or after each axis AND the matrix are built (both).
The script-only-if-succeeded and bool script-only-if-failed options are confusing. If you want the post build to always run regardless of the build status, you should set them both to false.
Minimal Example:
publishers:
    - postbuildscript

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

builders: - role: MASTER build-on: - SUCCESS - UNSTABLE build-steps: - shell: \(aqecho "Hello world!"\(aq - role: SLAVE build-on: - NOT_BUILT - ABORTED - FAILURE build-steps: - shell: \(aqecho "Hello world!"\(aq - shell: \(aqecho "Goodbye world!"\(aq
Example(s) versions < 2.0:
publishers:
    - postbuildscript:
        generic-script:
            - \(aq/tmp/one.sh\(aq
            - \(aq/tmp/two.sh\(aq
        groovy-script:
            - \(aq/tmp/one.groovy\(aq
            - \(aq/tmp/two.groovy\(aq
        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: \(aqecho "Shell execution"\(aq
            - ant: \(aqant_target\(aq

Run once after the whole matrix (all axes) is built:
publishers:
    - postbuildscript:
        execute-on: \(aqmatrix\(aq
        builders:
            - shell: \(aqecho "Shell execution"\(aq

publishers-from
Use publishers from another project. Requires the Jenkins Template Project Plugin.
Parameters
project-name (str) -- The name of the other project.
Example:
publishers:
  - publishers-from:
      project-name: base-build

rich-text-publisher
This plugin puts custom rich text message to the Build pages and Job main page.
Requires the Jenkins Rich Text Publisher Plugin.
Parameters
o stable-text (str) -- The stable text (required)
o unstable-text (str) -- The unstable text if different from stable (default \(aq\(aq)
o unstable-as-stable (bool) -- The same text block is used for stable and unstable builds (default true)
o failed-text (str) -- The failed text if different from stable (default \(aq\(aq)
o failed-as-stable (bool) -- The same text block is used for stable and failed builds (default true)
o parser-name (str) -- HTML, Confluence or WikiText (default \(aqWikiText\(aq)
Minimal Example:
publishers:
    - rich-text-publisher:
        stable-text: testing

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

robot Adds support for the Robot Framework Plugin
Requires the Jenkins Robot Framework Plugin.
Parameters
o output-path (str) -- Path to directory containing robot xml and html files relative to build workspace. (required)
o log-file-link (str) -- Name of log or report file to be linked on jobs front page (default \(aq\(aq)
o report-html (str) -- Name of the html file containing robot test report (default \(aqreport.html\(aq)
o log-html (str) -- Name of the html file containing detailed robot test log (default \(aqlog.html\(aq)
o output-xml (str) -- Name of the xml file containing robot output (default \(aqoutput.xml\(aq)
o pass-threshold (str) -- Minimum percentage of passed tests to consider the build successful (default 0.0)
o unstable-threshold (str) -- Minimum percentage of passed test to consider the build as not failed (default 0.0)
o only-critical (bool) -- Take only critical tests into account when checking the thresholds (default true)
o other-files (list) -- list other files to archive (default \(aq\(aq)
o archive-output-xml (bool) -- Archive output xml file to server (default true)
o enable-cache (bool) -- Enable cache for test results (default true)
Minimal Example:
publishers:
  - robot:
      output-path: reports/robot

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

rocket RocketChat notification on build completion, Requires the RocketChat Notifier Plugin.
Parameters
o channel (str) -- Comma separated list of rooms (e.g. #project) or persons (e.g. @john)
o abort (bool) -- Notify abort (default false)
o start (bool) -- Notify start (default false)
o success (bool) -- Notify success (default false)
o failure (bool) -- Notify failure (default false)
o repeated-failure (bool) -- Notify repeated failure (default false)
o back-to-normal (bool) -- Notify back to normal (default false)
o not-built (bool) -- Notify if not built (default false)
o unstable (bool) -- Notify if unstable (default false)
o webhook-token (str) -- Webhook token for posting messages. Overrides global authentication data and channel
o commit-info (str) --
What commit information to include into notification message.
commit-info values
o none
o authors
o authors-and-titles
o custom-message (str) -- Custom text message (default \(aq\(aq)
o trust-ssl (bool) -- Trust RocketChat server certificate, if checked, the SSL certificate will not be checked (default false)
o build-server (str) -- Build Server URL
o attachments (list) --
Optional list of attachments
attachments
o title (str) Attachment title (required)
o title-link (str)
o title-link-download (bool)
o color (str)
o text (str)
o collapsed (bool)
o message-link (str)
o author-name (str)
o author-link (str)
o author-icon (str)
o thumb (str) Thumb URL
o image (str) Image URL
o audio (str) Audio URL
o video (str) Video URL
Minimal example using defaults:
publishers:
- rocket:
    channel: \(aq\(aq

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

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
o report-dir (str) -- Relative path to the coverage report directory
o targets (dict) -- .INDENT 2.0
targets
(total-coverage, code-coverage)
o healthy (int): Healthy threshold
o unhealthy (int): Unhealthy threshold
o 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
o 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"
o options (str) -- List of options for the Rundeck job, in Java-Properties format: key=value (default "")
o node-filters (str) -- List of filters to optionally filter the nodes included by the job. (default "")
o 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 "")
o 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)
o 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
o s3-profile (str) -- Globally-defined S3 profile to use
o dont-wait-for-concurrent-builds (bool) -- Don\(aqt wait for completion of concurrent builds before publishing to S3 (default false)
o entries (list) -- .INDENT 2.0
entries
o destination-bucket (str) - Destination S3 bucket
o source-files (str) - Source files (Ant glob syntax)
o storage-class (str) - S3 storage class; one of "STANDARD" or "REDUCED_REDUNDANCY"
o bucket-region (str) - S3 bucket region (capitalized with underscores)
o upload-on-failure (bool) - Upload files even if the build failed (default false)
o upload-from-slave (bool) - Perform the upload directly from the Jenkins slave rather than the master node. (default false)
o managed-artifacts (bool) - Let Jenkins fully manage the published artifacts, similar to when artifacts are published to the Jenkins master. (default false)
o s3-encryption (bool) - Use S3 AES-256 server side encryption support. (default false)
o 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)
o metadata-tags (list) -- .INDENT 2.0
metadata-tags
o 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).
o value Metadata value associated with the key. Can contain macros.
Example:
publishers:
  - s3:
      s3-profile: banana
      dont-wait-for-concurrent-builds: true
      entries:
        - destination-bucket: herp-derp
          source-files: \(aqbargle_${BUILD_ID}.tgz\(aq
          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
o mark-unstable (bool) -- Mark build as unstable if the number of bugs exceeds a threshold (default false)
o threshold (int) -- Threshold for marking builds as unstable (default 0)
o exclude-paths (string) -- Comma separated paths to exclude from reports (>=1.5) (default \(aq\(aq)
o report-folder (string) -- Folder where generated reports are located (>=1.7) (default \(aqclangScanBuildReports\(aq)
Full Example:
publishers:
  - scan-build:
      mark-unstable: true
      threshold: 50
      exclude-paths: external-lib
      report-folder: scan-build-report

Minimal Example:
publishers:
  - scan-build

scoverage
Publish scoverage results as a trend graph. Requires the Jenkins Scoverage Plugin.
Parameters
o report-directory (str) -- This is a directory that specifies the locations where the xml scoverage report is generated (required)
o report-file (str) -- This is a file name that is given to the xml scoverage report (required)
Example:
publishers:
  - scoverage:
      report-directory: target/scala-2.10/scoverage-report/
      report-file: scoverage.xml

scp Upload files via SCP Requires the Jenkins SCP Plugin.
When writing a publisher macro, it is important to keep in mind that Jenkins uses Ant\(aqs 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\(aqt work... Destination points to destination folder on remote site. It will be created if doesn\(aqt 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
o site (str) -- name of the scp site (required)
o target (str) -- destination directory (required)
o source (str) -- source path specifier (default \(aq\(aq)
o keep-hierarchy (bool) -- keep the file hierarchy when uploading (default false)
o copy-after-failure (bool) -- copy files even if the job fails (default false)
o copy-console (bool) -- copy the console log (default false); if specified, omit \(aqsource\(aq
Example:
publishers:
  - scp:
      site: \(aqexample.com\(aq
      files:
        - target: \(aqdest/dir\(aq
          source: \(aqbase/source/dir/**\(aq
          keep-hierarchy: true
          copy-after-failure: true

shining-panda
Publish coverage.py results. Requires the Jenkins ShiningPanda Plugin.
Parameters
html-reports-directory (str) -- path to coverage.py html results (optional)
Example:
publishers:
  - shining-panda:
      html-reports-directory: foo/bar/coveragepy_html_report/

sitemonitor
This plugin checks the availability of an url.
It requires the sitemonitor plugin.
Parameters
sites (list) -- List of URLs to check
Minimal Example:
publishers:
  - sitemonitor

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

slack Publisher that sends slack notifications on job events.
Requires the Jenkins Slack Plugin
When using Slack Plugin version < 2.0, Slack Plugin itself requires a publisher as well as properties please note that you have to create those too. When using Slack Plugin version >= 2.0, you should only configure the publisher.
For backward compatibility, the publisher needs to query version of the Slack Plugin. Hence the query_plugins_info parameter shouldn\(aqt be set to False in the jenkins section of the configuration file.
Parameters
o team-domain (str) -- Your team\(aqs domain at slack. (default \(aq\(aq)
o auth-token (str) -- The integration token to be used when sending notifications. (default \(aq\(aq)
o auth-token-id (str) -- Allows credentials to be stored in Jenkins. (default \(aq\(aq)
o build-server-url (str) -- Specify the URL for your server installation. (default \(aq/\(aq)
o room (str) -- A comma separated list of rooms / channels to post the notifications to. (default \(aq\(aq)
o notify-start (bool) -- Send notification when the job starts (>=2.0). (default false)
o notify-success (bool) -- Send notification on success (>=2.0). (default false)
o notify-aborted (bool) -- Send notification when job is aborted (>=2.0). (default false)
o notify-not-built (bool) -- Send notification when job set to NOT_BUILT status (>=2.0). (default false)
o notify-unstable (bool) -- Send notification when job becomes unstable (>=2.0). (default false)
o notify-failure (bool) -- Send notification when job fails for the first time (previous build was a success) (>=2.0). (default false)
o notify-every-failure (bool) -- Send notification everytime a job fails (>=2.23). (default false)
o notify-back-to-normal (bool) -- Send notification when job is succeeding again after being unstable or failed (>=2.0). (default false)
o notify-repeated-failure (bool) -- Send notification when job fails successively (previous build was also a failure) (>=2.0). (default false)
o notify-regression (bool) -- Send notification when number of failed tests increased or the failed tests are different than previous build (>=2.2). (default false)
o include-failed-tests (bool) -- includes all failed tests when some tests failed. does nothing if no failed tests were found (>=2.2). (default false)
o include-test-summary (bool) -- Include the test summary (>=2.0). (default false)
o commit-info-choice (str) -- What commit information to include into notification message, "NONE" includes nothing about commits, "AUTHORS" includes commit list with authors only, and "AUTHORS_AND_TITLES" includes commit list with authors and titles (>=2.0). (default "NONE")
o include-custom-message (bool) -- Include a custom message into the notification (>=2.0). (default false)
o custom-message (str) -- Custom message to be included (>=2.0). (default \(aq\(aq)
o auth-token-credential-id (str) -- The ID for the integration token from the Credentials plugin to be used to send notifications to Slack. (>=2.1) (default \(aq\(aq)
o bot-user (bool) -- This option indicates the token belongs to a bot user in Slack. (>=2.2) (default False)
o base-url (str) -- Your Slack compatible Base URL. bot-user is not supported with Base URL. (>=2.2) (default \(aq\(aq)
Example (version < 2.0):
publishers:
  - slack:
      room: \(aq#builds\(aq
      team-domain: \(aqteamname\(aq
      auth-token: \(aqyourauthtoken\(aq
      auth-token-id: \(aqyourauthtokenid\(aq

Minimal example (version >= 2.0):
publishers:
  - slack

Full example (version >= 2.0):
publishers:
  - slack:
      team-domain: \(aqteamname\(aq
      auth-token: \(aqyourauthtoken\(aq
      auth-token-id: \(aqyourauthtokenid\(aq
      build-server-url: \(aqhttp://localhost:8081\(aq
      room: \(aq#builds\(aq
      notify-start: True
      notify-success: True
      notify-aborted: True
      notify-not-built: True
      notify-unstable: True
      notify-failure: True
      notify-every-failure: True
      notify-back-to-normal: True
      notify-repeated-failure: True
      notify-regression: True
      include-test-summary: True
      include-failed-tests: True
      commit-info-choice: \(aqAUTHORS_AND_TITLES\(aq
      include-custom-message: True
      custom-message: \(aqA custom message.\(aq
      auth-token-credential-id: yourauthtoken
      bot-user: True
      base-url: https://hooks.slack.com/services/

sloccount
Generates the trend report for SLOCCount
Requires the Jenkins SLOCCount Plugin.
Parameters
o 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 \(aq**/sloccount.sc\(aq)
o charset (str) -- The character encoding to be used to read the SLOCCount result files. (default \(aqUTF-8\(aq)
o builds-in-graph (int) -- Maximal number of last successful builds, that are displayed in the trend graphs. (default 0)
o comment-is-code (bool) -- This option is considered only in the cloc report parser and is ignored in the SLOCCount one. (default false)
o ignore-build-failure (bool) -- Try to process the report files even if the build is not successful. (default false)
Minimal Example:
publishers:
  - sloccount

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

sonar Sonar plugin support. Requires the Jenkins Sonar Plugin.
Parameters
o installation-name (str) -- name of the Sonar instance to use (optional)
o jdk (str) -- JDK to use (inherited from the job if omitted). (optional)
o branch (str) -- branch onto which the analysis will be posted (default \(aq\(aq)
o language (str) -- source code language (default \(aq\(aq)
o root-pom (str) -- Root POM (default \(aqpom.xml\(aq)
o private-maven-repo (bool) -- If true, use private Maven repository. (default false)
o maven-opts (str) -- options given to maven (default \(aq\(aq)
o additional-properties (str) -- sonar analysis parameters (default \(aq\(aq)
o maven-installation-name (str) -- the name of the Maven installation to use (optional)
o skip-global-triggers (dict) -- .INDENT 2.0
Triggers
o skip-when-scm-change (bool): skip analysis when build triggered by scm (default false)
o skip-when-upstream-build (bool): skip analysis when build triggered by an upstream build (default false)
o skip-when-envvar-defined (str): skip analysis when the specified environment variable is set to true (default \(aq\(aq)
o settings (str) -- Path to use as user settings.xml. It is possible to provide a ConfigFileProvider settings file, see Example below. (optional)
o global-settings (str) -- Path to use as global settings.xml. It is possible to provide a ConfigFileProvider settings file, see Example below. (optional)
Requires the Jenkins Config File Provider Plugin for the Config File Provider "settings" and "global-settings" config.
This publisher supports the post-build action exposed by the Jenkins Sonar Plugin, which is triggering a Sonar Analysis with Maven.
Minimal Example:
publishers:
  - sonar

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

sounds Play audio clips locally through sound hardware, remotely by piping them through an operating system command, or simultaneously through all browsers on a Jenkins page.
Requires the Jenkins Jenkins Sounds plugin
Parameters
o success (dict) --
Play on success
success
o sound (str) - Sound name
o
from (list) - Previous build result (default is all)
from values
o success
o unstable
o failure
o not_build
o aborted
o unstable (dict) -- Play on unstable. Specifying sound and conditions see above.
o failure (dict) -- Play on failure. Specifying sound and conditions see above.
o not_build (dict) -- Play on not build. Specifying sound and conditions see above.
o aborted (dict) -- Play on aborted. Specifying sound and conditions see above.
Minimal example using defaults:
publishers:
- sounds:
    failure:
      sound: EXPLODE

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

ssh Upload files via SCP. Requires the Jenkins Publish over SSH Plugin.
Parameters
o site (str) -- name of the ssh site
o target (str) -- destination directory
o target-is-date-format (bool) -- whether target is a date format. If true, raw text should be quoted (default false)
o clean-remote (bool) -- should the remote directory be deleted before transferring files (default false)
o source (str) -- source path specifier
o command (str) -- a command to execute on the remote server (optional)
o timeout (int) -- timeout in milliseconds for the Exec command (optional)
o use-pty (bool) -- run the exec command in pseudo TTY (default false)
o excludes (str) -- excluded file pattern (optional)
o remove-prefix (str) -- prefix to remove from uploaded file paths (optional)
o fail-on-error (bool) -- fail the build if an error occurs (default false).
o always-publish-from-master (bool) -- transfer the files through the master before being sent to the remote server (defaults false)
o flatten (bool) -- only create files on the server, don\(aqt create directories (default false).
o verbose (bool) -- adds lots of detail useful for debug to the console but generally should be left off (default false)
o retries (int) -- the number of times to retry this server in the event of failure (optional)
o retry-delay (int) -- the time to wait, in milliseconds, before attempting another transfer (default 10000)
Minimal Example:
publishers:
  - ssh:
      site: \(aqserver.example.com\(aq
      target: \(aqdest/dir/\(aq
      source: \(aqbase/source/dir/**\(aq

Full Example:
publishers:
  - ssh:
      site: \(aqserver.example.com\(aq
      target: "\(aqdest/dir/\(aqyyyyMMddHHmmss"
      target-is-date-format: true
      clean-remote: true
      source: \(aqbase/source/dir/**\(aq
      command: \(aqrm -r jenkins_$BUILD_NUMBER\(aq
      timeout: 1800000
      use-pty: true
      excludes: \(aq**/*.excludedfiletype\(aq
      remove-prefix: \(aqbase/source/dir\(aq
      fail-on-error: true
      always-publish-from-master: true
      flatten: true
      verbose: true
      retries: 99
      retry-delay: 12345

stash This plugin will configure the Jenkins Stash Notifier plugin to notify Atlassian Stash after job completes.
Requires the Jenkins StashNotifier Plugin.
Parameters
o url (string) -- Base url of Stash Server (default "")
o username (string) -- Username of Stash Server (default "")
o password (string) -- Password of Stash Server (default "")
o credentials-id (string) -- Credentials of Stash Server (optional)
o ignore-ssl (bool) -- Ignore unverified SSL certificate (default false)
o commit-sha1 (string) -- Commit SHA1 to notify (default "")
o include-build-number (bool) -- Include build number in key (default false)
Minimal Example:
publishers:
  - stash

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

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

Minimal Example:
publishers:
  - tap:
      results: puiparts.tap

tasks Scans the workspace files for open tasks and generates a trend report. Requires the Jenkins Task Scanner Plugin.
Parameters
o files-to-scan (list) -- Fileset includes setting that specifies the workspace files to scan for tasks, such as **/*.java. Basedir of the fileset is the workspace root. (default \(aq**/*.java\(aq)
o files-to-exclude (list) -- Fileset excludes setting that specifies the workspace files to exclude scanning for tasks, such as library source files. Basedir of the fileset is the workspace root. (default \(aq\(aq)
o tasks-tags-high (list) -- Tags identifiers for high priority that should be looked for in the workspace files. Only alphanumerical characters are allowed as tags as these strings are pasted into a regular expression. (default \(aq\(aq)
o tasks-tags-normal (list) -- Tags identifiers for normal priority that should be looked for in the workspace files. Only alphanumerical characters are allowed as tags as these strings are pasted into a regular expression. (default \(aq\(aq)
o tasks-tags-low (list) -- Tags identifiers for low priority that should be looked for in the workspace files. Only alphanumerical characters are allowed as tags as these strings are pasted into a regular expression. (default \(aq\(aq)
o ignore-case (bool) -- Ignore the case of the the tag identifiers. (default false)
o regular-expression (bool) -- Treat the tag identifiers as regular expression. Note that the regular expression must contain two capturing groups, the first one is interpreted as tag name, the second one as message. An example of such a regular expression would be ^.*(TODO(?:[0-9]*))(.*)$. (default false)
o run-always (bool) -- By default, this plug-in runs only for stable or unstable builds, but not for failed builds. If this plug-in should run even for failed builds then activate this check box. (default false)
o detect-module (bool) -- Determines if Ant or Maven modules should be detected for all files that contain warnings. Activating this option may increase your build time since the detector scans the whole workspace for build.xml or pom.xml files in order to assign the correct module names. (default false)
o health-thresholds-100 (int) -- Configure the upper thresholds for the build health. If left empty then no health report is created. If the actual number of warnings is between the provided thresholds then the build health is interpolated. (default \(aq\(aq)
o health-thresholds-0 (str) -- Configure the lower thresholds for the build health. If left empty then no health report is created. If the actual number of warnings is between the provided thresholds then the build health is interpolated. (default \(aq\(aq)
o health-priorities (str) -- Determines which warning priorities should be considered when evaluating the build health. Can be high (only priority high), normal (priorities high and normal) or low (all priorities). (default \(aqlow\(aq)
o status-thresholds (dict) --
Configure the build status and health. If the number of total or new warnings is greater than one of these thresholds then a build is considered as unstable or failed, respectively. I.e., a value of 0 means that the build status is changed if there is at least one warning found. Leave this field empty if the state of the build should not depend on the number of warnings. Note that for new warnings, you need to enable the next option (compute-new-warnings).
status-thresholds
o unstable-total-all (str): Total number for all priorities, unstable threshold (default \(aq\(aq)
o unstable-total-high (str): Total number for high priority, unstable threshold (default \(aq\(aq)
o unstable-total-normal (str): Total number for normal priority, unstable threshold (default \(aq\(aq)
o unstable-total-low (str): Total number for low priority, unstable threshold (default \(aq\(aq)
o failed-total-all (str): Total number for all priorities, failure threshold (default \(aq\(aq)
o failed-total-high (str): Total number for high priority, failure threshold (default \(aq\(aq)
o failed-total-normal (str): Total number for normal priority, failure threshold (default \(aq\(aq)
o failed-total-low (str): Total number for low priority, failure threshold (default \(aq\(aq)
o unstable-new-all (str): New number for all priorities, unstable threshold (default \(aq\(aq)
o unstable-new-high (str): New number for high priority, unstable threshold (default \(aq\(aq)
o unstable-new-normal (str): New number for normal priority, unstable threshold (default \(aq\(aq)
o unstable-new-low (str): New number for low priority, unstable threshold (default \(aq\(aq)
o failed-new-all (str): New number for all priorities, failure threshold (default \(aq\(aq)
o failed-new-high (str): New number for high priority, failure threshold (default \(aq\(aq)
o failed-new-normal (str): New number for normal priority, failure threshold (default \(aq\(aq)
o failed-new-low (str): New number for low priority, failure threshold (default \(aq\(aq)
o compute-new-warnings (bool) -- Compute new warnings (based on the last successful build unless another reference build is chosen below). (default false)
o use-delta (bool) -- If set the number of new warnings is computed by subtracting the total number of warnings of the reference build from the total number of warnings of the current build. This may lead to wrong results if you have both fixed and new warnings in a build. If unset the number of new warnings is computed by a more sophisticated algorithm: instead of using totals an asymmetric set difference of the warnings in the current build and the warnings in the reference build is used. This will find all new warnings even if the number of total warnings has decreased. Note that sometimes false positives will be reported due to minor changes in a warning (e.g. refactoring of variables or method names). It is recommended to uncheck this option in order to get the most accurate results for new warnings. Depends on compute-new-warnings option. (default false)
o use-prev-build-as-ref (bool) -- If set the number of new warnings will always be computed based on the previous build, even if that build is unstable (due to a violated warning threshold). Otherwise the last build that did not violate any given threshold will be used as reference. It is recommended to uncheck this option if the plug-in should ensure that all new warnings will be finally fixed in subsequent builds. Depends on compute-new-warnings option. (default false)
o only-use-stable-as-ref (bool) -- Use the last stable build as the reference to compute the number of new warnings against. This allows you to ignore interim unstable builds for which the number of warnings decreased. Note that the last stable build is evaluated only by inspecting the unit test failures. The static analysis results are not considered. Depends on compute-new-warnings option. (default false)
o default-encoding (str) -- Default encoding when parsing or showing files. Leave this field empty to use the default encoding of the platform. (default \(aq\(aq)
Minimal Example:
publishers:
  - tasks

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

test-fairy
This plugin helps you to upload Android APKs or iOS IPA files to www.testfairy.com.
Requires the Jenkins Test Fairy Plugin.
Parameters
platform (str) -- Select platform to upload to, android or ios (required)
Android Only:
Parameters
o proguard-file (str) -- Path to Proguard file. Path of mapping.txt from your proguard output directory. (default \(aq\(aq)
o storepass (str) -- Password for the keystore (default android)
o alias (str) -- alias for key (default androiddebugkey)
o keypass (str) -- password for the key (default \(aq\(aq)
o keystorepath (str) -- Path to Keystore file (required)
IOS Only:
Parameters
dSYM-file (str) -- Path to .dSYM.zip file (default \(aq\(aq)
All:
Parameters
o apikey (str) -- TestFairy API_KEY. Find it in your TestFairy account settings (required)
o appfile (str) -- Path to App file (.apk) or (.ipa). For example: $WORKSPACE/[YOUR_FILE_NAME].apk or full path to the apk file. (required)
o tester-groups (str) -- Tester groups to notify (default \(aq\(aq)
o notify-testers (bool) -- Send email with changelogs to testers (default false)
o autoupdate (bool) -- Automatic update (default false)
o max-duration (str) --
Duration of the session (default 10m)
max-duration values
o 10m
o 60m
o 300m
o 1440m
o record-on-background (bool) -- Record on background (default false)
o data-only-wifi (bool) -- Record data only in wifi (default false)
o video-enabled (bool) -- Record video (default true)
o screenshot-interval (int) --
Time interval between screenshots (default 1)
screenshot-interval values
o 1
o 2
o 5
o video-quality (str) --
Video quality (default high)
video-quality values
o high
o medium
o low
o cpu (bool) -- Enable CPU metrics (default true)
o memory (bool) -- Enable memory metrics (default true)
o logs (bool) -- Enable logs metrics (default true)
o network (bool) -- Enable network metrics (default false)
o phone-signal (bool) -- Enable phone signal metrics (default false)
o wifi (bool) -- Enable wifi metrics (default false)
o gps (bool) -- Enable gps metrics (default false)
o battery (bool) -- Enable battery metrics (default false)
o opengl (bool) -- Enable opengl metrics (default false)
Example:
publishers:
  - test-fairy:
      platform: android
      apikey: apikey
      appfile: /tmp/appfile.apk
      keystorepath: /tmp/keystorefile

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

publishers:
  - test-fairy:
      platform: ios
      apikey: apikey
      appfile: /tmp/appfile.ipa

publishers:
  - test-fairy:
      platform: ios
      apikey: apikey
      appfile: /tmp/appfile.ipa
      dSYM-file: /tmp/dsym.zip
      tester-groups: testergroups
      notify-testers: true
      autoupdate: true

testng This plugin publishes TestNG test reports.
Requires the Jenkins TestNG Results Plugin.
Parameters
o pattern (str) -- filename pattern to locate the TestNG XML report files (required)
o escape-test-description (bool) -- escapes the description string associated with the test method while displaying test method details (default true)
o escape-exception-msg (bool) -- escapes the test method\(aqs exception messages. (default true)
o fail-on-failed-test-config (bool) -- Allows for a distinction between failing tests and failing configuration methods (>=1.10) (default false)
o show-failed-builds (bool) -- include results from failed builds in the trend graph (>=1.6) (default false)
o unstable-skips (int) -- Build is marked UNSTABLE if the number/percentage of skipped tests exceeds the specified threshold (>=1.11) (default 100)
o unstable-fails (int) -- Build is marked UNSTABLE if the number/percentage of failed tests exceeds the specified threshold (>=1.11) (default 0)
o failed-skips (int) -- Build is marked FAILURE if the number/percentage of skipped tests exceeds the specified threshold (>=1.11) (default 100)
o failed-fails (int) -- Build is marked FAILURE if the number/percentage of failed tests exceeds the specified threshold (>=1.11) (default 100)
o threshold-mode (str) -- Interpret threshold as number of tests or percentage of tests (>=1.11) (default percentage)
Full Example:
publishers:
    - testng:
        pattern: "**/testng-results.xml"
        escape-test-description: false
        escape-exception-msg: false
        fail-on-failed-test-config: true
        show-failed-builds: true
        unstable-skips: 50
        unstable-fails: 25
        failed-skips: 75
        failed-fails: 66
        threshold-mode: number

Minimal Example:
publishers:
  - testng:
      pattern: "**/testng-results.xml"

testselector
This plugin allows you to choose specific tests you want to run.
Requires the Jenkins Tests Selector Plugin.
Parameters
o name (str) -- Environment variable in which selected tests are saved (required)
o description (str) -- Description (default "")
o properties-file (str) -- Contain all your tests (required)
o enable-field (str) -- Imply if the test is enabled or not (default "")
o groupby (str) -- Plugin will group the tests by (default "")
o field-sperator (str) -- Separate between the fields in the tests tree (default "")
o show-fields (str) -- Shown in the tests tree (default "")
o multiplicity-field (str) -- Number of times the test should run (default "")
Example:
publishers:
  - testselector:
      name: tests
      description: integration
      properties-file: example.properties
      enable-field: enabled
      groupby: testgroup
      field-separator: .
      show-fields: testsuite,testcase
      multiplicity-field: multiplicity

text-finder
This plugin lets you search keywords in the files you specified and additionally check build status
Requires the Jenkins Text-finder Plugin.
Parameters
o regexp (str) -- Specify a regular expression (required)
o fileset (str) -- Specify the path to search (optional)
o also-check-console-output (bool) -- Search the console output (default false)
o succeed-if-found (bool) -- Force a build to succeed if a string was found (default false)
o unstable-if-found (bool) -- Set build unstable instead of failing the build (default false)
o not-built-if-found (bool) -- Set build to "Not Built" instead of failing the build (default false)
Example:
publishers:
  - text-finder:
      regexp: "some string"
      fileset: "file.txt"
      also-check-console-output: true
      succeed-if-found: false
      unstable-if-found: false
      not-built-if-found: false

trigger
Trigger non-parametrised builds of other jobs.
Parameters
o project (str) -- name of the job to trigger
o threshold (str) -- when to trigger the other job (default \(aqSUCCESS\(aq), 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: \(aqnode-parameters\(aq overrides the Node that the triggered project is tied to.
Parameters
o project (list) -- list the jobs to trigger, will generate comma-separated string containing the named jobs.
o predefined-parameters (str) -- parameters to pass to the other job (optional)
o current-parameters (bool) -- Whether to include the parameters passed to the current build to the triggered job (optional)
o node-parameters (bool) -- Use the same Node for the triggered builds that was used for this build. (optional)
o svn-revision (bool) -- Pass svn revision to the triggered job (optional)
o include-upstream (bool) -- Include/pass through Upstream SVN Revisons. Only valid when \(aqsvn-revision\(aq is true. (default false)
o git-revision (dict) --
Passes git revision to the triggered job (optional).
o combine-queued-commits (bool): Whether to combine queued git hashes or not (default false)
o combine-queued-commits (bool) --
Combine Queued git hashes. Only valid when \(aqgit-revision\(aq is true. (default false)
Deprecated since version 1.5.0: Please use combine-queued-commits under the git-revision argument instead.
o boolean-parameters (dict) -- Pass boolean parameters to the downstream jobs. Specify the name and boolean value mapping of the parameters. (optional)
o condition (str) -- when to trigger the other job. Can be: \(aqSUCCESS\(aq, \(aqUNSTABLE\(aq, \(aqFAILED_OR_BETTER\(aq, \(aqUNSTABLE_OR_BETTER\(aq, \(aqUNSTABLE_OR_WORSE\(aq, \(aqFAILED\(aq, \(aqALWAYS\(aq. (default \(aqALWAYS\(aq)
o property-file (str) -- Use properties from file (optional)
o fail-on-missing (bool) -- Blocks the triggering of the downstream jobs if any of the property files are not found in the workspace. Only valid when \(aqproperty-file\(aq is specified. (default \(aqFalse\(aq)
o trigger-from-child-projects (bool) -- Trigger build from child projects. Used for matrix projects. (default \(aqFalse\(aq)
o use-matrix-child-files (bool) -- Use files in workspaces of child builds (default \(aqFalse\(aq)
o matrix-child-combination-filter (str) -- A Groovy expression to filter the child builds to look in for files
o only-exact-matrix-child-runs (bool) -- Use only child builds triggered exactly by the parent.
o file-encoding (str) -- Encoding of contents of the files. If not specified, default encoding of the platform is used. Only valid when \(aqproperty-file\(aq is specified. (optional)
o trigger-with-no-params (bool) -- Trigger a build even when there are currently no parameters defined (default \(aqFalse\(aq)
o restrict-matrix-project (str) -- Filter that restricts the subset of the combinations that the downstream project will run (optional)
o node-label-name (str) -- Specify the Name for the NodeLabel parameter. (optional)
o node-label (str) -- Specify the Node for the NodeLabel parameter. (optional)
Example:
publishers:
  - trigger-parameterized-builds:
    - project:
        - other_job
        - foo
        - bar
      predefined-parameters: |
        foo=bar
        bar=foo
    - project: other_job1, other_job2
      predefined-parameters: BUILD_NUM=${BUILD_NUMBER}
      git-revision: true
      property-file: version.prop
      fail-on-missing: true
    - project: yet_another_job
      predefined-parameters: foo=bar
      git-revision:
        combine-queued-commits: true
      restrict-matrix-project: label=="x86"
    - project: yet_another_job_2
      node-label-name: foo
    - project: yet_another_job_3
      node-label: node-label-foo || node-label-bar
    - project: \(aqtest-project-same-node\(aq
      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
o pattern (str) -- Filename pattern to locate the Valgrind XML report files (required)
o thresholds (dict) --
Mark build as failed or unstable if the number of errors exceeds a threshold. All threshold values are optional.
thresholds
o
unstable (dict)
unstable
o invalid-read-write (int)
o definitely-lost (int)
o total (int)
o
failed (dict)
failed
o invalid-read-write (int)
o definitely-lost (int)
o total (int)
o fail-no-reports (bool) -- Fail build if no reports are found (default false)
o fail-invalid-reports (bool) -- Fail build if reports are malformed (default false)
o publish-if-aborted (bool) -- Publish results for aborted builds (default false)
o 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
o min (int) -- sunny threshold
o max (int) -- stormy threshold
o unstable (int) -- unstable threshold
o pattern (str) -- report filename pattern
Any system without a dictionary provided will use default values.
Valid systems are: checkstyle, codenarc, cpd, cpplint, csslint, findbugs, fxcop, gendarme, jcreport, jslint, pep8, perlcritic, pmd, pylint, simian, stylecop
Example:
publishers:
  - violations:
      pep8:
        min: 0
        max: 1
        unstable: 1
        pattern: \(aq**/pep8.txt\(aq

warnings
Generate trend report for compiler warnings in the console log or in log files. Requires the Jenkins Warnings Plugin.
Parameters
o console-log-parsers (list) -- The parser to use to scan the console log (default \(aq\(aq)
o workspace-file-scanners (dict) -- .INDENT 2.0
workspace-file-scanners
o
file-pattern (str) -- Fileset \(aqincludes\(aq setting that
specifies the files to scan for warnings (required)
o
scanner (str) -- The parser to use to scan the files
provided in workspace-file-pattern (default \(aq\(aq)
o 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
o 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 \(aq\(aq)
o messages-to-ignore (str) -- Newline separated list of regular expressions that specifies the warning messages to exclude form the report (based on the warning messages). By default all warning messages are included
o categories-to-ignore (str) -- Newline separated list of regular expressions that specifies the warning messages to exclude form the report (based on the warning categories). By default all warning categories are included
o 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)
o 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 \(aqbuild.xml\(aq or \(aqpom.xml\(aq files in order to assign the correct module names. (default false)
o 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)
o 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 \(aq\(aq)
o health-threshold-low (int) -- The lower threshold for the build health. See health-threshold-high. (default \(aq\(aq)
o health-priorities (dict) --
Determines which warning priorities should be considered when evaluating the build health (default all-priorities)
health-priorities values
o priority-high -- Only priority high
o high-and-normal -- Priorities high and normal
o all-priorities -- All priorities
o 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 \(aq\(aq)
total-thresholds
o
unstable (dict)
unstable
o total-all (int)
o total-high (int)
o total-normal (int)
o total-low (int)
o
failed (dict)
failed
o total-all (int)
o total-high (int)
o total-normal (int)
o total-low (int)
o 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 \(aq\(aq)
new-thresholds
o
unstable (dict)
unstable
o new-all (int)
o new-high (int)
o new-normal (int)
o new-low (int)
o
failed (dict)
failed
o new-all (int)
o new-high (int)
o new-normal (int)
o new-high (int)
o 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)
o use-previous-build-as-reference (bool) -- If set the number of new warnings will always be computed based on the previous build, even if that build is unstable (due to a violated warning threshold). Otherwise the last build that did not violate any given threshold will be used as reference. It is recommended to uncheck this option if the plug-in should ensure that all new warnings will be finally fixed in subsequent builds. (default false)
o 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)
o default-encoding (str) -- Default encoding when parsing or showing files Leave empty to use default encoding of platform (default \(aq\(aq)
Minimal Example:
publishers:
  - warnings

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

whitesource
This plugin brings automatic open source management to Jenkins users.
Requires the Jenkins Whitesource Plugin.
Parameters
o product-token (str) -- Product name or token to update (default \(aq\(aq)
o version (str) -- Product version (default \(aq\(aq)
o override-token (str) -- Override the api token from the global config (default \(aq\(aq)
o project-token (str) -- Token uniquely identifying the project to update (default \(aq\(aq)
o includes (list) -- list of libraries to include (default \(aq[]\(aq)
o excludes (list) -- list of libraries to exclude (default \(aq[]\(aq)
o policies (str) -- Whether to override the global settings. Valid values: global, enable, disable (default \(aqglobal\(aq)
o requester-email (str) -- Email of the WhiteSource user that requests to update WhiteSource (>=1.5.1) (default \(aq\(aq)
Full Example:
publishers:
  - whitesource:
      product-token: abcdefghijklmnopqrstuvwxyzabcdef
      version: 1.0.17
      policies: enable
      override-token: "1231424523412"
      project-token: sd;fkljsdfkljasdfkj
      requester-email: 
      includes:
        - lib/*.jar
        - test/lib/*.jar
      excludes:
        - lib/ant*.jar
        - test/lib/ant*.jar

Minimal Example:
publishers:
  - whitesource

workspace-cleanup (post-build)
Requires the Jenkins Workspace Cleanup Plugin.
The pre-build workspace-cleanup is available as a wrapper.
Parameters
o include (list) -- list of files to be included
o exclude (list) -- list of files to be excluded
o dirmatch (bool) -- Apply pattern to directories too (default false)
o clean-if (list) --
clean depending on build status
clean-if values
o success (bool) (default true)
o unstable (bool) (default true)
o failure (bool) (default true)
o aborted (bool) (default true)
o not-built (bool) (default true)
o fail-build (bool) -- Fail the build if the cleanup fails (default true)
o clean-parent (bool) -- Cleanup matrix parent workspace (default false)
o external-deletion-command (str) -- external deletion command to run against files and directories
o disable-deferred-wipeout (bool) -- Disable improved deferred wipeout method (default false)
Minimal Example:
publishers:
  - workspace-cleanup

Full Example:
publishers:
  - workspace-cleanup:
      include:
        - "*.zip"
      exclude:
        - "*.txt"
      clean-if:
        - success: false
        - unstable: false
        - failure: false
        - aborted: false
        - not-built: false
      dirmatch: true
      fail-build: false
      clean-parent: true
      external-deletion-command: \(aqcommand\(aq
      disable-deferred-wipeout: true

xml-summary
Adds support for the Summary Display Plugin
Requires the Jenkins Summary Display Plugin.
Parameters
o files (str) -- Files to parse (required)
o shown-on-project-page (bool) -- Display summary on project page (default false)
Minimal Example:
publishers:
  - xml-summary:
      files: \(aq*_summary_report.xml\(aq

Full Example:
publishers:
  - xml-summary:
      files: \(aq*_summary_report.xml\(aq
      shown-on-project-page: true

xunit Publish tests results. Requires the Jenkins xUnit Plugin.
Parameters
o thresholdmode (str) -- Whether thresholds represents an absolute number of tests or a percentage. Either \(aqnumber\(aq or \(aqpercent\(aq. (default \(aqnumber\(aq)
o thresholds (list) --
Thresholds for both \(aqfailed\(aq and \(aqskipped\(aq 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:
o unstable (int)
o unstablenew (int)
o failure (int)
o failurenew (int)
o 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)
o types (list) --
Frameworks to configure, and options. Supports the following: aunit, boosttest, checktype, cpptest, cppunit, ctest, dotnettest, embunit, fpcunit, gtest, junit, mstest, nunit, phpunit, tusar, unittest, and valgrind.
The \(aqcustom\(aq type is not supported.
type (dict)
each type can be configured using the following:
o pattern (str): An Ant pattern to look for Junit result files, relative to the workspace root (default \(aq\(aq)
o requireupdate (bool): fail the build whenever fresh tests results have not been found (default true).
o deleteoutput (bool): delete temporary JUnit files (default true).
o skip-if-no-test-files (bool): Skip parsing this xUnit type report if there are no test reports files (default false).
o stoponerror (bool): Fail the build whenever an error occur during a result file processing (default true).
Example:
publishers:
  - xunit:
      thresholdmode: \(aqpercent\(aq
      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

Reporters

Reporters are like publishers but only applicable to Maven projects.
Component: reporters
Macro reporter
Entry Point
jenkins_jobs.reporters
Example:
job:
  name: test_job
  project-type: maven

reporters: - email: recipients:
class reporters.Reporters(registry)
gen_xml(xml_parent, data)
Update the XML element tree based on YAML data. Override this method to add elements to the XML output. Create new Element objects and add them to the xml_parent. The YAML data structure must not be modified.
Parameters
o parser (YAMLParser) -- the global YAML Parser
o xml_parent (Element) -- the parent XML element
o data (dict) -- the YAML data structure
email Email notifications on build failure.
Parameters
o recipients (str) -- Recipient email addresses
o notify-every-unstable-build (bool) -- Send an email for every unstable build (default true)
o send-to-individuals (bool) -- Send an email to the individual who broke the build (default false)
o notify-for-each-module (bool) -- Send an email for each module (e.g. failed, unstable). (default true)
Example:
reporters:
  - email:
      recipients: 
findbugs
FindBugs reporting for builds
Requires the Jenkins FindBugs Plugin.
Parameters
o rank-priority (bool) -- Use rank as priority (default false)
o include-files (str) -- Comma separated list of files to include. (Optional)
o exclude-files (str) -- Comma separated list of files to exclude. (Optional)
o can-run-on-failed (bool) -- Weather or not to run plug-in on failed builds (default false)
o healthy (int) -- Sunny threshold (optional)
o unhealthy (int) -- Stormy threshold (optional)
o health-threshold (str) -- Threshold priority for health status (\(aqlow\(aq, \(aqnormal\(aq or \(aqhigh\(aq, defaulted to \(aqlow\(aq)
o dont-compute-new (bool) -- If set to false, computes new warnings based on the reference build (default true)
o use-delta-values (bool) -- Use delta for new warnings. (default false)
o 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)
o 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)
o thresholds (dict) -- .INDENT 2.0
thresholds
o
unstable (dict)
unstable
o total-all (int)
o total-high (int)
o total-normal (int)
o total-low (int)
o new-all (int)
o new-high (int)
o new-normal (int)
o new-low (int)
o
failed (dict)
failed
o total-all (int)
o total-high (int)
o total-normal (int)
o total-low (int)
o new-all (int)
o new-high (int)
o new-normal (int)
o new-low (int)
Minimal Example:
project-type: maven
reporters:
    - findbugs

Full Example:
project-type: maven
reporters:
    - findbugs:
        rank-priority: true
        include-files: \(aqf,d,e,.*\(aq
        exclude-files: \(aqa,c,d,.*\(aq
        can-run-on-failed: true
        healthy: 80
        unhealthy: 10
        use-delta-values: true
        health-threshold: \(aqhigh\(aq
        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

SCM

The SCM module allows you to specify the source code location for the project. It adds the scm attribute to the Job definition, which accepts any number of scm definitions. It is also possible to pass [] to the scm attribute. This is useful when a set of configs has a global default scm and you want to a particular job to override that default with no SCM.
Component: scm
Macro scm
Entry Point
jenkins_jobs.scm
The scm module allows referencing multiple repositories in a Jenkins job. Note: Adding more than one scm definition requires the Jenkins Multiple SCMs plugin.
Example of multiple repositories in a single job:
- scm:
    name: first-scm
    scm:
      - git:
         url: ssh://:29418/first.git
         branches:
          - origin/master

- scm: name: second-scm scm: - git: url: ssh://:29418/second.git branches: - origin/master
- scm: name: first-and-second scm: - first-scm - second-scm
- job: name: my-job scm: - first-and-second
Example of an empty scm:
scm: []

class scm.PipelineSCM(registry)
gen_xml(xml_parent, data)
Update the XML element tree based on YAML data. Override this method to add elements to the XML output. Create new Element objects and add them to the xml_parent. The YAML data structure must not be modified.
Parameters
o parser (YAMLParser) -- the global YAML Parser
o xml_parent (Element) -- the parent XML element
o data (dict) -- the YAML data structure
class scm.SCM(registry)
gen_xml(xml_parent, data)
Update the XML element tree based on YAML data. Override this method to add elements to the XML output. Create new Element objects and add them to the xml_parent. The YAML data structure must not be modified.
Parameters
o parser (YAMLParser) -- the global YAML Parser
o xml_parent (Element) -- the parent XML element
o data (dict) -- the YAML data structure
accurev
Specifies the AccuRev SCM repository for this job. Requires the Jenkins AccuRev Plugin.
Parameters
o depot (str) -- Depot you want to use for the current job (optional)
o stream (str) -- Stream where the build will be generated from (optional)
o server-name (str) -- AccuRev server you are using for your builds (required)
o ignore-parent-changes (bool) -- Ignore possibility of changes in the parent stream (default false)
o clean-reference-tree (bool) -- Deletes any external files in reference tree (default false)
o build-from-snapshot (bool) -- Creates snapshot of the target stream, then populates and builds from that snapshot (default false)
o do-not-pop-content (bool) -- If checkbox is on, elements are not populating vice versa (default false)
o workspace (str) -- Name of existing workspace (optional)
o reference-tree (str) -- Name of the reference tree (optional)
o directory-offset (str) -- Relative directory path from the default Jenkins workspace location where the files from the stream, workspace, or reference tree should be retrieved from. (optional)
o sub-path (str) -- Makes a "best effort" to ensure that only the sub-path is populated (optional)
o filter-poll-scm (str) -- Specify directories or files you want Jenkins to check before starting a build (optional)
o snapshot-name-format (str) -- Naming conventions for the snapshot in this field (optional)
Example:
scm:
  - accurev:
      depot: Test depot
      stream: Test stream
      server-name: Test server name
      ignore-parent-changes: true
      clean-reference-tree: true
      build-from-snapshot: true
      do-not-pop-content: true
      workspace: Test workspace
      reference-tree: Test reference tree
      directory-offset: Test directory offset
      sub-path: Test sub path
      filter-poll-scm: Test filter
      snapshot-name-format: Test snapshot name format

bzr Specifies the bzr SCM repository for this job. Requires the Jenkins Bazaar Plugin.
Parameters
o url (str) -- URL of the bzr branch (required)
o clean-tree (bool) -- Clean up the workspace (using bzr) before pulling the branch (default false)
o lightweight-checkout (bool) -- Use a lightweight checkout instead of a full branch (default false)
o browser (str) --
The repository browser to use.
browsers supported
o auto - (default)
o loggerhead - as used by Launchpad
o opengrok - https://opengrok.github.io/OpenGrok/
o browser-url (str) -- URL for the repository browser (required if browser is set).
o opengrok-root-module (str) -- Root module for OpenGrok (required if browser is opengrok).
Example:
scm:
  - bzr:
      url: lp:test_project

cvs Specifies the CVS SCM repository for this job. Requires the Jenkins CVS Plugin.
Parameters
o repos (list) --
List of CVS repositories. (required)
Repos
o root (str) -- The CVS connection string Jenkins uses to connect to the server. The format is :protocol:user@host:path (required)
o locations (list) -- List of locations. (required)
Locations
o type (str) -- Type of location.
supported values
o HEAD - (default)
o BRANCH
o TAG
o name (str) -- Name of location. Only valid in case of \(aqBRANCH\(aq or \(aqTAG\(aq location type. (default \(aq\(aq)
o use-head (bool) -- Use Head if not found. Only valid in case of \(aqBRANCH\(aq or \(aqTAG\(aq location type. (default false)
o modules (list) -- List of modules. (required)
Modules
o remote -- The name of the module in the repository at CVSROOT. (required)
o local-name -- The name to be applied to this module in the local workspace. If blank, the remote module name will be used. (default \(aq\(aq)
o excluded-regions (list str) -- Patterns for excluding regions. (optional)
o compression-level (int) -- Compression level. Must be a number between -1 and 9 inclusive. Choose -1 for System Default. (default -1)
o use-update (bool) -- If true, Jenkins will use \(aqcvs update\(aq whenever possible for builds. This makes a build faster. But this also causes the artifacts from the previous build to remain in the file system when a new build starts, making it not a true clean build. (default true)
o prune-empty (bool) -- Remove empty directories after checkout using the CVS \(aq-P\(aq option. (default true)
o skip-changelog (bool) -- Prevent the changelog being generated after checkout has completed. (default false)
o show-all-output (bool) -- Instructs CVS to show all logging output. CVS normally runs in quiet mode but this option disables that. (default false)
o clean-checkout (bool) -- Perform clean checkout on failed update. (default false)
o clean-copy (bool) -- Force clean copy for locally modified files. (default false)
Example
scm:
  - cvs:
      repos:
          - root: ":protocol:user@host1:path"
            locations:
                - modules:
                    - remote: "remote1"
                    - remote: "remote2"
          - root: ":protocol:user@host2:path"
            locations:
                - modules:
                    - remote: "remote1"

scm:
  - cvs:
      repos:
          - root: ":protocol:user@host1:path"
            compression-level: "1"
            locations:
                - type: TAG
                  name: "tag name"
                  use-head: false
                  modules:
                    - remote: "remote1"
                      local-name: "localName"
                    - remote: "remote2"
            excluded-regions:
                - "pattern1"
                - "pattern2"
          - root: ":protocol:user@host2:path"
            locations:
                - modules:
                    - remote: "remote1"
      use-update: false
      prune-empty: false
      skip-changelog: true
      show-all-output: true
      clean-checkout: true
      clean-copy: true

dimensions
Specifies the Dimensions SCM repository for this job. Requires Jenkins Dimensions Plugin.
Parameters
o project (str) -- Project name of format PRODUCT_ID:PROJECT_NAME (required)
o permissions (str) --
Default Permissions for updated files (default: DEFAULT)
Permissions
o DEFAULT
o READONLY
o WRITABLE
o eol (str) --
End of line (default: DEFAULT)
End of line
o DEFAULT
o UNIX
o WINDOWS
o UNCHANGED
o folders (list) -- Folders to monitor (default /)
o exclude (list) -- Paths to exclude from monitor
o username (str) -- Repository username for this job
o password (str) -- Repository password for this job
o server (str) -- Dimensions server for this job
o database (str) -- Dimensions database for this job. Format must be database@dsn
o update (bool) -- Use update (default false)
o clear-workspace (bool) -- Clear workspace prior to build (default false)
o force-build (bool) -- Force build even if the repository SCM checkout operation fails (default false)
o overwrite-modified (bool) -- Overwrite files in worspace from repository files (default false)
o expand-vars (bool) -- Expand substitution variables (default false)
o no-metadata (bool) -- Checkout files with no metadata (default false)
o maintain-timestamp (bool) -- Maintain file timestamp from Dimensions (default false)
o slave-checkout (bool) -- Force slave based checkout (default false)
o timezone (str) -- Server timezone
o web-url (str) -- Dimensions Web URL
Examples:
scm:
  - dimensions:
      project: myProduct:myProject

scm:
  - dimensions:
      project: myProduct:myProject
      permissions: WRITABLE
      eol: UNIX
      folders:
        - src
        - test
      exclude:
        - excluded_dir
        - excluded_other_dir
      username: johnd
      password: passw0rd
      server: my.dmscm.server:1234
      database: myDatabase@myDsn
      update: true
      clear-workspace: true
      force-build: true
      overwrite-modified: true
      expand-vars: true
      no-metadata: true
      maintain-timestamp: true
      slave-checkout: true
      timezone: Europe/Berlin
      web-url: https://my.dmscm.weburl

git Specifies the git SCM repository for this job. Requires the Jenkins Git Plugin.
Parameters
o url (str) -- URL of the git repository
o credentials-id (str) -- ID of credential to use to connect, which is the last field (a 32-digit hexadecimal code) of the path of URL visible after you clicked the credential under Jenkins Global credentials. (optional)
o refspec (str) -- refspec to fetch (default \(aq+refs/heads/*:refs/remotes/remoteName/*\(aq)
o name (str) -- name to fetch (default \(aqorigin\(aq)
o remotes (list(str)) --
list of remotes to set up (optional, only needed if multiple remotes need to be set up)
Remote
o url (string) - url of remote repo
o refspec (string) - refspec to fetch (optional)
o credentials-id - ID of credential to use to connect, which is the last field of the path of URL (a 32-digit hexadecimal code) visible after you clicked credential under Jenkins Global credentials. (optional)
o branches (list(str)) -- list of branch specifiers to build (default \(aq**\(aq)
o skip-tag (bool) --
Skip tagging (default true)
Deprecated since version 2.0.0.: Please use per-build-tag extension, which has the inverse meaning.
o clean (bool) --
Clean after checkout (default false)
Deprecated since version 1.1.1.: Please use clean extension format.
o fastpoll (bool) -- Use fast remote polling (default false)
o disable-submodules (bool) --
Disable submodules (default false)
Deprecated since version 1.1.1.: Please use submodule extension.
o recursive-submodules (bool) --
Recursively update submodules (default false) Deprecated since version 1.1.1.: Please use submodule extension.
o git-tool (str) -- The name of the Git installation to use (default \(aqDefault\(aq)
o reference-repo (str) -- Path of the reference repo to use during clone (optional)
o browser (str) --
what repository browser to use.
browsers supported
o auto - (default)
o assemblaweb - https://www.assembla.com/home
o bitbucketweb - https://bitbucket.org/
o cgit - https://git.zx2c4.com/cgit/about/
o fisheye - https://www.atlassian.com/software/fisheye
o gitblit - http://gitblit.com/
o githubweb - https://github.com/
o gitiles - https://code.google.com/p/gitiles/
o gitlab - https://about.gitlab.com/
o gitlist - http://gitlist.org/
o gitoriousweb - https://gitorious.org/
o gitweb - https://git-scm.com/docs/gitweb
o kiln - https://www.fogcreek.com/kiln/
o microsoft-tfs-2013 - https://www.visualstudio.com/en-us/products/tfs-overview-vs.aspx
o phabricator - http://phabricator.org/
o redmineweb - http://www.redmine.org/
o rhodecode - https://rhodecode.com/
o stash - https://www.atlassian.com/software/bitbucket/server
o viewgit - http://viewgit.fealdia.org/
o browser-url (str) -- url for the repository browser (required if browser is not \(aqauto\(aq, no default)
o browser-version (str) -- version of the repository browser (GitLab only, default \(aq0.0\(aq)
o project-name (str) -- project name in Gitblit and ViewGit repobrowser (optional)
o repo-name (str) -- repository name in phabricator repobrowser (optional)
o git-config-name (str) -- Configure name for Git clone (optional)
o git-config-email (str) -- Configure email for Git clone (optional)
Extensions
o
basedir (string) - Location relative to the workspace root to
clone to (default workspace)
o
changelog-against (dict)
o remote (string) - name of repo that contains branch to create changelog against (default \(aqorigin\(aq)
o branch (string) - name of the branch to create changelog against (default \(aqmaster\(aq)
o
choosing-strategy: (string) - Jenkins class for selecting what
to build. Can be one of default,`inverse`, or gerrit (default \(aqdefault\(aq)
o
clean (dict)
o after (bool) - Clean the workspace after checkout
o before (bool) - Clean the workspace before checkout
o
excluded-users: (list(string)) - list of users to ignore
revisions from when polling for changes. (if polling is enabled, optional)
o
included-regions: (list(string)) - list of file/folders to
include (optional)
o
excluded-regions: (list(string)) - list of file/folders to
exclude (optional)
o
ignore-commits-with-messages (list(str)) - Revisions committed
with messages matching these patterns will be ignored. (optional)
o
ignore-notify: (bool) - Ignore notifyCommit URL accesses
(default false)
o
force-polling-using-workspace (bool) - Force polling using
workspace (default false)
o
local-branch (string) - Checkout/merge to local branch
(optional)
o
merge (dict)
o remote (string) - name of repo that contains branch to merge to (default \(aqorigin\(aq)
o branch (string) - name of the branch to merge to
o strategy (string) - merge strategy. Can be one of \(aqdefault\(aq, \(aqresolve\(aq, \(aqrecursive\(aq, \(aqoctopus\(aq, \(aqours\(aq, \(aqsubtree\(aq. (default \(aqdefault\(aq)
o fast-forward-mode (string) - merge fast-forward mode. Can be one of \(aqFF\(aq, \(aqFF_ONLY\(aq or \(aqNO_FF\(aq. (default \(aqFF\(aq)
o
per-build-tag (bool) - Create a tag in the workspace for every
build. (default is inverse of skip-tag if set, otherwise false)
o prune (bool) - Prune remote branches (default false)
o
scm-name (string) - The unique scm name for this Git SCM
(optional)
o shallow-clone (bool) - Perform shallow clone (default false)
o depth (int) - Set shallow clone depth (default 1)
o
do-not-fetch-tags (bool) - Perform a clone without tags
(default false)
o
honor-refspec (bool) - Perform initial clone using the refspec
defined for the repository (default false)
o
sparse-checkout (dict)
o paths (list) - List of paths to sparse checkout. (optional)
o
submodule (dict)
o disable (bool) - By disabling support for submodules you can still keep using basic git plugin functionality and just have Jenkins to ignore submodules completely as if they didn\(aqt exist.
o recursive (bool) - Retrieve all submodules recursively (uses \(aq--recursive\(aq option which requires git>=1.6.5)
o tracking (bool) - Retrieve the tip of the configured branch in .gitmodules (Uses \(aq--remote\(aq option which requires git>=1.8.2)
o parent-credentials (bool) - Use credentials from default remote of parent repository (default false).
o reference-repo (str) - Path of the reference repo to use during clone (optional)
o timeout (int) - Specify a timeout (in minutes) for submodules operations (default 10).
o timeout (str) - Timeout for git commands in minutes (optional)
o
use-author (bool): Use author rather than committer in Jenkin\(aqs
build changeset (default false)
o
wipe-workspace (bool) - Wipe out workspace before build
(default true)
Example:
scm:
  - git:
      url: https://example.com/project.git
      branches:
        - master
        - stable
      browser: githubweb
      browser-url: http://github.com/foo/example.git
      timeout: 20

hg Specifies the mercurial SCM repository for this job. Requires the Jenkins Mercurial Plugin.
Parameters
o url (str) -- URL of the hg repository (required)
o credentials-id (str) -- ID of credentials to use to connect (optional)
o revision-type (str) -- revision type to use (default \(aqbranch\(aq)
o revision (str) -- the branch or tag name you would like to track (default \(aqdefault\(aq)
o modules (list(str)) -- reduce unnecessary builds by specifying a list of "modules" within the repository. A module is a directory name within the repository that this project lives in. (default \(aq\(aq)
o clean (bool) -- wipe any local modifications or untracked files in the repository checkout (default false)
o subdir (str) -- check out the Mercurial repository into this subdirectory of the job\(aqs workspace (optional)
o disable-changelog (bool) -- do not calculate the Mercurial changelog for each build (default false)
o browser (str) --
what repository browser to use
browsers supported
o auto - (default)
o bitbucketweb - https://bitbucket.org/
o fisheye - https://www.atlassian.com/software/fisheye
o googlecode - https://code.google.com/
o hgweb - https://www.selenic.com/hg/help/hgweb
o kilnhg - https://www.fogcreek.com/kiln/
o rhodecode - https://rhodecode.com/ (versions >= 1.2)
o rhodecode-pre-1.2.0 - https://rhodecode.com/ (versions < 1.2)
o browser-url (str) -- url for the repository browser (required if browser is set)
Example:
scm:
  - hg:
     revision: feature
     url: ssh://hg@hg/repo
     credentials-id: "abcdef01234567890"
     modules:
       - module1
       - module2
     clean: true
     subdir: my/sources
     disable-changelog: true
     browser: hgweb
     browser-url: http://hg/repo

openshift-img-streams
Rather than a Build step extension plugin, this is an extension of the Jenkins SCM plugin, where this baked-in polling mechanism provided by Jenkins is leveraged by exposing some of the common semantics between OpenShift ImageStreams (which are abstractions of Docker repositories) and SCMs - versions / commit IDs of related artifacts (images vs. programmatics files) Requires the Jenkins OpenShift Pipeline Plugin._
Parameters
o image-stream-name (str) -- The name of the ImageStream is what shows up in the NAME column if you dump all the ImageStream\(aqs with the oc get is command invocation. (default nodejs-010-centos7)
o tag (str) -- The specific image tag within the ImageStream to monitor. (default latest)
o api-url (str) -- This would be the value you specify if you leverage the --server option on the OpenShift oc command. (default https://openshift.default.svc.cluster.local)
o namespace (str) -- The value here should be whatever was the output form oc project when you created the BuildConfig you want to run a Build on. (default test)
o auth-token (str) -- The value here is what you supply with the --token option when invoking the OpenShift oc command. (default \(aq\(aq)
o verbose (bool) -- This flag is the toggle for turning on or off detailed logging in this plug-in. (default false)
Full Example:
scm:
  - openshift-img-streams:
      image-stream-name: nodejs-010-fedora
      tag: prod
      api-url: https://openshift.example.local.url/
      namespace: test-scm
      auth-token: ose-key-img-streams1
      verbose: true

Minimal Example:
scm:
  - openshift-img-streams

p4 Specifies the Perforce (P4) repository for this job Requires the Jenkins P4 Plugin.
repo Specifies the repo SCM repository for this job. Requires the Jenkins Repo Plugin.
Parameters
o manifest-url (str) -- URL of the repo manifest (required)
o manifest-branch (str) -- The branch of the manifest to use (optional)
o manifest-file (str) -- Initial manifest file to use when initialising (optional)
o manifest-group (str) -- Only retrieve those projects in the manifest tagged with the provided group name (optional)
o ignore-projects (list(str)) -- a list of projects in which changes would not be considered to trigger a build when pooling (optional)
o destination-dir (str) -- Location relative to the workspace root to clone under (optional)
o repo-url (str) -- custom url to retrieve the repo application (optional)
o mirror-dir (str) -- Path to mirror directory to reference when initialising (optional)
o jobs (int) -- Number of projects to fetch simultaneously (default 0)
o depth (int) -- Specify the depth in history to sync from the source. The default is to sync all of the history. Use 1 to just sync the most recent commit (default 0)
o current-branch (bool) -- Fetch only the current branch from the server (default true)
o reset-first (bool) -- Remove any commits that are not on the repositories by running the following command before anything else (default false): repo forall -c "git reset --hard"
o quiet (bool) -- Make repo more quiet (default true)
o force-sync (bool) -- Continue sync even if a project fails to sync (default false)
o no-tags (bool) -- Don\(aqt fetch tags (default false)
o trace (bool) -- Trace git command execution into the build logs. (default false)
o show-all-changes (bool) -- When this is checked --first-parent is no longer passed to git log when determining changesets (default false)
o local-manifest (str) -- Contents of .repo/local_manifest.xml, written prior to calling sync (optional)
Example:
scm:
  - repo:
      manifest-url: https://example.com/project/
      manifest-branch: stable
      manifest-file: repo.xml
      manifest-group: drivers
      ignore-projects:
        - static-project
        - unimportant-project
      destination-dir: build
      repo-url: https://internal.net/projects/repo
      mirror-dir: ~/git/project/
      jobs: 3
      current-branch: false
      reset-first: true
      quiet: false
      force-sync: true
      no-tags: true
      trace: true
      show-all-changes: true
      local-manifest: |
        <?xml version="1.0" encoding="UTF-8"?>
        <manifest>
          <project path="external/project" name="org/project"
            remote="gerrit" revision="master" />
        </manifest>

store Specifies the Visualworks Smalltalk Store repository for this job. Requires the Jenkins Visualworks Smalltalk Store Plugin.
Parameters
o script (str) -- name of the Store script to run
o repository (str) -- name of the Store repository
o version-regex (str) -- regular expression that specifies which pundle versions should be considered (optional)
o minimum-blessing (str) -- minimum blessing level to consider (optional)
o parcel-builder-file (str) -- name of the file to generate as input to a later parcel building step (optional - if not specified, then no parcel builder file will be generated)
o pundles (list) -- .INDENT 2.0
(package or bundle)
(dict): A package or bundle to check
Example:
scm:
  - store:
      script: someStoreScript
      repository: StoreRepository
      version-regex: "[0-9]+"
      minimum-blessing: Integrated
      parcel-builder-file: parcelBuilderInput
      pundles:
        - package: SomePackage
        - package: AnotherPackage
        - bundle: SomeBundle

svn Specifies the svn SCM repository for this job.
Parameters
o url (str) -- URL of the svn repository
o basedir (str) -- location relative to the workspace root to checkout to (default \(aq.\(aq)
o credentials-id (str) -- optional argument to specify the ID of credentials to use
o repo-depth (str) -- Repository depth. Can be one of \(aqinfinity\(aq, \(aqempty\(aq, \(aqfiles\(aq, \(aqimmediates\(aq or \(aqunknown\(aq. (default \(aqinfinity\(aq)
o ignore-externals (bool) -- Ignore Externals. (default false)
o workspaceupdater (str) -- optional argument to specify
o workspaceupdater --
optional argument to specify how to update the workspace (default wipeworkspace)
supported values
o wipeworkspace - deletes the workspace before checking out
o revertupdate - do an svn revert then an svn update
o emulateclean - delete unversioned/ignored files then update
o update - do an svn update as much as possible
o excluded-users (list(str)) -- list of users to ignore revisions from when polling for changes (if polling is enabled; parameter is optional)
o included-regions (list(str)) -- list of file/folders to include (optional)
o excluded-regions (list(str)) -- list of file/folders to exclude (optional)
o excluded-commit-messages (list(str)) -- list of commit messages to exclude (optional)
o exclusion-revprop-name (str) -- revision svn-property to ignore (optional)
o ignore-property-changes-on-directories (bool) -- ignore svn-property only changes of directories (default false)
o filter-changelog (bool) -- If set Jenkins will apply the same inclusion and exclusion patterns for displaying changelog entries as it does for polling for changes (default false)
o repos (list) -- list of repositories to checkout (optional)
o additional-credentials (list) --
list of additional credentials (optional) :Additional-Credentials:
o realm (str) -- realm to use
o credentials-id (str) -- optional ID of credentials to use
o viewvc-url (str) --
URL of the svn web interface (optional)
Repo
o url (str) -- URL for the repository
o basedir (str) -- Location relative to the workspace root to checkout to (default \(aq.\(aq)
o credentials-id - optional ID of credentials to use
o repo-depth - Repository depth. Can be one of \(aqinfinity\(aq, \(aqempty\(aq, \(aqfiles\(aq, \(aqimmediates\(aq or \(aqunknown\(aq. (default \(aqinfinity\(aq)
o ignore-externals - Ignore Externals. (default false)
Multiple repos example:
scm:
  - svn:
     workspaceupdater: update
     repos:
       - url: http://svn.example.com/repo
         basedir: .
         credentials-id: "abcdef01234567890"
         repo-depth: files
         ignore-externals: true
       - url: http://svn.example.com/repo2
         basedir: repo2

Advanced commit filtering example:
scm:
  - svn:
      url: http://svn.apache.org/repos/asf/spamassassin/trunk
      credentials-id: "abcdef01234567890"
      repo-depth: empty
      ignore-externals: true
      workspaceupdater: wipeworkspace
      included-regions:
          - /region1/.*\.cpp
          - /region2
      excluded-regions:
          - /region3/.*\.jpg
          - /region4
      excluded-users:
          - user1
          - user2
      excluded-commit-messages:
          - test-msg
          - test-msg2
      exclusion-revprop-name: propname
      filter-changelog: true
      ignore-property-changes-on-directories: true
      viewvc-url: http://svn.apache.org/viewvc/spamassassin/trunk

tfs Specifies the Team Foundation Server repository for this job. Requires the Jenkins Team Foundation Server Plugin.
NOTE: TFS Password must be entered manually on the project if a user name is specified. The password will be overwritten with an empty value every time the job is rebuilt with Jenkins Job Builder.
Parameters
o server-url (str) -- The name or URL of the team foundation server. If the server has been registered on the machine then it is only necessary to enter the name.
o project-path (str) -- The name of the project as it is registered on the server.
o login (str) -- The user name that is registered on the server. The user name must contain the name and the domain name. Entered as domain\\user or user@domain (optional). NOTE: You must enter in at least two slashes for the domain\\user format in JJB YAML. It will be rendered normally.
o use-update (str) -- If true, Hudson will not delete the workspace at end of each build. This causes the artifacts from the previous build to remain when a new build starts. (default true)
o local-path (str) -- The folder where all files will be retrieved into. The folder name is a relative path, under the workspace of the current job. (default .)
o workspace (str) --
The name of the workspace under which the source should be retrieved. This workspace is created at the start of a download, and deleted at the end. You can normally omit the property unless you want to name a workspace to avoid conflicts on the server (i.e. when you have multiple projects on one server talking to a Team Foundation Server). (default Hudson-${JOB_NAME}-${NODE_NAME})
The TFS plugin supports the following macros that are replaced in the workspace name:
o ${JOB_NAME} - The name of the job.
o
${USER_NAME} - The user name that the Hudson server or slave is
running as.
o
${NODE_NAME} - The name of the node/slave that the plugin currently
is executed on. Note that this is not the hostname, this value is the Hudson configured name of the slave/node.
o ${ENV} - The environment variable that is set on the master or slave.
o web-access (dict) --
Adds links in "changes" views within Jenkins to an external system for browsing the details of those changes. The "Auto" selection attempts to infer the repository browser from other jobs, if supported by the SCM and a job with matching SCM details can be found. (optional, default Auto).
web-access value
o web-url -- Enter the URL to the TSWA server. The plugin will strip the last path (if any) of the URL when building URLs for change set pages and other pages. (optional, default uses server-url)
Examples:
scm:
  - tfs:
      server-url: "tfs.company.com"
      project-path: "$/myproject"
      login: "mydomain\\\\jane"
      use-update: false
      local-path: "../foo/"
      workspace: "Hudson-${JOB_NAME}"
      web-access:
        - web-url: "http://TFSMachine:8080"

scm:
  - tfs:
      server-url: "tfs.company.com"
      project-path: "$/myproject"
      login: "jane@mydomain"
      use-update: false
      local-path: "../foo/"
      workspace: "Hudson-${JOB_NAME}"
      web-access:

url Watch for changes in, and download an artifact from a particular url. Requires the Jenkins URL SCM.
Parameters
o url-list (list) -- List of URLs to watch. (required)
o clear-workspace (bool) -- If set to true, clear the workspace before downloading the artifact(s) specified in url-list. (default false)
Examples:
scm:
  - url:
      url-list:
        - \(aqhttp://jenkins.domain.local/jnlpJars/jenkins-cli.jar\(aq

scm:
  - url:
      url-list:
        - \(aqhttp://jenkins.domain.local/jnlpJars/jenkins-cli.jar\(aq
        - \(aqhttp://code.jquery.com/jquery-1.11.3.min.js\(aq
      clear-workspace: true

workspace
Specifies the cloned workspace for this job to use as a SCM source. Requires the Jenkins Clone Workspace SCM Plugin.
The job the workspace is cloned from must be configured with an clone-workspace publisher
Parameters
o parent-job (str) -- The name of the parent job to clone the workspace from.
o criteria (str) -- Set the criteria to determine what build of the parent project to use. Can be one of \(aqAny\(aq, \(aqNot Failed\(aq or \(aqSuccessful\(aq. (default Any)
Example:
scm:
  - workspace:
      parent-job: my-upstream-job
      criteria: Any

Triggers

Triggers define what causes a Jenkins job to start building.
Component: triggers
Macro trigger
Entry Point
jenkins_jobs.triggers
Example:
job:
  name: test_job

triggers: - timed: \(aq@daily\(aq
class triggers.Triggers(registry)
gen_xml(xml_parent, data)
Update the XML element tree based on YAML data. Override this method to add elements to the XML output. Create new Element objects and add them to the xml_parent. The YAML data structure must not be modified.
Parameters
o parser (YAMLParser) -- the global YAML Parser
o xml_parent (Element) -- the parent XML element
o data (dict) -- the YAML data structure
bitbucket
Trigger a job when bitbucket repository is pushed to. Requires the Jenkins BitBucket Plugin.
Example:
triggers:
  - bitbucket

build-result
Configure jobB to monitor jobA build result. A build is scheduled if there is a new build result that matches your criteria (unstable, failure, ...). Requires the Jenkins BuildResultTrigger Plugin.
Parameters
o groups (list) -- List groups of jobs and results to monitor for
o jobs (list) -- The jobs to monitor (required)
o results (list) -- Build results to monitor for (default success)
o combine (bool) -- Combine all job information. A build will be scheduled only if all conditions are met (default false)
o cron (str) -- The cron syntax with which to poll the jobs for the supplied result (default \(aq\(aq)
Full Example:
triggers:
  - build-result:
      cron: H/15 * * * *
      combine: true
      groups:
        - jobs:
            - test
            - test2
          results:
            - success
            - not-built
        - jobs:
            - test3
          results:
            - unstable

Minimal Example:
triggers:
  - build-result:
       groups:
        - jobs:
            - test
          results:
            - aborted

dockerhub-notification
The job will get triggered when Docker Hub/Registry notifies that Docker image(s) used in this job has been rebuilt.
Requires the Jenkins CloudBees Docker Hub Notification.
Parameters
o referenced-image (bool) -- Trigger the job based on repositories used by any compatible docker plugin in this job. (default true)
o repositories (list) -- Specified repositories to trigger the job. (default [])
Minimal Example:
triggers:
  - dockerhub-notification

Full Example:
triggers:
  - dockerhub-notification:
      referenced-image: true
      repositories:
        - repo1
        - repo2

generic-webhook-trigger
Generic webhook trigger. Trigger when a set of parameters are submitted. Requires the Jenkins Generic Webhook Trigger.
Parameters
o token (string) -- A token to use to trigger the job. (default \(aq\(aq)
o print-post-content (bool) -- Print post content in job log.
o print-contrib-var (bool) -- Print contributed variables in job log.
o silent-response (bool) -- Avoid responding with information about triggered jobs.
o cause (string) -- This will be displayed in any triggered job.
o regex-filter-expression (string) -- Regular expression to test on the evaluated text specified in regex-filter-text
o regex-filter-text (string) -- Text to test for the given regexp-filter-expression.
o post-content-params (list) --
Parameters to use from posted JSON/XML
post-content-params
o type (string) -- JSONPath or XPath
o key (string) -- Variable name
o value (string) -- Expression to evaluate in POST content. Use JSONPath for JSON or XPath for XML.
o regex-filter (string) -- Anything in the evaluated value, matching this regular expression, will be removed. (optional)
o default-value (string) -- This value will be used if expression does not match anything. (optional)
o request-params (list) --
Parameters to use passed in as request arguments
request-params
o key (string) -- Name of request parameter
o regex-filter (string) -- Anything in the evaluated value, matching this regular expression, will be removed. (optional)
o header-params (list) --
Parameters to use passed in as headers
header-params
o key (string) -- Name of request header in lowercase. Resulting variable name has \(aq_\(aq instead of \(aq-\(aq characters.
o regex-filter (string) -- Anything in the evaluated value, matching this regular expression, will be removed. (optional)
Example:
triggers:
  - generic-webhook-trigger:
        post-content-params:
            - type: JSONPath
              key: action
              value: $.action
              regex-filter: value_filter
              default-value: default_value
            - type: XPath
              key: blah
              value: whooga
              regex-filter: value_filer
              default-value: default_something
        regex-filter-text: $action
        regex-filter-expression: ^(opened|reopened|synchronize)$
        request-params:
            - key: request_test_1
              regex-filter: requesT_value_1
        header-params:
            - key: header_test1
              regex-filter: header_value1
        print-post-content: true
        print-contrib-var: true
        cause: Generic Cause
        token: blah
        silent-response: true

gerrit Trigger on a Gerrit event. Requires the Jenkins Gerrit Trigger Plugin version >= 2.6.0.
Parameters
o trigger-on (list) --
Events to react on. Please use either the new trigger-on, or the old trigger-on-* events definitions. You cannot use both at once.
Trigger on
o patchset-created-event (dict) -- Trigger upon patchset creation.
Patchset created
o exclude-drafts (bool) -- exclude drafts (default false)
o exclude-trivial-rebase (bool) -- exclude trivial rebase (default false)
o exclude-no-code-change (bool) -- exclude no code change (default false)
o exclude-private (bool) -- exclude private change (default false)
o exclude-wip (bool) -- exclude wip change (default false)
exclude-private|exclude-wip needs Gerrit Trigger v2.29.0 Exclude drafts|trivial-rebase|no-code-change needs Gerrit Trigger v2.12.0
o patchset-uploaded-event -- Trigger upon patchset creation (this is a alias for patchset-created-event).
Deprecated since version 1.1.0: Please use trigger-on.
o change-abandoned-event -- Trigger on patchset abandoned. Requires Gerrit Trigger Plugin version >= 2.8.0.
o change-merged-event -- Trigger on change merged
o change-restored-event -- Trigger on change restored. Requires Gerrit Trigger Plugin version >= 2.8.0
o draft-published-event -- Trigger on draft published event.
o ref-updated-event -- Trigger on ref-updated. Gerrit Trigger Plugin version >= 2.29.0
o private-state-changed-event -- Trigger on private state changed event.
o wip-state-changed-event -- Trigger on wip state changed event. Gerrit Trigger Plugin version >= 2.8.0
o comment-added-event (dict) -- Trigger on comment added.
Comment added
o approval-category (str) -- Approval (verdict) category (for example \(aqAPRV\(aq, \(aqCRVW\(aq, \(aqVRIF\(aq -- see Gerrit access control
o approval-value -- Approval value for the comment added.
o comment-added-contains-event (dict) -- Trigger on comment added contains Regular Expression.
Comment added contains
o comment-contains-value (str) -- Comment contains Regular Expression value.
o trigger-on-patchset-uploaded-event (bool) --
Trigger on patchset upload.
Deprecated since version 1.1.0.: Please use trigger-on.
o trigger-on-change-abandoned-event (bool) --
Trigger on change abandoned. Requires Gerrit Trigger Plugin version >= 2.8.0
Deprecated since version 1.1.0.: Please use trigger-on.
o trigger-on-change-merged-event (bool) --
Trigger on change merged
Deprecated since version 1.1.0.: Please use trigger-on.
o trigger-on-change-restored-event (bool) --
Trigger on change restored. Requires Gerrit Trigger Plugin version >= 2.8.0
Deprecated since version 1.1.0.: Please use trigger-on.
o trigger-on-comment-added-event (bool) --
Trigger on comment added
Deprecated since version 1.1.0.: Please use trigger-on.
o trigger-on-draft-published-event (bool) --
Trigger on draft published event
Deprecated since version 1.1.0: Please use trigger-on.
o trigger-on-ref-updated-event (bool) --
Trigger on ref-updated
Deprecated since version 1.1.0.: Please use trigger-on.
o trigger-approval-category (str) --
Approval category for comment added
Deprecated since version 1.1.0.: Please use trigger-on.
o trigger-approval-value (int) --
Approval value for comment added
Deprecated since version 1.1.0.: Please use trigger-on.
o override-votes (bool) -- Override default vote values
o gerrit-build-started-verified-value (int) -- Started \(aq\(aqVerified\(aq\(aq value
o gerrit-build-successful-verified-value (int) -- Successful \(aq\(aqVerified\(aq\(aq value
o gerrit-build-failed-verified-value (int) -- Failed \(aq\(aqVerified\(aq\(aq value
o gerrit-build-unstable-verified-value (int) -- Unstable \(aq\(aqVerified\(aq\(aq value
o gerrit-build-notbuilt-verified-value (int) -- Not built \(aq\(aqVerified\(aq\(aq value
o gerrit-build-started-codereview-value (int) -- Started \(aq\(aqCodeReview\(aq\(aq value
o gerrit-build-successful-codereview-value (int) -- Successful \(aq\(aqCodeReview\(aq\(aq value
o gerrit-build-failed-codereview-value (int) -- Failed \(aq\(aqCodeReview\(aq\(aq value
o gerrit-build-unstable-codereview-value (int) -- Unstable \(aq\(aqCodeReview\(aq\(aq value
o gerrit-build-notbuilt-codereview-value (int) -- Not built \(aq\(aqCodeReview\(aq\(aq value
o failure-message (str) -- Message to leave on failure (default \(aq\(aq)
o successful-message (str) -- Message to leave on success (default \(aq\(aq)
o unstable-message (str) -- Message to leave when unstable (default \(aq\(aq)
o notbuilt-message (str) -- Message to leave when not built (default \(aq\(aq)
o failure-message-file (str) -- Sets the filename within the workspace from which to retrieve the unsuccessful review message. (optional)
o projects (list) --
list of projects to match
Project
o project-compare-type (str) -- \(aq\(aqPLAIN\(aq\(aq, \(aq\(aqANT\(aq\(aq or \(aq\(aqREG_EXP\(aq\(aq
o project-pattern (str) -- Project name pattern to match
o branch-compare-type (str) -- \(aq\(aqPLAIN\(aq\(aq, \(aq\(aqANT\(aq\(aq or \(aq\(aqREG_EXP\(aq\(aq (not used if branches list is specified)
Deprecated since version 1.1.0: Please use branches.
o branch-pattern (str) -- Branch name pattern to match (not used if branches list is specified)
Deprecated since version 1.1.0: Please use branches.
o branches (list) -- List of branches to match (optional)
Branch
o branch-compare-type (str) -- \(aq\(aqPLAIN\(aq\(aq, \(aq\(aqANT\(aq\(aq or \(aq\(aqREG_EXP\(aq\(aq (optional) (default \(aq\(aqPLAIN\(aq\(aq)
o branch-pattern (str) -- Branch name pattern to match
o file-paths (list) -- List of file paths to match (optional)
File Path
o compare-type (str) -- \(aq\(aqPLAIN\(aq\(aq, \(aq\(aqANT\(aq\(aq or \(aq\(aqREG_EXP\(aq\(aq (optional) (default \(aq\(aqPLAIN\(aq\(aq)
o pattern (str) -- File path pattern to match
o forbidden-file-paths (list) -- List of file paths to skip triggering (optional)
Forbidden File Path
o compare-type (str) -- \(aq\(aqPLAIN\(aq\(aq, \(aq\(aqANT\(aq\(aq or \(aq\(aqREG_EXP\(aq\(aq (optional) (default \(aq\(aqPLAIN\(aq\(aq)
o pattern (str) -- File path pattern to match
o topics (list) -- List of topics to match (optional)
Topic
o compare-type (str) -- \(aq\(aqPLAIN\(aq\(aq, \(aq\(aqANT\(aq\(aq or \(aq\(aqREG_EXP\(aq\(aq (optional) (default \(aq\(aqPLAIN\(aq\(aq)
o pattern (str) -- Topic name pattern to match
o
disable-strict-forbidden-file-verification (bool) --
Enabling this option will allow an event to trigger a build if the event contains BOTH one or more wanted file paths AND one or more forbidden file paths. In other words, with this option, the build will not get triggered if the change contains only forbidden files, otherwise it will get triggered. Requires plugin version >= 2.16.0 (default false)
o skip-vote (dict) --
map of build outcomes for which Jenkins must skip vote. Requires Gerrit Trigger Plugin version >= 2.7.0
Outcome
o successful (bool)
o failed (bool)
o unstable (bool)
o notbuilt (bool)
o silent (bool) -- When silent mode is on there will be no communication back to Gerrit, i.e. no build started/failed/successful approve messages etc. If other non-silent jobs are triggered by the same Gerrit event as this job, the result of this job\(aqs build will not be counted in the end result of the other jobs. (default false)
o silent-start (bool) -- Sets silent start mode to on or off. When silent start mode is on there will be no \(aqbuild started\(aq messages sent back to Gerrit. (default false)
o escape-quotes (bool) -- escape quotes in the values of Gerrit change parameters (default true)
o no-name-and-email (bool) -- Do not pass compound \(aqname and email\(aq parameters (default false)
o readable-message (bool) -- If parameters regarding multiline text, e.g. commit message, should be as human readable or not. If false, those parameters are Base64 encoded to keep environment variables clean. (default false)
o dependency-jobs (str) -- All jobs on which this job depends. If a commit should trigger both a dependency and this job, the dependency will be built first. Use commas to separate job names. Beware of cyclic dependencies. (optional)
o notification-level (str) -- Defines to whom email notifications should be sent. This can either be nobody (\(aqNONE\(aq), the change owner (\(aqOWNER\(aq), reviewers and change owner (\(aqOWNER_REVIEWERS\(aq), all interested users i.e. owning, reviewing, watching, and starring (\(aqALL\(aq) or server default (\(aqSERVER_DEFAULT\(aq). (default \(aqSERVER_DEFAULT\(aq)
o dynamic-trigger-enabled (bool) -- Enable/disable the dynamic trigger (default false)
o dynamic-trigger-url (str) -- if you specify this option, the Gerrit trigger configuration will be fetched from there on a regular interval
o trigger-for-unreviewed-patches (bool) -- trigger patchset-created events for changes that were uploaded while connection to Gerrit was down (default false). Requires Gerrit Trigger Plugin version >= 2.11.0
o custom-url (str) -- Custom URL for a message sent to Gerrit. Build details URL will be used if empty. (default \(aq\(aq)
o server-name (str) -- Name of the server to trigger on, or \(aq\(aq__ANY__\(aq\(aq to trigger on any configured Gerrit server (default \(aq__ANY__\(aq). Requires Gerrit Trigger Plugin version >= 2.11.0
You may select one or more Gerrit events upon which to trigger. You must also supply at least one project and branch, optionally more. If you select the comment-added trigger, you should also indicate which approval category and value you want to trigger the job.
Until version 0.4.0 of Jenkins Job Builder, camelCase keys were used to configure Gerrit Trigger Plugin, instead of hyphenated-keys. While still supported, camedCase keys are deprecated and should not be used. Support for this will be removed after 1.0.0 is released.
Example:
triggers:
  - gerrit:
      trigger-on:
        - patchset-created-event:
            exclude-drafts: true
            exclude-trivial-rebase: true
            exclude-no-code-change: true
            exclude-private: true
            exclude-wip: true
        - comment-added-event:
            approval-category: \(aqAPRV\(aq
            approval-value: 1
      projects:
        - project-compare-type: \(aqPLAIN\(aq
          project-pattern: \(aqtest-project\(aq
          branches:
            - branch-compare-type: \(aqPLAIN\(aq
              branch-pattern: \(aqmaster\(aq
            - branch-compare-type: \(aqPLAIN\(aq
              branch-pattern: \(aqstable\(aq
          file-paths:
              - compare-type: ANT
                pattern: subdirectory/**
          topics:
              - compare-type: ANT
                pattern: refactor-xy**
      skip-vote:
          successful: true
          failed: true
          unstable: true
          notbuilt: true
      silent: false
      silent-start: true
      escape-quotes: false
      no-name-and-email: false
      dependency-jobs: \(aqjob1, job2\(aq
      notification-level: ALL
      dynamic-trigger-enabled: true
      dynamic-trigger-url: http://myhost/mytrigger
      trigger-for-unreviewed-patches: true
      server-name: my-server
      failure-message-file: path/to/filename

github Trigger a job when github repository is pushed to. Requires the Jenkins GitHub Plugin.
Example:
triggers:
  - github
github-pull-request
Build pull requests in github and report results. Requires the Jenkins GitHub Pull Request Builder Plugin.
Parameters
o admin-list (list) -- the users with admin rights (optional)
o white-list (list) -- users whose pull requests build (optional)
o org-list (list) -- orgs whose users should be white listed (optional)
o allow-whitelist-orgs-as-admins (bool) -- members of white listed orgs will have admin rights. (default false)
o cron (string) -- cron syntax of when to run (optional)
o trigger-phrase (string) -- when filled, commenting this phrase in the pull request will trigger a build (optional)
o only-trigger-phrase (bool) -- only commenting the trigger phrase in the pull request will trigger a build (default false)
o skip-build-phrase (string) -- when filled, adding this phrase to the pull request title or body will not trigger a build (optional)
o black-list-labels (string) -- list of GitHub labels for which the build should not be triggered (optional)
o white-list-labels (string) -- list of GitHub labels for which the build should only be triggered. (Leave blank for \(aqany\(aq) (optional)
o github-hooks (bool) -- use github hook (default false)
o permit-all (bool) -- build every pull request automatically without asking (default false)
o auto-close-on-fail (bool) -- close failed pull request automatically (default false)
o white-list-target-branches (list) -- Adding branches to this whitelist allows you to selectively test pull requests destined for these branches only. Supports regular expressions (e.g. \(aqmaster\(aq, \(aqfeature-.*\(aq). (optional)
o black-list-target-branches (list) -- Adding branches to this blacklist allows you to selectively prevent pull requests builds destined for these branches. Supports regular expressions (e.g. \(aqmaster\(aq, \(aqfeature-.*\(aq). (optional)
o auth-id (string) -- the auth id to use (optional)
o build-desc-template (string) -- the template for build descriptions in jenkins (optional)
o status-context (string) -- the context to include on PR status comments (optional)
o triggered-status (string) -- the status message to set when the build has been triggered (optional)
o started-status (string) -- the status comment to set when the build has been started (optional)
o status-url (string) -- the status URL to set (optional)
o status-add-test-results (bool) -- add test result one-liner to status message (optional)
o success-status (string) -- the status message to set if the job succeeds (optional)
o failure-status (string) -- the status message to set if the job fails (optional)
o error-status (string) -- the status message to set if the job errors (optional)
o success-comment (string) -- comment to add to the PR on a successful job (optional)
o failure-comment (string) -- comment to add to the PR on a failed job (optional)
o error-comment (string) -- comment to add to the PR on an errored job (optional)
o cancel-builds-on-update (bool) -- cancel existing builds when a PR is updated (optional)
o included-regions (list) -- Each inclusion uses regular expression pattern matching, and must be separated by a new line. An empty list implies that everything is included. (optional)
o excluded-regions (list) -- Each exclusion uses regular expression pattern matching, and must be separated by a new line. Exclusions take precedence over inclusions, if there is an overlap between included and excluded regions. (optional)
Full Example:
triggers:
  - github-pull-request:
      admin-list:
        - user1
        - user2
      white-list:
        - user3
        - user4
      org-list:
        - org1
        - org2
      white-list-labels:
        - label1
        - label2
      black-list-labels:
        - label3
        - label4
      cron: \(aq* * * * *\(aq
      build-desc-template: "build description"
      trigger-phrase: \(aqretest this please\(aq
      skip-build-phrase: \(aqno tests\(aq
      only-trigger-phrase: true
      github-hooks: true
      permit-all: true
      auto-close-on-fail: false
      allow-whitelist-orgs-as-admins: true
      white-list-target-branches:
        - master
        - testing
      black-list-target-branches:
        - master
        - testing
      auth-id: \(aq123-456-789\(aq
      status-context: "status context"
      triggered-status: "triggered status message"
      started-status: "started"
      status-url: "url/to/status"
      status-add-test-results: "test result with status message"
      success-status: "success message"
      failure-status: "failure message"
      error-status: "error message"
      success-comment: "success comment"
      failure-comment: "failure comment"
      error-comment: "error-comment"
      cancel-builds-on-update: true
      included-regions:
          - include
          - region
      excluded-regions:
          - exclude
          - region

Minimal Example:
triggers:
  - github-pull-request

gitlab Makes Jenkins act like a GitLab CI server. Requires the Jenkins GitLab Plugin.
Parameters
o trigger-push (bool) -- Build on Push Events (default true)
o trigger-merge-request (bool) -- Build on Merge Request Events (default true)
o trigger-accepted-merge-request (bool) -- Build on Accepted Merge Request Events (>= 1.4.6) (default false)
o trigger-closed-merge-request (bool) -- Build on Closed Merge Request Events (>= 1.4.6) (default false)
o trigger-open-merge-request-push (str) --
Rebuild open Merge Requests on Push Events.
trigger-open-merge-request-push values (< 1.1.26)
o true (default)
o false
trigger-open-merge-request-push values (>= 1.1.26)
o never (default)
o source
o both
o trigger-note (bool) -- Build when comment is added with defined phrase (>= 1.2.4) (default true)
o note-regex (str) -- Phrase that triggers the build (>= 1.2.4) (default \(aqJenkins please retry a build\(aq)
o ci-skip (bool) -- Enable skipping builds of commits that contain [ci-skip] in the commit message (default true)
o wip-skip (bool) -- Enable skipping builds of WIP Merge Requests (>= 1.2.4) (default true)
o set-build-description (bool) -- Set build description to build cause (eg. Merge request or Git Push) (default true)
o add-note-merge-request (bool) -- Add note with build status on merge requests (default true)
o add-vote-merge-request (bool) -- Vote added to note with build status on merge requests (>= 1.1.27) (default true)
o accept-merge-request-on-success (bool) -- Automatically accept the Merge Request if the build is successful (>= 1.1.27) (default false)
o add-ci-message (bool) -- Add CI build status (1.1.28 - 1.2.0) (default false)
o allow-all-branches (bool) -- Allow all branches (Ignoring Filtered Branches) (< 1.1.29) (default false)
o branch-filter-type (str) -- Filter branches that can trigger a build. Valid values and their additional attributes are described in the branch filter type table (>= 1.1.29) (default \(aqAll\(aq).
o include-branches (list) -- Defined list of branches to include (default [])
o exclude-branches (list) -- Defined list of branches to exclude (default [])
o target-branch-regex (str) -- Regular expression to select branches
o secret-token (str) -- Secret token for build trigger
Branch filter type Description
All All branches are allowed to trigger this job.
NameBasedFilter Filter branches by name. List source branches that are allowed to trigger a build from a Push event or a Merge Request event. If both fields are left empty, all branches are allowed to trigger this job. For Merge Request events only the target branch name is filtered out by the include-branches and exclude-branches lists.
RegexBasedFilter Filter branches by regex The target branch regex allows you to limit the execution of this job to certain branches. Any branch matching the specified pattern in target-branch-regex triggers the job. No filtering is performed if the field is left empty.
Example (version < 1.1.26):
triggers:
  - gitlab:
      trigger-push: true
      trigger-merge-request: true
      trigger-open-merge-request-push: true
      ci-skip: true
      set-build-description: true
      add-note-merge-request: true
      add-vote-merge-request: true
      add-ci-message: true
      allow-all-branches: true
      include-branches:
        - \(aqmaster\(aq
        - \(aqmaster2\(aq
        - \(aqlocal-test\(aq
      exclude-branches:
        - \(aqbroken-test\(aq
        - \(aqmaster-foo\(aq

Minimal example (version >= 1.1.26):
triggers:
  - gitlab

Full example (version >= 1.1.26):
triggers:
  - gitlab:
      trigger-push: false
      trigger-merge-request: false
      trigger-open-merge-request-push: both
      ci-skip: false
      set-build-description: false
      add-note-merge-request: false
      add-vote-merge-request: false
      add-ci-message: true
      allow-all-branches: true
      include-branches:
        - \(aqmaster\(aq
        - \(aqmaster2\(aq
        - \(aqlocal-test\(aq
      exclude-branches:
        - \(aqbroken-test\(aq
        - \(aqmaster-foo\(aq

gitlab-merge-request
Build merge requests in gitlab and report results. Requires the Jenkins Gitlab MergeRequest Builder Plugin.
Parameters
o cron (string) -- Cron syntax of when to run (required)
o project-path (string) -- Gitlab-relative path to project (required)
o target-branch-regex (string) -- Allow execution of this job for certain branches only (default \(aq\(aq). Requires Gitlab MergeRequest Builder Plugin >= 2.0.0
o use-http-url (string) -- Use the HTTP(S) URL to fetch/clone repository (default false)
o assignee-filter (string) -- Only MRs with this assigned user will trigger the build automatically (default \(aqjenkins\(aq)
o tag-filter (string) -- Only MRs with this label will trigger the build automatically (default \(aqBuild\(aq)
o trigger-comment (string) -- Force build if this comment is the last in merge reguest (default \(aq\(aq)
o publish-build-progress-messages (string) --
Publish build progress messages (except build failed) (default true)
Deprecated since version 2.0.0.
o auto-close-failed (string) -- On failure, auto close the request (default false)
o auto-merge-passed (string) -- On success, auto merge the request (default false)
Example (version < 2.0.0):
triggers:
  - gitlab-merge-request:
      cron: \(aq* * * * *\(aq
      project-path: \(aqtest/project\(aq
      use-http-url: false
      assignee-filter: \(aqjenkinsbot\(aq
      tag-filter: \(aqfix\(aq
      trigger-comment: \(aqrebuild\(aq
      publish-build-progress-messages: true
      auto-close-failed: false
      auto-merge-passed: false

Example (version >= 2.0.0):
triggers:
  - gitlab-merge-request:
      cron: \(aq* * * * *\(aq
      project-path: \(aqtest/project\(aq
      target-branch-regex: \(aq(.*release.*|.*hotfix.*)\(aq
      use-http-url: false
      assignee-filter: \(aqjenkinsbot\(aq
      tag-filter: \(aqfix\(aq
      trigger-comment: \(aqrebuild\(aq
      auto-close-failed: false
      auto-merge-passed: false

groovy-script
Triggers the job using a groovy script. Requires the Jenkins ScriptTrigger Plugin.
Parameters
o system-script (bool) -- If true, run the groovy script as a system script, the script will have access to the same variables as the Groovy Console. If false, run the groovy script on the executor node, the script will not have access to the hudson or job model. (default false)
o script (str) -- Content of the groovy script. If the script result is evaluated to true, a build is scheduled. (default \(aq\(aq)
o script-file-path (str) -- Groovy script path. (default \(aq\(aq)
o property-file-path (str) -- Property file path. All properties will be set as parameters for the triggered build. (default \(aq\(aq)
o enable-concurrent (bool) -- Enable concurrent build. (default false)
o label (str) -- Restrict where the polling should run. (default \(aq\(aq)
o cron (str) -- cron syntax of when to run (default \(aq\(aq)
Full Example:
triggers:
  - groovy-script:
        script: groovy-content
        script-file-path: path/to/filename
        property-file-path: /path/to/properties/file
        cron: H/15 * * * *
        enable-concurrent: true
        label: master
        system-script: true

Minimal Example:
triggers:
  - groovy-script

ivy Poll with an Ivy script Requires the Jenkins IvyTrigger Plugin.
Parameters
o path (str) -- Path of the ivy file. (optional)
o settings-path (str) -- Ivy Settings Path. (optional)
o str properties-file (list) -- List of properties file path. Properties will be injected as variables in the ivy settings file. (optional)
o properties-content (str) -- Properties content. Properties will be injected as variables in the ivy settings file. (optional)
o debug (bool) -- Active debug mode on artifacts resolution. (default false)
o download-artifacts -- Download artifacts for dependencies to see if they have changed. (default true)
o enable-concurrent (bool) -- Enable Concurrent Build. (default false)
o label (str) -- Restrict where the polling should run. (default \(aq\(aq)
o cron (str) -- cron syntax of when to run (default \(aq\(aq)
Example:
triggers:
  - ivy:
        path: path/to/file
        settings-path: path/to/settings/file
        properties-file:
            - \(aqfilename1\(aq
            - \(aqfilename2\(aq
        debug: true
        cron: \(aqH/15 * * * *\(aq
        enable-concurrent: False
        label: master

jira-changelog
Sets up a trigger that listens to JIRA issue changes Requires the Jenkins JIRA Trigger Plugin.
Parameters
o jql-filter (str) -- Must match updated issues to trigger a build. (default \(aq\(aq)
o changelog-matchers (list) -- .INDENT 2.0
Custom Field Matcher
o
custom-field-name (str) -- The custom field
name that has been changed during the issue update. (default \(aq\(aq)
o
compare-new-value (bool) -- Compare the
new value of the updated field. (default false)
o
new-value (str) -- The new value of the updated field.
(default \(aq\(aq)
o
compare-old-value (bool) -- Compare the
old value of the updated field. (default false)
o
old-value (str) -- The value
before the field is updated. (default \(aq\(aq)
JIRA Field Matcher
o
jira-field-ID (str) -- The JIRA Field ID that
has been changed during the issue update. (default \(aq\(aq)
o
compare-new-value (bool) -- Compare the new value
of the updated field. (default false)
o
new-value (str) -- The new value of the updated field.
(default \(aq\(aq)
o
compare-old-value (bool) -- Compare the old value
of the updated field. (default false)
o
old-value (str) -- The value before
the field is updated. (default \(aq\(aq)
o parameter-mapping (list) -- .INDENT 2.0
Issue Attribute Path
o
jenkins-parameter (str) -- Jenkins parameter name
(default \(aq\(aq)
o issue-attribute-path (str) -- Attribute path (default \(aq\(aq)
Minimal Example:
triggers:
  - jira-changelog

Full Example:
triggers:
  - jira-changelog:
      jql-filter: filter
      changelog-matchers:
          - field-type: \(aqCUSTOM\(aq
            field: name
            new-value: val1
            old-value: val2
            compare-new-value: true
            compare-old-value: true
          - field-type: \(aqJIRA\(aq
            field: versions
            new-value: val3
            old-value: val4
            compare-new-value: true
            compare-old-value: true
      parameter-mapping:
          - jenkins-parameter: param
            issue-attribute-path: path

jira-comment-trigger
Trigger builds when a comment is added to JIRA. Requires the Jenkins JIRA Trigger Plugin.
Parameters
o jql-filter (str) -- Must match updated issues to trigger a build. (default \(aq\(aq)
o comment-pattern (str) -- Triggers build only when the comment added to JIRA matches pattern (default \(aq(?i)build this please\(aq)
o parameter-mapping (list) -- .INDENT 2.0
Issue Attribute Path
o
jenkins-parameter (str) -- Jenkins parameter name
(default \(aq\(aq)
o issue-attribute-path (str) -- Attribute path (default \(aq\(aq)
Minimal Example:
triggers:
  - jira-comment-trigger

Full Example:
triggers:
  - jira-comment-trigger:
      jql-filter: filter
      comment-pattern: comment
      parameter-mapping:
        - jenkins-parameter: param1
          issue-attribute-path: \(aqpath/to/attribute\(aq

jms-messaging
The JMS Messaging Plugin provides the following functionality:
o A build trigger to submit jenkins jobs upon receipt of a matching message.
o A builder that may be used to submit a message to the topic upon the completion of a job
o A post-build action that may be used to submit a message to the topic upon the completion of a job
JMS Messaging provider types supported:
o ActiveMQ
o FedMsg
Requires the Jenkins JMS Messaging Plugin.
Parameters
o no-squash (bool) -- true = schedule a new job for every triggering message. (default false) Normally if a job is queued and another triggering message is received, a new job is not submitted and the job is "squashed" into the job already queued. Setting this option to \(aqTrue\(aq forces a new job to be submitted for every triggering message that is received.
o override-topic (str) -- If you need to override the default topic. (default \(aq\(aq)
o selector (str) -- The JSON or YAML formatted text that conforms to the schema for defining the various OpenShift resources. (default \(aq\(aq) note: topic needs to be in double quotes ex. topic = "org.fedoraproject.prod.fedimg.image.upload"
o provider-name (str) -- Name of message provider setup in the global config. (default \(aq\(aq)
o checks (list) -- List of checks to monitor. (default [])
o field (str) -- Check the body of messages for a field. (default \(aq\(aq)
o expected-value (str) -- Expected value for the field. regex (default \(aq\(aq)
Full Example:
triggers:
  - jms-messaging:
      no-squash: True
      selector: topic = "org.fedoraproject.prod.fedimg.image.upload"
      provider-name: fedmsg
      checks:
        - field: compose
          expected-value: .+compose_id.+Fedora-Atomic.+
        - field: image_name
          expected-value: .+Fedora-Atomic.+

Minimal Example:
triggers:
  - jms-messaging:
      selector: topic = "org.fedoraproject.prod.fedimg.image.upload"
      provider-name: fedmsg

monitor-files
Configure Jenkins to monitor files. Requires the Jenkins Filesystem Trigger Plugin.
Parameters
o files (list) --
List of files to monitor
File
o path (str) -- File path to monitor. You can use a pattern that specifies a set of files if you don\(aqt know the real file path. (required)
o strategy (str) -- Choose your strategy if there is more than one matching file. Can be one of Ignore file (\(aqIGNORE\(aq) or Use the most recent (\(aqLATEST\(aq). (default \(aqLATEST\(aq)
o check-content (list) -- List of content changes of the file to monitor
Content Nature
o simple (bool) -- Trigger on change in content of the specified file (whatever the type file). (default false)
o jar (bool) -- Trigger on change in content of the specified JAR file. (default false)
o tar (bool) -- Trigger on change in content of the specified Tar file. (default false)
o zip (bool) -- Trigger on change in content of the specified ZIP file. (default false)
o source-manifest (list) -- Trigger on change to MANIFEST files.
MANIFEST File
o keys (list) -- List of keys to inspect. (optional)
o all-keys (bool) -- If true, take into account all keys. (default true)
o jar-manifest (list) -- Trigger on change to MANIFEST files (contained in jar files).
MANIFEST File
o keys (list) -- List of keys to inspect. (optional)
o all-keys (bool) -- If true, take into account all keys. (default true)
o properties (list) -- Monitor the contents of the properties file.
Properties File
o keys (list) -- List of keys to inspect. (optional)
o all-keys (bool) -- If true, take into account all keys. (default true)
o xml (list str) -- Trigger on change to the listed XPath expressions.
o text (list str) -- Trigger on change to the listed regular expressions.
o ignore-modificaton-date (bool) -- If true, ignore the file modification date. Only valid when content changes of the file are being monitored. (default true)
o cron (str) -- cron syntax of when to run (default \(aq\(aq)
Minimal Example:
triggers:
  - monitor-files:
      files:
          - path: \(aqpath1\(aq

Full Example:
triggers:
  - monitor-files:
      cron: \(aq* * * * *\(aq
      files:
          - path: \(aqpath1\(aq
            strategy: \(aqIGNORE\(aq
          - path: \(aqpath2\(aq
            check-content:
                - simple: true
                - jar: true
                - tar: true
                - zip: true
                - source-manifest:
                    - all-keys: false
                      keys:
                          - key1
                          - key2
                - jar-manifest:
                    - keys:
                          - key1
                          - key2
                - properties:
                    - all-keys: false
                      keys:
                          - prop1
                          - prop2
                - xml:
                    - \(aqxpath1\(aq
                    - \(aqxpath2\(aq
                - text:
                    - \(aqregex1\(aq
            ignore-modificaton-date: false

monitor-folders
Configure Jenkins to monitor folders. Requires the Jenkins Filesystem Trigger Plugin.
Parameters
o path (str) -- Folder path to poll. (default \(aq\(aq)
o includes (list) -- Fileset includes setting that specifies the list of includes files. Basedir of the fileset is relative to the workspace root. If no value is set, all files are used. (default \(aq\(aq)
o excludes (str) -- The \(aqexcludes\(aq pattern. A file that matches this mask will not be polled even if it matches the mask specified in \(aqincludes\(aq section. (default \(aq\(aq)
o check-modification-date (bool) -- Check last modification date. (default true)
o check-content (bool) -- Check content. (default true)
o check-fewer (bool) -- Check fewer files (default true)
o cron (str) -- cron syntax of when to run (default \(aq\(aq)
Full Example:
triggers:
  - monitor-folders:
      path: \(aqpathname\(aq
      includes:
        - \(aqpattern1\(aq
        - \(aqpattern2\(aq
      excludes: \(aqpattern1\(aq
      check-modification-date: false
      check-content: false
      check-fewer: false
      cron: H/15 * * * *

Minimal Example:
triggers:
  - monitor-folders

parameterized-timer
Trigger builds with parameters at certain times. Requires the Jenkins Parameterized Scheduler Plugin.
Parameters
cron (str) -- cron syntax of when to run and with which parameters (required)
Example:
triggers:
  - parameterized-timer:
      cron: "@midnight % PARAM=value"

pollscm
Poll the SCM to determine if there has been a change.
Parameter
the polling interval (cron syntax)
Deprecated since version 1.3.0.: Please use cron.
Parameters
o cron (string) -- the polling interval (cron syntax, required)
o ignore-post-commit-hooks (bool) -- Ignore changes notified by SCM post-commit hooks. The subversion-plugin supports this since version 1.44. (default false)
Example:
triggers:
  - pollscm:
      cron: "*/30 * * * *"
      ignore-post-commit-hooks: True

pollurl
Trigger when the HTTP response from a URL changes. Requires the Jenkins URLTrigger Plugin.
Parameters
o cron (string) -- cron syntax of when to run (default \(aq\(aq)
o polling-node (string) -- Restrict where the polling should run. (optional)
o urls (list) --
List of URLs to monitor
URL
o url (str) -- URL to monitor for changes (required)
o proxy (bool) -- Activate the Jenkins proxy (default false)
o timeout (int) -- Connect/read timeout in seconds (default 300)
o username (string) -- User name for basic authentication (optional)
o password (string) -- Password for basic authentication (optional)
o check-status (int) -- Check for a specific HTTP status code (optional)
o check-etag (bool) -- Check the HTTP ETag for changes (default false)
o check-date (bool) -- Check the last modification date of the URL (default false)
o check-content (list) -- List of content type changes to monitor
Content Type
o simple (bool) -- Trigger on any change to the content of the URL (default false)
o json (list) -- Trigger on any change to the listed JSON paths
o text (list) -- Trigger on any change to the listed regular expressions
o xml (list) -- Trigger on any change to the listed XPath expressions
Example:
triggers:
  - pollurl:
      cron: \(aq* * * * *\(aq
      polling-node: \(aqlabel expression\(aq
      urls:
        - url: \(aqhttp://example.com/url1\(aq
          proxy: false
          timeout: 442
          username: username
          password: sekr3t
          check-status: 202
          check-etag: false
          check-date: true
          check-content:
            - simple: true
            - json:
              - \(aq$..author\(aq
              - \(aq$.store..price\(aq
        - url: \(aqhttp://example.com/url2\(aq
          proxy: true
          check-etag: true
          check-content:
            - simple: false
            - xml:
              - \(aq//author\(aq
              - \(aq/store//price\(aq
            - text:
              - \(aq\d+\(aq

rabbitmq
This plugin triggers build using remote build message in RabbitMQ queue. Requires the Jenkins RabbitMQ Build Trigger Plugin.
Parameters
o token (str) -- the build token expected in the message queue (required)
o filters (list) --
list of filters to apply (optional)
Filter
o field (str) - Some field in message (required)
o value (str) - value of specified field (required)
Example:
triggers:
  - rabbitmq:
      token: \(aqbuild_trigger_token\(aq

Example with filters:
triggers:
  - rabbitmq:
      token: \(aqbuild_trigger_token\(aq
      filters:
        - field: \(aqfield1\(aq
          value: \(aqvalue1\(aq
        - field: \(aqfield2\(aq
          value: \(aqvalue2\(aq

reverse
This trigger can be configured in the UI using the checkbox with the following text: \(aqBuild after other projects are built\(aq.
Set up a trigger so that when some other projects finish building, a new build is scheduled for this project. This is convenient for running an extensive test after a build is complete, for example.
This configuration complements the "Build other projects" section in the "Post-build Actions" of an upstream project, but is preferable when you want to configure the downstream project.
Parameters
o jobs (str) -- List of jobs to watch. Can be either a comma separated list or a list.
o result (str) -- Build results to monitor for between the following options: success, unstable and failure. (default \(aqsuccess\(aq).
Example:
triggers:
  - reverse:
        jobs: \(aqFantastic-job\(aq
        result: \(aqfailure\(aq

Example List:
triggers:
  - reverse:
        jobs:
            - \(aqa\(aq
            - \(aqb\(aq
            - \(aqc\(aq
        result: \(aqfailure\(aq

script Triggers the job using shell or batch script. Requires the Jenkins ScriptTrigger Plugin.
Parameters
o label (str) -- Restrict where the polling should run. (default \(aq\(aq)
o script (str) -- A shell or batch script. (default \(aq\(aq)
o script-file-path (str) -- A shell or batch script path. (default \(aq\(aq)
o cron (str) -- cron syntax of when to run (default \(aq\(aq)
o enable-concurrent (bool) -- Enables triggering concurrent builds. (default false)
o exit-code (int) -- If the exit code of the script execution returns this expected exit code, a build is scheduled. (default 0)
Full Example:
triggers:
  - script:
        script: \(aqexit 0\(aq
        script-file-path: \(aq$WORKSPACE/scripts\(aq
        cron: \(aqH/15 * * * *\(aq
        enable-concurrent: true
        label: master
        exit-code: 0

Minimal Example:
triggers:
  - script

stash-pull-request
Trigger builds via Stash/Bitbucket Server Pull Requests. Requires the Jenkins Stash Pull Request Builder Plugin.
arg str cron
cron syntax of when to run (required)
arg str stash-host
The HTTP or HTTPS URL of the Stash host (NOT ssh). e.g.: https://example.com (required)
arg str credentials-id
Jenkins credential set to use. (required)
arg str project
Abbreviated project code. e.g.: PRJ or ~user (required)
arg str repository
Stash Repository Name. e.g.: Repo (required)
arg str ci-skip-phrases
CI Skip Phrases. (default \(aqNO TEST\(aq)
arg str ci-build-phrases
CI Build Phrases. (default \(aqtest this please\(aq)
arg str target-branches
Target branches to filter. (default \(aq\(aq)
arg bool ignore-ssl
Ignore SSL certificates for Stash host. (default false)
arg bool check-destination-commit
Rebuild if destination branch changes. (default false)
arg bool check-mergable
Build only if PR is mergeable. (default false)
arg bool merge-on-success
Merge PR if build is successful. (default false)
arg bool check-not-conflicted
Build only if Stash reports no conflicts. (default false)
arg bool only-build-on-comment
Only build when asked (with test phrase). (default false)
arg bool delete-previous-build-finish-comments
Keep PR comment only for most recent Build. (default false)
arg bool cancel-outdated-jobs
Cancel outdated jobs. (default false)
Minimal Example:
triggers:
  - stash-pull-request:
      cron: "* * * * *"
      stash-host: "https://stash-host.com"
      credentials-id: default-stash-credentials
      project: stash-project
      repository: stash-repo

Full Example:
triggers:
  - stash-pull-request:
      cron: "H 1 2 3 4"
      stash-host: "https://stash-host.com"
      credentials-id: default-stash-credentials
      project: stash-project
      repository: stash-repo
      ci-skip-phrases: "test skip phrase"
      ci-build-phrases: "test build phrase"
      target-branches: "master"
      ignore-ssl: true
      check-destination-commit: true
      check-mergable: true
      merge-on-success: true
      check-not-conflicted: false
      only-build-on-comment: true
      delete-previous-build-finish-comments: true
      cancel-outdated-jobs: true

timed Trigger builds at certain times.
Parameter
when to run the job (cron syntax)
Example:
triggers:
  - timed: "@midnight"

Wrappers

Wrappers can alter the way the build is run as well as the build output.
Component: wrappers
Macro wrapper
Entry Point
jenkins_jobs.wrappers
class wrappers.Wrappers(registry)
gen_xml(xml_parent, data)
Update the XML element tree based on YAML data. Override this method to add elements to the XML output. Create new Element objects and add them to the xml_parent. The YAML data structure must not be modified.
Parameters
o parser (YAMLParser) -- the global YAML Parser
o xml_parent (Element) -- the parent XML element
o data (dict) -- the YAML data structure
android-emulator
Automates many Android development tasks including SDK installation, build file generation, emulator creation and launch, APK (un)installation... Requires the Jenkins Android Emulator Plugin.
Parameters
o avd (str) -- Enter the name of an existing Android emulator configuration. If this is exclusive with the \(aqos\(aq arg.
o os (str) -- Can be an OS version, target name or SDK add-on
o screen-density (str) -- Density in dots-per-inch (dpi) or as an alias, e.g. "160" or "mdpi". (default mdpi)
o screen-resolution (str) -- Can be either a named resolution or explicit size, e.g. "WVGA" or "480x800". (default WVGA)
o locale (str) -- Language and country pair. (default en_US)
o target-abi (str) -- Name of the ABI / system image to be used. (optional)
o sd-card (str) -- sd-card size e.g. "32M" or "10240K". (optional)
o wipe (bool) -- if true, the emulator will have its user data reset at start-up (default false)
o show-window (bool) -- if true, the Android emulator user interface will be displayed on screen during the build. (default false)
o snapshot (bool) -- Start emulator from stored state (default false)
o delete (bool) -- Delete Android emulator at the end of build (default false)
o startup-delay (int) -- Wait this many seconds before attempting to start the emulator (default 0)
o commandline-options (str) -- Will be given when starting the Android emulator executable (optional)
o exe (str) -- The emulator executable. (optional)
o hardware-properties (list) -- Dictionary of hardware properties. Allows you to override the default values for an AVD. (optional)
Example:
wrappers:
  - android-emulator:
      os: android-19
      target-abi: x86
      sd-card: 16MB
      hardware-properties:
        hw.accelerometer: 100
      wipe: true
      show-window: true
      snapshot: true
      delete: true
      startup-delay: 10
      commandline-options: "-gpu on -no-audio"
      exe: emulator-arm

ansicolor
Translate ANSI color codes to HTML in the console log. Requires the Jenkins Ansi Color Plugin.
Parameters
colormap (string) -- Color mapping to use (default xterm)
Minimal Example:
wrappers:
  - ansicolor

Full Example:
wrappers:
  - ansicolor:
      colormap: "gnome-terminal"

artifactory-generic
Wrapper for non-Maven projects. Requires the Artifactory Plugin
Parameters
o url (str) -- URL of the Artifactory server. e.g. https://www.jfrog.com/artifactory/ (default \(aq\(aq)
o name (str) -- Artifactory user with permissions use for connected to the selected Artifactory Server (default \(aq\(aq)
o repo-key (str) -- Release repository name (plugin < 2.3.0) (default \(aq\(aq)
o snapshot-repo-key (str) -- Snapshots repository name (plugin < 2.3.0) (default \(aq\(aq)
o key-from-select (str) -- Repository key to use (plugin >= 2.3.0) (default \(aq\(aq)
o key-from-text (str) -- Repository key to use that can be configured dynamically using Jenkins variables (plugin >= 2.3.0) (default \(aq\(aq)
o upload-spec (str) -- File Spec schema for uploading files is as follows (default \(aq\(aq)
o download-spec (str) -- File Spec schema for downloading files is as follows (default \(aq\(aq)
o upload-spec-file (str) -- File location for uploading Spec schema (default \(aq\(aq)
o download-spec-file (str) -- File location for downloading Spec schema (default \(aq\(aq)
o deploy-pattern (list) -- List of patterns for mappings build artifacts to published artifacts. Supports Ant-style wildcards mapping to target directories. E.g.: /.zip=>dir (default [])
o resolve-pattern (list) -- List of references to other artifacts that this build should use as dependencies.
o matrix-params (list) -- List of properties to attach to all deployed artifacts in addition to the default ones: build.name, build.number, and vcs.revision (default [])
o deploy-build-info (bool) -- Deploy jenkins build metadata with artifacts to Artifactory (default false)
o env-vars-include (bool) -- Include environment variables accessible by the build process. Jenkins-specific env variables are always included. Use the env-vars-include-patterns and env-vars-exclude-patterns to filter the environment variables published to artifactory. (default false)
o env-vars-include-patterns (list) -- List of environment variable patterns for including env vars as part of the published build info. Environment variables may contain the * and the ? wildcards (default [])
o env-vars-exclude-patterns (list) -- List of environment variable patterns that determine the env vars excluded from the published build info (default [])
o discard-old-builds (bool) -- Remove older build info from Artifactory (default false)
o discard-build-artifacts (bool) -- Remove older build artifacts from Artifactory (default false)
Example:
wrappers:
  - artifactory-generic:
      url: http://artifactory.example.net/artifactory
      name: \(aqtest\(aq
      deploy-build-info: true
      repo-key: \(aqrelease-repo\(aq
      snapshot-repo-key: \(aqsnapshot-repo\(aq
      deploy-pattern:
      - \(aq*.zip=>results\(aq
      resolve-pattern:
      - \(aqlibs-release-local:prod/*=>prod-jars\(aq
      matrix-params:
      - \(aqcustom_prop=${PROJECT_ENV_VAR}\(aq
      env-vars-include: true
      env-vars-include-patterns:
      - \(aqPROJECT_*\(aq
      - \(aqORG_*\(aq
      discard-old-builds: true
      discard-build-artifacts: true

artifactory-maven
Wrapper for non-Maven projects. Requires the Artifactory Plugin
Parameters
o url (str) -- URL of the Artifactory server. e.g. https://www.jfrog.com/artifactory/ (default \(aq\(aq)
o name (str) -- Artifactory user with permissions use for connected to the selected Artifactory Server (default \(aq\(aq)
o repo-key (str) -- Name of the repository to search for artifact dependencies. Provide a single repo-key or provide separate release-repo-key and snapshot-repo-key.
o release-repo-key (str) -- Release repository name. Value of repo-key take priority over release-repo-key if provided.
o snapshot-repo-key (str) -- Snapshots repository name. Value of repo-key take priority over release-repo-key if provided.
Example:
wrappers:
  - artifactory-maven:
      url: http://artifactory.example.net/artifactory
      name: \(aqtest\(aq
      repo-key: repo

artifactory-maven-freestyle
Wrapper for Free Stype projects. Requires the Artifactory plugin. Requires Artifactory Plugin
Parameters
o url (str) -- URL of the Artifactory server. e.g. https://www.jfrog.com/artifactory/ (default \(aq\(aq)
o name (str) -- Artifactory user with permissions use for connected to the selected Artifactory Server (default \(aq\(aq)
o release-repo-key (str) -- Release repository name (default \(aq\(aq)
o snapshot-repo-key (str) -- Snapshots repository name (default \(aq\(aq)
o publish-build-info (bool) -- Push build metadata with artifacts (default false)
o discard-old-builds (bool) -- Remove older build info from Artifactory (default true)
o discard-build-artifacts (bool) -- Remove older build artifacts from Artifactory (default false)
o include-env-vars (bool) -- Include all environment variables accessible by the build process. Jenkins-specific env variables are always included (default false)
o run-checks (bool) -- Run automatic license scanning check after the build is complete (default false)
o include-publish-artifacts (bool) -- Include the build\(aqs published module artifacts in the license violation checks if they are also used as dependencies for other modules in this build (default false)
o license-auto-discovery (bool) -- Tells Artifactory not to try and automatically analyze and tag the build\(aqs dependencies with license information upon deployment (default true)
o 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)
o 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)
o 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)
o 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 \(aq\(aq)
o violation-recipients (str) -- Recipients that need to be notified of license violations in the build info (default \(aq\(aq)
o matrix-params (list) -- List of properties to attach to all deployed artifacts in addition to the default ones: build.name, build.number, and vcs.revision (default \(aq\(aq)
o black-duck-app-name (str) -- The existing Black Duck Code Center application name (default \(aq\(aq)
o black-duck-app-version (str) -- The existing Black Duck Code Center application version (default \(aq\(aq)
o black-duck-report-recipients (str) -- Recipients that will be emailed a report after the automatic Black Duck Code Center compliance checks finished (default \(aq\(aq)
o 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 \(aq\(aq)
o black-duck-run-checks (bool) -- Automatic Black Duck Code Center compliance checks will occur after the build completes (default false)
o black-duck-include-published-artifacts (bool) -- Include the build\(aqs published module artifacts in the license violation checks if they are also used as dependencies for other modules in this build (default false)
o 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)
o 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)
o deploy-artifacts (bool) -- Push artifacts to the Artifactory Server. The specific artifacts to push are controlled using the deployment-include-patterns and deployment-exclude-patterns. (default true)
o deployment-include-patterns (list) -- List of patterns for including build artifacts to publish to artifactory. (default[]\(aq)
o deployment-exclude-patterns (list) -- List of patterns for excluding artifacts from deployment to Artifactory (default [])
o env-vars-include (bool) -- Include environment variables accessible by the build process. Jenkins-specific env variables are always included. Environment variables can be filtered using the env-vars-include-patterns nad env-vars-exclude-patterns. (default false)
o env-vars-include-patterns (list) -- List of environment variable patterns that will be included as part of the published build info. Environment variables may contain the * and the ? wildcards (default [])
o env-vars-exclude-patterns (list) -- List of environment variable patterns that will be excluded from the published build info (default [])
Example:
wrappers:
  - artifactory-maven-freestyle:
      url: http://artifactory.example.net/artifactory
      name: \(aqtest\(aq
      repo-key: repo
      matrix-params:
      - \(aqcustom_prop=${PROJECT_ENV_VAR}\(aq
      deployment-include-patterns:
      - \(aq*.zip=>results\(aq
      env-vars-include: true
      env-vars-include-patterns:
      - \(aqPROJECT_*\(aq
      - \(aqORG_*\(aq

build-keeper
Keep builds based on specific policy. Requires the Jenkins Build Keeper Plugin.
Parameters
o policy (str) --
Policy to keep builds.
policy values
o by-day
o keep-since
o build-number
o keep-first-failed
o run-condition
o build-period (int) -- Number argument to calculate build to keep, depends on the policy. (default 0)
o dont-keep-failed (bool) -- Flag to indicate if to keep failed builds. (default false)
o number-of-fails (int) -- number of consecutive failed builds in order to mark first as keep forever, only applies to keep-first-failed policy (default 0)
o keep-build (bool) -- Build will be kept if there is a problem evaluating the RunCondition (default false)
o token (str) -- Token value for the boolean condition (default \(aq\(aq)
o build-cause (list) -- The cause why the build was triggered (default USER_CAUSE)
o exclusive-cause (bool) -- Cause must be the only one causing this build to be triggered (default False)
o command (str) -- Contents of your shell script (default \(aq\(aq)
o allowed-nodes (str) -- Node to be executed on (default \(aq\(aq)
o expression (str) -- The regular expression used to match the label (default \(aq\(aq)
o label (str) -- The label that will be tested by the regular expression (default \(aq\(aq)
o arg1 (str) -- First string argument for strings-match condition (default \(aq\(aq)
o arg2 (str) -- Second string argument for strings-match condition (default \(aq\(aq)
o ignore-case (bool) -- Ignore the case of the strings when matching the two string arguments (default False)
Example:
wrappers:
  - build-keeper:
      policy: \(aqby-day\(aq
      build-period: 10
      dont-keep-failed: true

wrappers:
  - build-keeper:
      policy: \(aqkeep-first-failed\(aq
      number-of-fails: 1

build-name
Set the name of the build Requires the Jenkins Build Name Setter Plugin.
Parameters
name (str) -- Name for the build. Typically you would use a variable from Jenkins in the name. The syntax would be ${FOO} for the FOO variable.
Example:
wrappers:
  - build-name:
      name: Build-${FOO}
build-user-vars
Set environment variables to the value of the user that started the build. Requires the Jenkins Build User Vars Plugin.
Example:
wrappers:
  - build-user-vars
ci-skip Skip making a build for certain push. Just add [ci skip] into your commit\(aqs message to let Jenkins know, that you do not want to perform build for the next push. Requires the Jenkins Ci Skip Plugin.
Example:
wrappers:
  - ci-skip

config-file-provider
Provide configuration files (i.e., settings.xml for maven etc.) which will be copied to the job\(aqs workspace. Requires the Jenkins Config File Provider Plugin.
Parameters
files (list) --
List of managed config files made up of three parameters
files
o file-id (str) -- The identifier for the managed config file
o target (str) -- Define where the file should be created (default \(aq\(aq)
o variable (str) -- Define an environment variable to be used (default \(aq\(aq)
o replace-tokens (bool) -- Replace tokens in config file. For example "password: ${PYPI_JENKINS_PASS}" will be replaced with the global variable configured in Jenkins.
Full Example:
wrappers:
  - config-file-provider:
      files:
        - file-id: org.jenkinsci.plugins.configfiles.custom.CustomConfig1234
        - file-id: org.jenkinsci.plugins.configfiles.custom.CustomConfig5678
          target: /foo.txt
          variable: varName
          replace-tokens: true

Minimal Example:
wrappers:
  - config-file-provider:
      files:
        - file-id: org.jenkinsci.plugins.configfiles.custom.CustomConfig1234

copy-to-slave
Copy files to slave before build Requires the Jenkins Copy To Slave Plugin.
Parameters
o includes (list) -- list of file patterns to copy (optional)
o excludes (list) -- list of file patterns to exclude (optional)
o flatten (bool) -- flatten directory structure (default false)
o relative-to (str) -- base location of includes/excludes, must be home ($JENKINS_HOME), somewhereElse ($JENKINS_HOME/copyToSlave), userContent ($JENKINS_HOME/userContent) or workspace (default userContent)
o include-ant-excludes (bool) -- exclude ant\(aqs default excludes (default false)
Minimal Example:
wrappers:
    - copy-to-slave

Full Example:
wrappers:
    - copy-to-slave:
        includes:
            - \(aqfile1\(aq
            - \(aqfile2*.txt\(aq
        excludes:
            - \(aqfile2bad.txt\(aq
        flatten: True
        relative-to: \(aqsomewhereElse\(aq
        include-ant-excludes: True

credentials-binding
Binds credentials to environment variables using the credentials binding plugin for jenkins.
Requires the Jenkins Credentials Binding Plugin version 1.1 or greater.
Parameters
binding-type (list) --
List of each bindings to create. Bindings may be of type zip-file, file, username-password, text, username-password-separated or amazon-web-services. username-password sets a variable to the username and password given in the credentials, separated by a colon. username-password-separated sets one variable to the username and one variable to the password given in the credentials. amazon-web-services sets one variable to the access key and one variable to the secret access key. Requires the AWS Credentials Plugin .
Parameters
o credential-id (str) UUID of the credential being referenced
o variable (str) Environment variable where the credential will be stored
o username (str) Environment variable for the username (Required for binding-type username-password-separated)
o password (str) Environment variable for the password (Required for binding-type username-password-separated)
o access-key (str) Environment variable for the access key (Required for binding-type amazon-web-services)
o secret-key (str) Environment variable for the access secret key (Required for binding-type amazon-web-services)
o key-file-variable (str) Environment variable to be set to the temporary path of the SSH key file during the build.
o username-variable (str) Environment variable to be set to the username during the build. (optional)
o passphrase-variable (str) Environment variable to be set to the password during the build. (optional)
o keystore-variable (str) Environment variable to be set to the temporary keystore location during the build.
o password-variable (str) Environment variable to be set to the password during the build.
o alias-variable (str) Environment variable to be set to the keystore alias name of the certificate during the build.
Example:
wrappers:
 - credentials-binding:
     - zip-file:
        credential-id: b3e6f337-5d44-4f57-921c-1632d796caa6
        variable: CONFIG_ZIP
     - file:
        credential-id: b3e6f337-5d44-4f57-921c-1632d796caab
        variable: config_file
     - username-password:
        credential-id: b3e6f337-5d44-4f57-921c-1632d796caac
        variable: config_username_password
     - text:
        credential-id: b3e6f337-5d44-4f57-921c-1632d796caad
        variable: config_text
     - docker-server-creds-binding:
        credential-id: b3e6f337-5d44-4f57-921c-1632d796caae
        variable: config_docker_server
 - credentials-binding:
     - username-password-separated:
        credential-id: b3e6f337-5d44-4f57-921c-1632d796caag
        username: myUsername
        password: myPassword
 - credentials-binding:
     - amazon-web-services:
        credential-id: b3e6f337-5d44-4f57-921c-1632d796caaf
        access-key: AWS_ACCESS_KEY_ID
        secret-key: AWS_SECRET_ACCESS_KEY
 - credentials-binding:
     - ssh-user-private-key:
        credential-id: b3e6f337-5d44-4f57-921c-1632d796caah
        key-file-variable: KEY_FILE_VARIABLE
        username-variable: USER_NAME_VARIABLE
        passphrase-variable: PASSPHRASE_VARIABLE
 - credentials-binding:
     - cert-multi-binding:
        credential-id: b3e6f337-5d44-4f57-921c-1632d796caaj
        keystore-variable: KEYSTORE_VARIABLE
        password-variable: PASSWORD_VARIABLE
        alias-variable: ALIAS_VARIABLE

custom-tools
Requires the Jenkins Custom Tools Plugin.
Parameters
o tools (list) -- List of custom tools to add (optional)
o skip-master-install (bool) -- skips the install in top level matrix job (default \(aqfalse\(aq)
o convert-homes-to-upper (bool) -- Converts the home env vars to uppercase (default \(aqfalse\(aq)
Example:
wrappers:
  - custom-tools:
      tools:
      - my_custom_tool
      skip-master-install: true
      convert-homes-to-upper: true

delivery-pipeline
If enabled the job will create a version based on the template. The version will be set to the environment variable PIPELINE_VERSION and will also be set in the downstream jobs.
Requires the Jenkins Delivery Pipeline Plugin.
Parameters
o version-template (str) -- Template for generated version e.g 1.0.${BUILD_NUMBER} (default \(aq\(aq)
o set-display-name (bool) -- Set the generated version as the display name for the build (default false)
Minimal Example:
wrappers:
    - delivery-pipeline

Full Example:
wrappers:
    - delivery-pipeline:
        version-template: 1.0.0-${BUILD_NUMBER}
        set-display-name: true

docker-custom-build-env
Allows the definition of a build environment for a job using a Docker container. Requires the Jenkins CloudBees Docker Custom Build Environment Plugin.
Parameters
o image-type (str) -- Docker image type. Valid values and their additional attributes described in the image_types table
o docker-tool (str) -- The name of the docker installation to use (default \(aqDefault\(aq)
o host (str) -- URI to the docker host you are using
o credentials-id (str) -- Argument to specify the ID of credentials to use for docker host (optional)
o registry-credentials-id (str) -- Argument to specify the ID of credentials to use for docker registry (optional)
o volumes (list) --
Volumes to bind mound from slave host into container
volume
o host-path (str) Path on host
o path (str) Path inside container
o verbose (bool) -- Log docker commands executed by plugin on build log (default false)
o privileged (bool) -- Run in privileged mode (default false)
o force-pull (bool) -- Force pull (default false)
o group (str) -- The user to run build has to be the same as the Jenkins slave user so files created in workspace have adequate owner and permission set
o command (str) -- Container start command (default \(aq/bin/cat\(aq)
o net (str) -- Network bridge (default \(aqbridge\(aq)
o memory-limit (str) -- Configure the limit memory constraint (default \(aq\(aq)
o cpu-shares (str) -- Configure the CPU shares constraint (default \(aq\(aq)
Image Type Description
dockerfile Build docker image from a Dockerfile in project workspace. With this option, project can define the build environment as a Dockerfile stored in SCM with project source code (str) Path to docker context (default \(aq.\(aq) (str) Use an alternate Dockerfile to build the container hosting this build (default \(aqDockerfile\(aq)
pull Pull specified docker image from Docker repository (str) Image id/tag
Example:
wrappers:
  - docker-custom-build-env:
      image-type: \(aqpull\(aq
      image: \(aqcentos:7\(aq
      force-pull: true
      privileged: true
      verbose: true
      group: jenkins
      command: /bin/cat
      net: bridge
      memory-limit: memory=L<inf, memory-swap=inf
      cpu-shares: 2

env-file Add or override environment variables to the whole build process Requires the Jenkins Environment File Plugin.
Parameters
properties-file (str) -- path to the properties file (optional)
Example:
wrappers:
  - env-file:
      properties-file: ${WORKSPACE}/foo
env-script
Add or override environment variables to the whole build process. Requires the Jenkins Environment Script Plugin.
Parameters
o script-content -- The script to run (default \(aq\(aq)
o script-type (str) --
The script type.
script-types supported
o unix-script (default)
o power-shell
o batch-script
o only-run-on-parent -- Only applicable for Matrix Jobs. If true, run only on the matrix parent job (default false)
Example:
wrappers:
  - env-script:
      script-content: \(aqecho foo=bar\(aq
      only-run-on-parent: true

exclusion
Add a resource to use for critical sections to establish a mutex on. If another job specifies the same resource, the second job will wait for the blocked resource to become available.
Requires the Jenkins Exclusion Plugin.
Parameters
resources (list) -- List of resources to add for exclusion
Example:
wrappers:
  - exclusion:
      resources:
          - myresource1
          - myresource2

github-pull-request
Set GitHub commit status with custom context and message. Requires the Jenkins GitHub Pull Request Builder Plugin.
Parameters
o show-matrix-status (bool) -- Only post commit status of parent matrix job (default false)
o status-context (str) -- The context to include on PR status comments (default \(aq\(aq)
o triggered-status (str) -- The status message to set when the build has been triggered (default \(aq\(aq)
o started-status (str) -- The status message to set when the build has been started (default \(aq\(aq)
o status-url (str) -- The status URL to set (default \(aq\(aq)
o status-add-test-results (bool) -- Add test result one-liner to status message (default false)
o statuses (list) --
List of custom statuses on the commit for when a build is completed
Status
o message (str) -- The message that is appended to a comment when a build finishes with the desired build status. If no status updates should be made when a build finishes with the indicated build status, use "--none--" to alert the trigger. (required)
o result (str) -- Build result. Can be one of \(aqSUCCESS\(aq, \(aqERROR\(aq or \(aqFAILURE\(aq. (required)
Minimal Example:
wrappers:
  - github-pull-request

Full Example:
wrappers:
  - github-pull-request:
      show-matrix-status: true
      status-context: "my-build"
      triggered-status: "build was triggered"
      started-status: "build was started"
      status-url: "http://1.2.3.4"
      status-add-test-results: true
      statuses:
        - message: "build has succeeded"
          result: SUCCESS
        - message: "build has failed"
          result: ERROR

inject Add or override environment variables to the whole build process Requires the Jenkins EnvInject Plugin.
Parameters
o properties-file (str) -- path to the properties file (optional)
o properties-content (str) -- key value pair of properties (optional)
o script-file (str) -- path to the script file (optional)
o script-content (str) -- contents of a script (optional)
o load-from-master (bool) -- load files from master (default false)
o groovy-script (str) -- contents of the groovy script (optional)
o groovy-sandbox (bool) -- use groovy sandbox (default false)
Minimal Example:
wrappers:
    - inject

Full Example:
wrappers:
    - inject:
        properties-file: example.prop full
        properties-content: EXAMPLE=foo-bar full
        script-file: scriptfull.sh
        script-content: test script content full
        groovy-script: test groovy-script location full
        groovy-sandbox: true

inject-ownership-variables
Inject ownership variables to the build as environment variables. Requires the Jenkins EnvInject Plugin and Jenkins Ownership plugin.
Parameters
o job-variables (bool) -- inject job ownership variables to the job (default false)
o node-variables (bool) -- inject node ownership variables to the job (default false)
Example:
wrappers:
  - inject-ownership-variables:
      job-variables: true
      node-variables: true

inject-passwords
Inject passwords to the build as environment variables. Requires the Jenkins EnvInject Plugin.
Parameters
o global (bool) -- inject global passwords to the job
o mask-password-params (bool) -- mask password parameters
o job-passwords (list) --
key value pair of job passwords
Parameter
o name (str) Name of password
o password (str) Encrypted password
Example:
wrappers:
    - inject-passwords:
        global: true
        mask-password-params: true
        job-passwords:
            - name: ADMIN
              password: 0v8ZCNaHwq1hcx+sHwRLdg9424uBh4Pin0zO4sBIb+U=

jclouds
Uses JClouds to provide slave launching on most of the currently usable Cloud infrastructures. Requires the Jenkins JClouds Plugin.
Parameters
o single-use (bool) -- Whether or not to terminate the slave after use (default false).
o instances (list) -- The name of the jclouds template to create an instance from, and its parameters.
o cloud-name (str) -- The name of the jclouds profile containing the specified template.
o count (int) -- How many instances to create (default 1).
o stop-on-terminate (bool) -- Whether or not to suspend instead of terminate the instance (default false).
Example:
 wrappers:
    - jclouds:
        single-use: True
        instances:
          - jenkins-dev-slave:
              cloud-name: mycloud1
              count: 1
              stop-on-terminate: True
          - jenkins-test-slave:
              cloud-name: mycloud2
              count: 2
              stop-on-terminate: False

job-log-logger
Enable writing the job log to the underlying logging system. Requires the Jenkins Job Log Logger plugin.
Parameters
suppress-empty (bool) -- Suppress empty log messages (default true)
Example:
wrappers:
  - job-log-logger:
      suppress-empty: false

live-screenshot
Show live screenshots of running jobs in the job list. Requires the Jenkins Live-Screenshot Plugin.
Parameters
o full-size (str) -- name of screenshot file (default \(aqscreenshot.png\(aq)
o thumbnail (str) -- name of thumbnail file (default \(aqscreenshot-thumb.png\(aq)
File type must be .png and they must be located inside the $WORKDIR.
Full Example:
wrappers:
    - live-screenshot:
        full-size: my_screenshot.png
        thumbnail: my_screenshot-thumb.png

Minimal Example:
wrappers:
    - live-screenshot

locks Control parallel execution of jobs. Requires the Jenkins Locks and Latches Plugin.
Arg list of locks to use
Example:
wrappers:
    - locks:
        - FOO
        - FOO2

logfilesize
Abort the build if its logfile becomes too big. Requires the Jenkins Logfilesizechecker Plugin.
Parameters
o set-own (bool) -- Use job specific maximum log size instead of global config value (default false).
o fail (bool) -- Make builds aborted by this wrapper be marked as "failed" (default false).
o size (int) -- Abort the build if logfile size is bigger than this value (in MiB, default 128). Only applies if set-own is true.
Full Example:
wrappers:
  - logfilesize:
      set-own: true
      size: 1024
      fail: true

Minimal Example:
wrappers:
  - logfilesize

logstash build wrapper
Dump the Jenkins console output to Logstash Requires the Jenkins logstash plugin.
Parameters
o use-redis -- Boolean to use Redis. (default true)
o redis --
Redis config params
Parameter
o host (str) Redis hostname (default \(aqlocalhost\(aq)
Parameter
o port (int) Redis port number (default 6397)
Parameter
o database-number (int) Redis database number (default 0)
Parameter
o database-password (str) Redis database password (default \(aq\(aq)
Parameter
o data-type (str) Redis database type (default \(aqlist\(aq)
Parameter
o key (str) Redis key (default \(aqlogstash\(aq)
Example:
wrappers:
  - logstash:
      use-redis: True
      redis:
        host: \(aqlocalhost\(aq
        port: 6379
        database-number: 0
        database-password: \(aqpassword\(aq
        data-type: \(aqlist\(aq
        key: \(aqlogstash\(aq

m2-repository-cleanup
Configure M2 Repository Cleanup Requires the Jenkins M2 Repository Cleanup.
Parameters
patterns (list) -- List of patterns for artifacts to cleanup before building. (optional)
This plugin allows you to configure a maven2 job to clean some or all of the artifacts from the repository before it runs.
Example:
wrappers:
    - m2-repository-cleanup:
        patterns:
            - com/ibm/**
            - com/microsoft/**

mask-passwords
Hide passwords in the console log. Requires the Jenkins Mask Passwords Plugin.
Example:
wrappers:
  - mask-passwords
matrix-tie-parent
Tie parent to a node. Requires the Jenkins Matrix Tie Parent Plugin. Note that from Jenkins version 1.532 this plugin\(aqs functionality is available under the "advanced" option of the matrix project configuration. You can use the top level node parameter to control where the parent job is tied in Jenkins 1.532 and higher.
Parameters
node (str) -- Name of the node (required)
Example:
project-type: matrix
wrappers:
  - matrix-tie-parent:
      node: Unix

maven-release
Wrapper for Maven projects Requires M2 Release Plugin
Parameters
o release-goals (str) -- Release goals and options (default \(aq\(aq)
o dry-run-goals (str) -- DryRun goals and options (default \(aq\(aq)
o num-successful-builds (int) -- Number of successful release builds to keep (default 1)
o select-custom-scm-comment-prefix (bool) -- Preselect \(aqSpecify custom SCM comment prefix\(aq (default false)
o select-append-jenkins-username (bool) -- Preselect \(aqAppend Jenkins Username\(aq (default false)
o select-scm-credentials (bool) -- Preselect \(aqSpecify SCM login/password\(aq (default false)
o release-env-var (str) -- Release environment variable (default \(aq\(aq)
o scm-user-env-var (str) -- SCM username environment variable (default \(aq\(aq)
o scm-password-env-var (str) -- SCM password environment variable (default \(aq\(aq)
Example:
wrappers:
  - maven-release:
      release-goals: -Dresume=false release:prepare release:perform
      dry-run-goals: -Dresume=false -DdryRun=true release:prepare
      num-successful-builds: 1
      select-custom-scm-comment-prefix: false
      select-append-jenkins-username: false
      select-scm-credentials: false
      release-env-var: IS_M2RELEASEBUILD
      scm-user-env-var: SCM_USER

mongo-db build wrapper
Initializes a MongoDB database while running the build. Requires the Jenkins MongoDB plugin.
Parameters
o name (str) -- The name of the MongoDB install to use (required)
o data-directory (str) -- Data directory for the server (default \(aq\(aq)
o port (int) -- Port for the server (default \(aq\(aq)
o startup-params (str) -- Startup parameters for the server (default \(aq\(aq)
o start-timeout (int) -- How long to wait for the server to start in milliseconds. 0 means no timeout. (default 0)
Full Example:
wrappers:
  - mongo-db:
      name: 2.4.6
      data-directory: /var/tmp/mongo
      port: 5555
      startup-params: "--bind_ip 127.0.0.1"
      start-timeout: 5000

Minimal Example:
wrappers:
  - mongo-db:
      name: 2.4.6

nodejs-installator
Requires the Jenkins NodeJS Plugin.
Parameters
name (str) -- nodejs installation name (required)
Example:
wrappers:
  - nodejs-installator:
      name: "latest node"

openstack
Provision slaves from OpenStack on demand. Requires the Jenkins Openstack Cloud Plugin.
Parameters
o instances (list) --
List of instances to be launched at the beginning of the build.
instances
o cloud-name (str) -- The name of the cloud profile which contains the specified cloud instance template (required).
o template-name (str) -- The name of the cloud instance template to create an instance from(required).
o manual-template (bool) -- If True, instance template name will be put in \(aqSpecify Template Name as String\(aq option. Not specifying or specifying False, instance template name will be put in \(aqSelect Template from List\(aq option. To use parameter replacement, set this to True. (default false)
o count (int) -- How many instances to create (default 1).
o single-use (bool) -- Whether or not to terminate the slave after use (default false).
Example:
wrappers:
  - openstack:
      instances:
        - cloud-name: mycloud1
          template-name: jenkins-dev-slave
          count: 1
        - cloud-name: mycloud2
          template-name: jenkins-test-slave
          manual-template: True
          count: 2
      single-use: True

pathignore
This plugin allows SCM-triggered jobs to ignore build requests if only certain paths have changed.
Requires the Jenkins Pathignore Plugin.
Parameters
ignored (str) -- A set of patterns to define ignored changes
Example:
wrappers:
  - pathignore:
      ignored: "docs, tests"
port-allocator
Assign unique TCP port numbers Requires the Jenkins Port Allocator Plugin.
Parameters
o name (str) -- Deprecated, use names instead
o names (list) -- Variable list of names of the port or list of specific port numbers
Example:
wrappers:
    - port-allocator:
        names:
            - SERVER_PORT
            - SERVER_PORT2

pre-scm-buildstep
Execute a Build Step before running the SCM Requires the Jenkins pre-scm-buildstep.
Parameters
o failOnError (string) -- Specifies if the job should fail on error (plugin >= 0.3) (default false).
o buildsteps (list) --
List of build steps to execute
Buildstep
Any acceptable builder, as seen in the example
Example:
wrappers:
  - pre-scm-buildstep:
      failOnError: true
      buildsteps:
        - shell: |
            #!/bin/bash
            echo "Doing something cool"
        - shell: |
            #!/bin/zsh
            echo "Doing something cool with zsh"
        - ant: "target1 target2"
          ant-name: "Standard Ant"
        - inject:
             properties-file: