Skip to content
Permalink
Browse files

[JENKINS-31801] Add Pipeline throttle(category) step (#46)

* [JENKINS-31801] Initial work on throttle(category) step - needs tests

* Reworked to no longer rely on StepExecutions.

* Add a trailing newline to messages.

* Make findbugs happy.

* Whoops, this needs to take a block

* Initial test, actually working

Needed to bump to newer dependency versions, most notably to get
PlaceholderTask.getNode(). Still a work in progress, mind you.

* Cleanup, commenting, javadoc

* Test across all nodes

Also discovered that Run<?,?> is a very bad Map key.

* Add interop with freestyle test

* Add snippet generator support.

* Add snippetizer support and test

* Review comments

* Check for pending PlaceholderTasks as well.

* Allow multiple comma-separated categories

* Minor review responses, moving step UI to correct dir

* Go away, empty category names!

* Fixed up snippetizer, switched to a list of strings for the throttle step

* Check for and respond to duplicate or non-existent category names

* Adding help for ThrottleJobProperty pointing out it doesn't work for Pipeline

* unmodifiableList
  • Loading branch information
abayer authored and oleg-nenashev committed May 19, 2017
1 parent d177460 commit 0bbd0792eb88ff33c81cc0efa5e04b651542fb6d
85 pom.xml
@@ -26,13 +26,13 @@ THE SOFTWARE.
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>2.6</version>
<version>2.22</version>
</parent>

<artifactId>throttle-concurrents</artifactId>
<packaging>hpi</packaging>
<name>Jenkins Throttle Concurrent Builds Plug-in</name>
<version>1.9.1-SNAPSHOT</version>
<version>2.0-beta-SNAPSHOT</version>
<url>http://wiki.jenkins-ci.org/display/JENKINS/Throttle+Concurrent+Builds+Plugin</url>
<description>Plugin to throttle the number of concurrent builds of a single job per node.</description>

@@ -44,12 +44,11 @@ THE SOFTWARE.
</licenses>

<properties>
<jenkins.version>1.609.3</jenkins.version>
<jenkins.version>1.642.3</jenkins.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<compileSource>1.6</compileSource>
<compileTarget>1.6</compileTarget>
<!--TODO: do not fail on errors-->
<findbugs.failOnError>false</findbugs.failOnError>
<java.level>7</java.level>
</properties>

<developers>
@@ -105,29 +104,87 @@ THE SOFTWARE.
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>matrix-project</artifactId>
<version>1.4.1</version>
<version>1.8</version>
</dependency>

<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-api</artifactId>
<version>2.12</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-step-api</artifactId>
<version>2.7</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-durable-task-step</artifactId>
<version>2.8</version>
</dependency>

<!-- Dependencies for test -->
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>cloudbees-folder</artifactId>
<version>4.0</version>
<version>6.0.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>matrix-auth</artifactId>
<version>1.2</version>
<version>1.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>credentials</artifactId>
<version>1.9.4</version>
<version>2.1.13</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-cps</artifactId>
<version>2.28</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-cps</artifactId>
<version>2.28</version>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-job</artifactId>
<version>2.9</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-basic-steps</artifactId>
<version>2.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>junit</artifactId>
<version>1.15</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-support</artifactId>
<version>2.13</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-support</artifactId>
<version>2.13</version>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
@@ -140,12 +197,6 @@ THE SOFTWARE.
<version>0.7.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>

0 comments on commit 0bbd079

Please sign in to comment.
You can’t perform that action at this time.