Skip to content

Commit

Permalink
Merge branch 'jenkinsci:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
dharanikesav authored Oct 9, 2024
2 parents cc4b877 + ef682b2 commit c4cba90
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ THE SOFTWARE.
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>4.88</version>
<version>5.1</version>
<relativePath />
</parent>

Expand Down Expand Up @@ -84,7 +84,7 @@ THE SOFTWARE.
<properties>
<revision>2.15</revision>
<changelist>-SNAPSHOT</changelist>
<jenkins.version>2.387.3</jenkins.version>
<jenkins.version>2.479</jenkins.version>
<gitHubRepo>jenkinsci/throttle-concurrent-builds-plugin</gitHubRepo>
<spotless.check.skip>false</spotless.check.skip>
</properties>
Expand All @@ -93,8 +93,8 @@ THE SOFTWARE.
<dependencies>
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.387.x</artifactId>
<version>2543.vfb_1a_5fb_9496d</version>
<artifactId>bom-2.462.x</artifactId>
<version>3435.v238d66a_043fb_</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
import org.kohsuke.stapler.AncestorInPath;
import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.QueryParameter;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerRequest2;

public class ThrottleJobProperty extends JobProperty<Job<?, ?>> {
// Replaced by categories, to support, well, multiple categories per job (starting from 1.3)
Expand Down Expand Up @@ -423,7 +423,7 @@ public boolean isMatrixProject(Job<?, ?> job) {
}

@Override
public boolean configure(StaplerRequest req, JSONObject formData) throws FormException {
public boolean configure(StaplerRequest2 req, JSONObject formData) throws FormException {
if (!formData.has("categories")) {
this.categories = null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ private boolean isAnotherBuildWithSameParametersRunningOnNode(Node node, Queue.I
// whether one of these executing units is an instance
// of the queued item we were asked to compare to.
if (computer != null) {
for (Executor exec : computer.getExecutors()) {
for (Executor exec : computer.getAllExecutors()) {
// TODO: refactor into a nameEquals helper method
final Queue.Executable currentExecutable = exec.getCurrentExecutable();
final SubTask parentTask = currentExecutable != null ? currentExecutable.getParent() : null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ public void limitOneJobWithMatchingParams() throws Exception {
j.assertBuildStatusSuccess(j.waitForCompletion(secondRun));
}

static CpsFlowDefinition getJobFlow(String jobName, String label) {
static CpsFlowDefinition getJobFlow(String jobName, String label) throws Exception {
return new CpsFlowDefinition(getThrottleScript(jobName, label), true);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -439,11 +439,11 @@ public void inOptionsBlockOfDeclarativePipeline() throws Exception {
j.assertBuildStatusSuccess(j.waitForCompletion(secondJobFirstRun));
}

private CpsFlowDefinition getJobFlow(String jobName, String category, String label) {
private CpsFlowDefinition getJobFlow(String jobName, String category, String label) throws Exception {
return getJobFlow(jobName, Collections.singletonList(category), label);
}

private CpsFlowDefinition getJobFlow(String jobName, List<String> categories, String label) {
private CpsFlowDefinition getJobFlow(String jobName, List<String> categories, String label) throws Exception {
return new CpsFlowDefinition(getThrottleScript(jobName, categories, label), true);
}

Expand Down Expand Up @@ -471,7 +471,7 @@ private String getThrottleScript(String jobName, List<String> categories, String
+ "}\n";
}

static CpsFlowDefinition getDeclarativeJobFlow(String jobName, String categories, String label) {
static CpsFlowDefinition getDeclarativeJobFlow(String jobName, String categories, String label) throws Exception {
return new CpsFlowDefinition(
getDeclarativeThrottleScript(jobName, Collections.singletonList(categories), label), true);
}
Expand Down

0 comments on commit c4cba90

Please sign in to comment.