jenkins-job-builder/doc/source/general.rst
Javier Martinez Canillas bc235fdfc9 add an auth-token YAML parameter for the General Job Configuraion module
Using the Jenkins WEB UI an Authentication Token can be specified for
jobs to allow builds to be triggered remotely by using the URL:
JENKINS_URL/job/JOBNAME/build?token=TOKEN

Add an auth-token job parameter to generate the <authToken> XML element.

Change-Id: Ic916e4074c9b2de9c616ef39a88c1d8e1e91fcff
Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Reviewed-on: https://review.openstack.org/25819
Reviewed-by: Arnaud Fabre <fabre.arnaud@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
2013-04-04 16:24:14 +00:00

2.3 KiB

General Job Configuration

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's not very useful, so you'll want to add some actions such as builders, and perhaps publishers. Those are described later. There are a few basic optional fields for a Job definition:

- job:
    name: job-name
    project-type: freestyle
    defaults: global
    disabled: false
    concurrent: true
    workspace: /srv/build-area/job-name
    quiet-period: 5
    block-downstream: false
    block-upstream: false
Job Parameters
  • project-type: Defaults to "freestyle", but "maven" can also be specified.
  • defaults: Specifies a set of defaults to use for this job, defaults to ''global''. 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.
  • disabled: Boolean value to set whether or not this job should be disabled in Jenkins. Defaults to false (job will be enabled).
  • concurrent: Boolean value to set whether or not Jenkins can run this job concurrently. Defaults to false.
  • workspace: Path for a custom workspace. Defaults to Jenkins default configuration.
  • quiet-period: Number of seconds to wait between consecutive runs of this job. Defaults to 0.
  • 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.
  • 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.
  • 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.

general