Build Blocker Plugin

Skip to end of metadata
Go to start of metadata

Plugin Information

Plugin ID build-blocker-plugin Changes In Latest Release
Since Latest Release
Latest Release
Latest Release Date
Required Core
Dependencies
1.7.1 (archives)
Jul 03, 2015
1.466
Source Code
Issue Tracking
Pull Requests
Maintainer(s)
GitHub
Open Issues
Pull Requests
Frederik Fromm (id: ffromm)
Usage Installations 2014-Aug 2567
2014-Sep 2749
2014-Oct 2975
2014-Nov 3103
2014-Dec 3143
2015-Jan 3325
2015-Feb 3505
2015-Mar 3768
2015-Apr 3895
2015-May 3970
2015-Jun 4242
2015-Jul 4479

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.

General

This plugin is similar to the locks and latches plugin. The main difference is, that it uses regular expressions to find potentially blocking jobs by their names in the list of currently running builds. It uses the QueueTaskDispatcher to check if the actual job may be build. The dispatcher uses the list of regular expressions configured in the job. If one of the currently running jobs matches with one of the regular expressions, the job stays in the queue.

How to use

After installing the plugin, the job configuration page has a new property "Block build if certain jobs are running" in the upper section.

Insert one regular expression per line into the textarea. Each expression is used to detect currently running jobs that match with their names. The first matching job name will block the build and the job will stay in the queue until all expression are evaluated without match.

Other than the locks and latches plugin where both, the job to be build and the blocking job, need to have the same lock configured, this plugin allows to just configure to job to be build. No jenkins system configuration is needed.

Version history

1.1 (June 24, 2012)

  • Initial commit.

1.2 (June 25, 2012)

  • Added wiki url to pom.

1.3 (January 8, 2013)

Merged pull request of bramtassyns (https://github.com/jenkinsci/build-blocker-plugin/pull/1) - Thanks for the great work!:

  • FIX to work with matrix jobs
  • jobs running and - new - in queue with matching names block the current job's start

1.4.1 (June 28, 2013)

  • added "executors.addAll(computer.getOneOffExecutors());" to get a build blocked by all Multi-Configuration-Job executions. Now a blocked build starts AFTER the whole blocking matrix build and not in the middle of it. ATTENTION: With Jenkins version 1.447 the blocked job got stuck in the queue. Now the plugin requires Jenkins version 1.466 to run.

1.5 (March 13, 2015)

  • Merged Pull Requests #2 (Added support for the Folders plugin) and #3 (Regex validation JENKINS-27402)

1.6 (March 13, 2015)

1.7 (July 1, 2015)

  • Merge Pull Request #5 and #6 (avoid NPE and extended to block on node level and to scan the queue for builds in all states)

1.7.1 (July 3, 2015)

  • Fixed NPE when using existing build blocker config not having the new properties.

The blocking behaviour can be configured to either block builds

from running on the same node
from running at all
Additionally, the blocking behaviour can be configured to consider planned, but not yet running builds in the decision to block a build. Either

buildable builds can stop another build from running (for instance builds that are waiting for an available executor)
all planned builds can stop another build from running (blocked builds, pending builds waiting builds and buildable builds)

TODOs

  • Block a build by all sub-execution of a matrix job build, not only the first one.
  • Make blocking by items im Queue optional (default on). There may be situations, where regarding the items in the Queue that are not yet in execution may lead in a dead lock.
  • Add information of duration blocked to comment in Queue.
  • Add optional functionality to Keep only the last item of a job in queue.
  • Add Slicer for Configuration Slicing Plugin

Labels

Edit
plugin-misc plugin-misc Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Add Comment