Skip to content

Commit

Permalink
Refresh plugin (#179)
Browse files Browse the repository at this point in the history
  • Loading branch information
basil authored May 22, 2023
1 parent 050055d commit 8735d9e
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 18 deletions.
5 changes: 4 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
buildPlugin()
buildPlugin(configurations: [
[platform: 'linux', jdk: 17],
[platform: 'windows', jdk: 11],
])
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>4.40</version>
<version>4.63</version>
<relativePath />
</parent>
<artifactId>durable-task</artifactId>
Expand All @@ -21,7 +21,7 @@

<properties>
<changelist>999999-SNAPSHOT</changelist>
<jenkins.version>2.289.1</jenkins.version>
<jenkins.version>2.361.4</jenkins.version>
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo>
</properties>

Expand Down Expand Up @@ -53,7 +53,7 @@
<dependency>
<groupId>org.jenkins-ci.test</groupId>
<artifactId>docker-fixtures</artifactId>
<version>1.11</version>
<version>166.v912b_95083ffe</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -66,8 +66,8 @@
<dependencies>
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.289.x</artifactId>
<version>1289.v5c4b_1c43511b_</version>
<artifactId>bom-2.361.x</artifactId>
<version>2081.v85885a_d2e5c5</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ protected static FilePath requestBinary(FilePath ws, FileMonitoringController c)
* Returns path of binary on agent. Copies binary to agent if it does not exist
*/
@CheckForNull
@SuppressFBWarnings(value = "RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE", justification = "TODO needs triage")
@SuppressFBWarnings(value = {"NP_LOAD_OF_KNOWN_NULL_VALUE", "RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE"}, justification = "TODO needs triage")
protected static FilePath requestBinary(FilePath nodeRoot, AgentInfo agentInfo, FilePath ws, FileMonitoringController c) throws IOException, InterruptedException {
FilePath binary = null;
if (agentInfo.isBinaryCompatible()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@

/** Analog of {@link JavaContainer} but using Alpine rather than Ubuntu. */
@DockerFixture(id = "alpine", ports = 22)
public class AlpineFixture extends DockerContainer {}

public class AlpineFixture extends DockerContainer {
public static final String ALPINE_JAVA_LOCATION = "/opt/java/openjdk/bin/java";
}
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ private Slave prepareAgentDocker() throws Exception {
case NO_INIT:
return new DumbSlave("docker",
"/home/jenkins/agent",
new SimpleCommandLauncher("docker run -i --rm jenkins/slave:3.29-2 java -jar /usr/share/jenkins/slave.jar"));
new SimpleCommandLauncher("docker run -i --rm jenkins/agent:latest-jdk11 java -jar /usr/share/jenkins/agent.jar"));
default:
throw new AssertionError(platform);
}
Expand All @@ -178,6 +178,7 @@ private Slave prepareDockerPlatforms() throws Exception {
break;
case ALPINE:
container = dockerAlpine.get();
customJavaPath = AlpineFixture.ALPINE_JAVA_LOCATION;
break;
case CENTOS:
container = dockerCentOS.get();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@

@DockerFixture(id = "pwsh", ports = 22)
public class PowerShellCoreFixture extends DockerContainer {
public static final String PWSH_JAVA_LOCATION = "/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java";
public static final String PWSH_JAVA_LOCATION = "/usr/lib/jvm/java-11-openjdk-amd64/bin/java";
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
@DockerFixture(id = "slim", ports = 22)
public class SlimFixture extends DockerContainer {

public static final String SLIM_JAVA_LOCATION = "/usr/local/openjdk-8/bin/java";
public static final String SLIM_JAVA_LOCATION = "/usr/local/openjdk-11/bin/java";

}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM jenkinsci/slave:3.19-1-alpine
FROM jenkins/agent:alpine-jdk11
USER root
RUN apk add --update --no-cache openssh
RUN ssh-keygen -A
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM centos:7.4.1708
FROM centos:7.9.2009
RUN yum -y install \
openssh-server \
java-1.8.0-openjdk-headless \
java-11-openjdk-headless \
&& yum clean all
RUN ssh-keygen -A
RUN useradd test -d /home/test && \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM mcr.microsoft.com/powershell:ubuntu-bionic
FROM mcr.microsoft.com/powershell:ubuntu-jammy
RUN apt-get update -y && \
apt-get install -y \
openssh-server \
openjdk-8-jre-headless \
openjdk-11-jre-headless \
locales
# openssh installs procps, and thus /bin/ps, as a dependency, so to reproduce JENKINS-52881 we need to delete it:
RUN dpkg --force-depends -r procps
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM openjdk:8-jre-slim
FROM openjdk:11-jre-slim
RUN apt-get update -y && \
apt-get install -y \
openssh-server \
Expand Down

0 comments on commit 8735d9e

Please sign in to comment.