Skip to content

Commit

Permalink
Bump Jenkins baseline to 2.479 and use StaplerRequest2
Browse files Browse the repository at this point in the history
  • Loading branch information
jonesbusy committed Nov 17, 2024
1 parent 6f74839 commit c1b4321
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
https://github.com/jenkins-infra/pipeline-library/
*/
buildPlugin(
forkCount: '1C', // run this number of tests in parallel for faster feedback. If the number terminates with a 'C', the value will be multiplied by the number of available CPU cores
useContainerAgent: true, // Set to `false` if you need to use Docker for containerized tests
configurations: [
[platform: 'linux', jdk: 21],
Expand Down
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>4.88</version>
<version>5.2</version>
<relativePath />
</parent>
<groupId>io.jenkins.plugins</groupId>
Expand All @@ -28,8 +28,8 @@
</scm>
<properties>
<changelist>999999-SNAPSHOT</changelist>
<jenkins.baseline>2.440</jenkins.baseline>
<jenkins.version>${jenkins.baseline}.3</jenkins.version>
<jenkins.baseline>2.479</jenkins.baseline>
<jenkins.version>${jenkins.baseline}.1</jenkins.version>
<hpi.compatibleSinceVersion>0.13-rc</hpi.compatibleSinceVersion>
<spotless.check.skip>false</spotless.check.skip>
</properties>
Expand All @@ -39,7 +39,7 @@
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-${jenkins.baseline}.x</artifactId>
<version>3435.v238d66a_043fb_</version>
<version>3696.vb_b_4e2d1a_0542</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.DataBoundSetter;
import org.kohsuke.stapler.Stapler;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerRequest2;

/**
* SCM Binder class for {@link org.jenkinsci.plugins.workflow.multibranch.WorkflowBranchProjectFactory}
Expand Down Expand Up @@ -87,7 +87,7 @@ public String getDisplayName() {
}

public Collection<? extends SCMDescriptor<?>> getApplicableDescriptors() {
StaplerRequest req = Stapler.getCurrentRequest();
StaplerRequest2 req = Stapler.getCurrentRequest2();

Check warning on line 90 in src/main/java/io/jenkins/plugins/pipeline/PipelineAsYamlScmFlowDefinition.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered line

Line 90 is not covered by tests
Job<?, ?> job = req != null ? req.findAncestorObject(Job.class) : null;
return SCM._for(job);
}
Expand Down

0 comments on commit c1b4321

Please sign in to comment.