Skip to content

Commit

Permalink
Migrate from EE 8 to EE 9
Browse files Browse the repository at this point in the history
  • Loading branch information
basil committed Jan 22, 2025
1 parent 6aefb45 commit 282298a
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 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.5</version>
<relativePath />
</parent>

Expand Down Expand Up @@ -62,8 +62,8 @@
<properties>
<revision>1.7.1</revision>
<changelist>-SNAPSHOT</changelist>
<jenkins.baseline>2.452</jenkins.baseline>
<jenkins.version>${jenkins.baseline}.4</jenkins.version>
<jenkins.baseline>2.479</jenkins.baseline>
<jenkins.version>${jenkins.baseline}.1</jenkins.version>
<gitHubRepo>jenkinsci/docker-plugin</gitHubRepo>
<!-- Our unit-tests that talk to a real docker deamon aren't very stable -->
<surefire.rerunFailingTestsCount>3</surefire.rerunFailingTestsCount>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
import java.util.Date;
import jenkins.model.Jenkins;
import org.kohsuke.stapler.QueryParameter;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;
import org.kohsuke.stapler.StaplerRequest2;
import org.kohsuke.stapler.StaplerResponse2;
import org.kohsuke.stapler.interceptor.RequirePOST;

/**
Expand Down Expand Up @@ -73,7 +73,7 @@ public String asTime(Long time) {

@SuppressWarnings("unused")
@RequirePOST
public void doControlSubmit(@QueryParameter("stopId") String stopId, StaplerRequest req, StaplerResponse rsp)
public void doControlSubmit(@QueryParameter("stopId") String stopId, StaplerRequest2 req, StaplerResponse2 rsp)
throws IOException {
Jenkins.get().checkPermission(Jenkins.ADMINISTER);
final DockerAPI dockerApi = theCloud.getDockerApi();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import java.util.List;
import jenkins.model.GlobalConfiguration;
import net.sf.json.JSONObject;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerRequest2;

@Deprecated
public class DockerPluginConfiguration extends GlobalConfiguration {
Expand All @@ -28,7 +28,7 @@ public DockerPluginConfiguration() {
}

@Override
public boolean configure(StaplerRequest req, JSONObject json) throws FormException {
public boolean configure(StaplerRequest2 req, JSONObject json) throws FormException {
req.bindJSON(this, json);
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ protected static String getJenkinsDockerImageVersionForThisEnvironment() {
*/
final int javaVersion = getJavaVersion();
if (SystemUtils.IS_OS_WINDOWS) {
if (javaVersion >= 11) {
return "jdk11-nanoserver-1809";
if (javaVersion >= 21) {
return "jdk21-nanoserver-1809";
}
return "jdk8-nanoserver-1809";
return "jdk17-nanoserver-1809";
}
if (javaVersion >= 11) {
return "latest-jdk11";
if (javaVersion >= 21) {
return "latest-jdk21";
}
return "latest-jdk8";
return "latest-jdk17";
}

protected String getLabelForTemplate() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ public void defaults() {
Collections.emptyList()));
WorkflowJob j = r.createProject(WorkflowJob.class, "p");
j.setDefinition(new CpsFlowDefinition(
dockerNodeWithImage("openjdk:11") + " {\n"
dockerNodeWithImage("eclipse-temurin:17-jre") + " {\n"
+ " sh 'java -version && whoami && pwd && touch stuff && ls -lat . ..'\n"
+ "}\n",
true));
Expand Down

0 comments on commit 282298a

Please sign in to comment.