Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Java 17 to build/test matrix #168

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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],
Comment on lines +2 to +3
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following the archetype.

], 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>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Latest at the time of this writing.

<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>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minimum version supported by the latest plugin parent POM.

</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>
Comment on lines +47 to +48
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Latest at the time of this writing.

<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;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Animal Sniffer has been removed from the latest plugin parent POM.

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")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

public class ActiveDirectoryJCasCCompatibilityTest extends RoundTripAbstractTest {

@Rule
Expand Down
14 changes: 2 additions & 12 deletions src/test/resources/fixture/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +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
ENV LD_LIBRARY_PATH /usr/lib
FROM docker:dind
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The stable-dind image is no longer available or maintained.

RUN apk add --no-cache fontconfig ttf-dejavu openjdk11 bash tini bind-tools maven
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previous workarounds are no longer necessary in a modern image.


ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk/
#ENV DOCKER_STORAGE_DRIVER=overlay2
Expand Down