You are on page 1of 4

Job Restrictions Plugin

Plugin Information

View Job Restrictions on the plugin site for more


information.

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.

About the plugin


Usage
Job restrictions for nodes
Job restrictions for projects
Extension points
JIRA issues
Version history
Version 0.8 (Oct 06, 2018)
Version 0.7 (May 16, 2018)
Version 0.6 (10/14/2016)
Version 0.5 (08/03/2016)
Version 0.4 (01/18/2015)
Version 0.3 (06/29/2013)
Version 0.2.2 (12/08/2013)
Version 0.2.1 (11/13/2013)
Version 0.2 (10/26/2013)
Version 0.1 (08/26/2013)

About the plugin


Features:

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

Contributors:

1. Oleg Nenashev (maintainer)


Initial plugin version has been sponsored by Synopsys Inc., www.synopsys.com

Usage

Job restrictions for nodes


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
Job restrictions for projects
This type of restrictions allows to prevent execution of jobs by the launch cause.
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)

Extension points
Plugin provides a JobRestriction extension point, which allows implementation of new restrictions.

Built-in extensions:

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:

Page:Priority Sorter Plugin — This plugin allows Jobs to be prioritised based on Queue Strategies and Priority Strategies.
Page:Ownership Plugin

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.

JIRA issues
If you have any proposals/bug reports, please create an issue on Jenkins JIRA.

Re U
Assi Rep S soluti C pdat D
T Key Summary P
gnee orter tatus on reated ed ue

JENKIN Apr Apr


Unassig Sam Op Unres
S- Support restrictions from the global shared pipeline library 07, 07,
ned Gleske en olved
50644 2018 2018

JENKIN Dominik Aug Nov


Could not launch job on multiple nodes if Restrict jobs Umesh Op Unres
S- Barthold 09, 20,
execution at node is active Salotagi en olved
46091 i 2017 2017

JENKIN Aug Aug


Unassig Michael Op Unres
S- Node.LabelMissing error in Jenkins 2.71 03, 30,
ned M. en olved
45959 2017 2017

JENKIN Oct Oct


Unassig Frank Op Unres
S- Feature request: allow jobs "Started by remote host" 31, 31,
ned R. en olved
39373 2016 2016

JENKIN Aug Aug


To allow job "Started by timer" as a supplement to "Started Unassig Frank Op Unres
S- 29, 29,
By User" ned R. en olved
37747 2016 2016

JENKIN Daniel In Apr Oct


job-restrictions Job Property does not support Pipeline Mansoo Unres
S- Hernand Progr 21, 19,
Plugin r Saqib olved
34377 ez ess 2016 2018

JENKIN Oleg Jan Sep


Job Restrictions plugin should process restrictions in Unassig Op Unres
S- Nenash 08, 28,
Pipeline ned en olved
32355 ev 2016 2016

JENKIN Oleg Dec Oct


Attempts to restrict Pipeline jobs from running on master Andrew Op Unres
S- Nenash 02, 19,
result in job hanging Bayer en olved
31866 ev 2015 2018

JENKIN Oleg Mar Mar


[Plugins delete] - Logic expressions may fail if somebody Unassig Op Unres
S- Nenash 05, 05,
deletes a job-restriction-provider plugin with restrictions ned en olved
27257 ev 2015 2015

9 issues

Version history

Version 0.8 (Oct 06, 2018)


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

Version 0.7 (May 16, 2018)


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

Version 0.6 (10/14/2016)


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

Version 0.5 (08/03/2016)


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)

Version 0.4 (01/18/2015)


Support of "Started by user" restriction (JENKINS-25726)
Support of "Started by user from the group" restriction (JENKINS-25726) - thanks to Christopher Suarez
Avoid NPEs for deleted builds in UpstreamCauseRestriction for jobs (JENKINS-26374)
Version 0.3 (06/29/2013)
Added support of full names for all items: support of Folders Plugin and Maven modules (JENKINS-23597)

Version 0.2.2 (12/08/2013)


Missing jelly file causes errors on job configuration pages (JENKINS-20357)

Version 0.2.1 (11/13/2013)


Broken release, equals to 0.2

Version 0.2 (10/26/2013)


AND and OR expressions with multiple entries (JENKINS-20207)
Restriction of manual build's execution (JENKINS-20281)

Warning!

This version has corrupted resources, which may affect Jenkins installations on several platforms.
Use job-restrictions 0.2.2 to avoid this issue

Version 0.1 (08/26/2013)


Initial version with basic restrictions for nodes and jobs

You might also like