The plugin allows restricting job executions in order to change their behavior or to harden the security. With this plugin it is possible to configure nodes to accept only particular jobs. It is also possible to prevent job triggering by users and other jobs using various conditions.
- Execution restrictions on the node level
- Example 1: Take jobs according to the specified name pattern (e.g. allow running only "QA_.*" jobs on a node)
- Example 2: Prevent execution of user jobs on the Jenkins master node
- Restrictions of jobs triggering by external causes
- Example 1: Prohibit manual builds
- Example 2: Allow triggering only by a job with the specified owner.
- Several built-in restrictions + JobRestriction extension point
- Oleg Nenashev (maintainer)
- Initial plugin version has been sponsored by Synopsys Inc., www.synopsys.com
These restrictions can be configured in node's configuration page.
- Node won't accept jobs, which violate the specified restrictions
- Other requirements (executors, labels, etc.) will be checked as well
This type of restrictions allows to prevent execution of jobs by the
If the cause does not satisfy requirements, job fails before running of SCM (the job cannot be aborted due to JENKINS-19497).
The current version supports the following checks:
- Apply Job restrictions to upstream build - prohibits the invocation from specific builds, which do not satisfy the specified requirements
- Prohibit manual launch of the job (since 0.2)
Plugin provides a JobRestriction extension point, which allows implementation of new restrictions.
- Logic operations (and, or, not)
- Started by user/group restrictions
- Restrictions support upstream projects (UpstreamCause)
- Rebuild Plugin and other specific causes are not supported
- Regex restriction - check the jobs name by a regular expression
The following plugins produce additional job restrictions:
Priority Sorter Plugin — This plugin allows Jobs to be prioritised based on Queue Strategies and Priority Strategies.
If your plug-in is not listed here, then simply add the label job-restriction-producer to your plug-in wiki page and it will be automatically listed.
If you have any proposals/bug reports, please create an issue on Jenkins JIRA.
Data cannot be retrieved due to an unexpected error.
- JENKINS-51359 - Fix Form validation issue for classname restrictions when a class belongs to another plugin
- Jenkins core requirement is updated to 2.60.3
- Jenkins core requirement is updated to 2.7.3
- PR #19 - Performance: use new core API to speedup user retrieval in the plugin
- PR #22 - Add Chinese localization for top-level entries
- Get full names for queue items when they're available. Solves the issue with restricting Pipelines within Folders (JENKINS-36626)
- Add Job Class Restriction (JENKINS-38644)
- Update core dependency to 1.609.3 due to Pipeline autotest requirements
- Upgraded the core baseline to 1.580.x in order to support Pipeline in near future
- Upgrade to the new parent POM
- Change the display name of AnyJobRestriction to "No restriction (take any)" (JENKINS-36960)
- Support of "Started by user" restriction (JENKINS-25726)
- Support of "Started by user from the group" restriction (JENKINS-25726) - thanks to Unknown User (csms)
- Avoid NPEs for deleted builds in UpstreamCauseRestriction for jobs (JENKINS-26374)
- Added support of full names for all items: support of Folders Plugin and Maven modules (JENKINS-23597)
- Missing jelly file causes errors on job configuration pages (JENKINS-20357)
- Broken release, equals to 0.2
AND and OR expressions with multiple entries (JENKINS-20207)
Restriction of manual build's execution (JENKINS-20281)
This version has corrupted resources, which may affect Jenkins installations on several platforms.
Use job-restrictions 0.2.2 to avoid this issue
- Initial version with basic restrictions for nodes and jobs