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-ci/jenkins-job-builder/
authenticated-build

Specifies an authorization matrix where only authenticated users may trigger a build.

DEPRECATED

Example:

properties:
  - authenticated-build
authorization

Specifies an authorization matrix

The available rights are:
job-delete job-configure job-read job-discover job-build job-workspace job-cancel run-delete run-update scm-tag

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
github

Sets the GitHub URL for the project.

Parameters:url (str) – the GitHub URL

Example:

properties:
  - github:
      url: https://github.com/openstack-ci/jenkins-job-builder/
inject

Allows you to inject evironment variables into the build. Requires the Jenkins Env Inject Plugin.

Parameters:
  • properties-file (str) – file to read with properties (optional)
  • properties-content (str) – key=value properties (optional)
  • script-file (str) – file with script to run (optional)
  • script-content (str) – script to run (optional)
  • groovy-content (str) – groovy script to run (optional)
  • load-from-master (bool) – load files from master (default false)
  • enabled (bool) – injection enabled (default true)
  • keep-system-variables (bool) – keep system variables (default true)
  • keep-build-variables (bool) – keep build variable (default true)

Example:

properties:
  - inject:
      properties-content: FOO=bar
throttle

Throttles the number of builds for this job. Requires the Jenkins Throttle Concurrent Builds Plugin.

Parameters:
  • max-per-node (int) – max concurrent builds per node (default 0)
  • max-total (int) – max concurrent builds (default 0)
  • enabled (bool) – whether throttling is enabled (default True)
  • option (str) – throttle project or category
  • categories (list) – multiproject throttle categories

Example:

properties:
  - throttle:
      max-total: 4
      categories:
        - cat1
        - cat2

Previous topic

Parameters

Next topic

Publishers

This Page