The Properties module supplies a wide range of options that are implemented as Jenkins job properties.
Macro: | property |
---|---|
Entry Point: | jenkins_jobs.properties |
Example:
job:
name: test_job
properties:
- github:
url: https://github.com/openstack-infra/jenkins-job-builder/
Specifies an authorization matrix where only authenticated users may trigger a build.
DEPRECATED
Example:
properties:
- authenticated-build
Specifies an authorization matrix
Example:
properties:
- authorization:
admin:
- job-delete
- job-configure
- job-read
- job-discover
- job-build
- job-workspace
- job-cancel
- run-delete
- run-update
- scm-tag
anonymous:
- job-discover
- job-read
- job-extended-read
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.
|
---|
Example:
properties:
- batch-tasks:
- name: release
script: mvn -B release:prepare release:perform
- name: say hello
script: echo "Hello world"
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: |
|
---|
Example:
properties:
- build-blocker:
use-build-blocker: true
blocking-jobs:
- ".*-deploy"
- "^maintenance.*"
block_level: 'GLOBAL'
queue-scanning: 'BUILDABLE'
Builds chain fingerprinter. Requires the Jenkins Builds chain fingerprinter Plugin.
Parameters: |
|
---|
Example:
properties:
- builds-chain-fingerprinter:
per-builds-chain: true
per-job-chain: true
Specify a list of projects that have access to copy the artifacts of this project.
Requires the Jenkins Copy Artifact plugin.
Parameters: | projects (string) – comma separated list of projects that can copy artifacts of this project. Wild card character ‘*’ is available. |
---|
Example:
properties:
- copyartifact:
projects: foo*
Requires the Jenkins Delivery Pipeline Plugin.
Parameters: |
|
---|
Example:
properties:
- delivery-pipeline:
stage: Stage
task: Task
description: Task-Description
Use of this config option is deprecated. You should use the extended-choice option in the parameter section of the job configuration instead.
Sets the GitHub URL for the project.
Parameters: | url (str) – the GitHub URL |
---|
Example:
properties:
- github:
url: https://github.com/openstack-infra/jenkins-job-builder/
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
Allows you to inject environment variables into the build. Requires the Jenkins Env Inject Plugin.
Parameters: |
|
---|
Example:
properties:
- inject:
properties-content: |
FOO=bar
BAZ=foobar
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
Plugin provides explicit ownership for jobs and slave nodes. Requires the Jenkins Ownership Plugin.
Parameters: |
|
---|
Example:
properties:
- ownership:
owner: foo
co-owners:
- bar
- moo
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 100 as the standard priority. (required) |
---|
Example:
properties:
- priority-sorter:
priority: 150
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 |
---|
Example:
properties:
- promoted-build:
names:
- "Release to QA"
- "Jane Must Approve"
Requires the Jenkins Rebuild Plugin.
Parameters: |
|
---|
Example:
properties:
- rebuild:
auto-rebuild: true
rebuild-disabled: true
Allows you to add links in the sidebar. Requires the Jenkins Sidebar-Link Plugin.
Parameters: |
|
---|
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
This plugin allows you to specify the percentage of a slave’s capacity a job wants to use.
Requires the Jenkins Slave Utilization Plugin.
Parameters: |
|
---|
Example:
properties:
- slave-utilization:
slave-percentage: 40
single-instance-per-slave: false
Throttles the number of builds for this job. Requires the Jenkins Throttle Concurrent Builds Plugin.
Parameters: |
|
---|
Example:
properties:
- throttle:
max-total: 4
categories:
- cat1
- cat2
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