Skip to content

Commit

Permalink
Add Java 17 to build/test matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
basil committed May 19, 2023
1 parent 2df43d8 commit 5cb76f0
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 21 deletions.
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
buildPlugin(configurations: [
[platform: 'linux', jdk: '11'],
[platform: 'windows', jdk: '11'],
[platform: 'linux', jdk: 17],
[platform: 'windows', jdk: 11],
], useContainerAgent: false)

node('docker') {
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.50</version>
<version>4.63</version>
<relativePath />
</parent>

Expand Down Expand Up @@ -37,15 +37,15 @@
<revision>2.31</revision>
<changelist>-SNAPSHOT</changelist>
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo>
<jenkins.version>2.332.4</jenkins.version>
<jenkins.version>2.361.4</jenkins.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.332.x</artifactId>
<version>1678.vc1feb_6a_3c0f1</version>
<artifactId>bom-2.361.x</artifactId>
<version>2081.v85885a_d2e5c5</version>
<scope>import</scope>
<type>pom</type>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
import org.acegisecurity.providers.UsernamePasswordAuthenticationToken;
import org.acegisecurity.userdetails.UserDetails;
import org.acegisecurity.userdetails.UsernameNotFoundException;
import org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;
import org.kohsuke.stapler.DataBoundConstructor;
Expand Down Expand Up @@ -650,13 +649,11 @@ private void customizeLdapProperties(Hashtable<String, String> props) {
}

@SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", justification = "Deprecated method.It will removed at some point")
@IgnoreJRERequirement
@Deprecated
private LdapContext bind(String principalName, String password, SocketInfo server, Hashtable<String, String> props) throws NamingException {
return bind(principalName, password, server, props, null, isRequireTLS());
}

@IgnoreJRERequirement
private LdapContext bind(String principalName, String password, SocketInfo server, Hashtable<String, String> props, TlsConfiguration tlsConfiguration, boolean requireTLS) throws NamingException {
String ldapUrl = (requireTLS?"ldaps://":"ldap://") + server + '/';
String oldName = Thread.currentThread().getName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import io.jenkins.plugins.casc.misc.RoundTripAbstractTest;
import jenkins.model.Jenkins;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.contrib.java.lang.system.EnvironmentVariables;
import org.jvnet.hudson.test.RestartableJenkinsRule;
Expand All @@ -10,6 +11,7 @@
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;

@Ignore("setting environment variables is not supported in Java 17")
public class ActiveDirectoryJCasCCompatibilityTest extends RoundTripAbstractTest {

@Rule
Expand Down
15 changes: 3 additions & 12 deletions src/test/resources/fixture/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
FROM docker:stable-dind
# Keys were rotated in the edge repos, so we need to do this now
RUN apk add -X https://dl-cdn.alpinelinux.org/alpine/v3.16/main -u alpine-keys --allow-untrusted
# Workaround for https://github.com/AdoptOpenJDK/openjdk-docker/issues/75
RUN apk add --no-cache fontconfig ttf-dejavu openjdk11 bash tini bind-tools
RUN apk add aufs-util --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing
RUN apk add maven --repository http://dl-cdn.alpinelinux.org/alpine/edge/community
# Workaround for https://github.com/AdoptOpenJDK/openjdk-docker/issues/75
RUN ln -s /usr/lib/libfontconfig.so.1 /usr/lib/libfontconfig.so && \
ln -s /lib/libuuid.so.1 /usr/lib/libuuid.so.1 && \
ln -s /lib/libc.musl-x86_64.so.1 /usr/lib/libc.musl-x86_64.so.1
FROM docker:dind
RUN apk add --no-cache fontconfig ttf-dejavu openjdk11 bash tini bind-tools maven
ENV LD_LIBRARY_PATH /usr/lib

ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk/
Expand All @@ -22,4 +13,4 @@ WORKDIR /project

ENTRYPOINT ["/sbin/tini","-g","--","bash","/usr/local/bin/custom-dockerd-entrypoint.sh"]

CMD ["clean","install"]
CMD ["clean","install"]

0 comments on commit 5cb76f0

Please sign in to comment.