Running Jenkins with Java 10 and 11 (experimental support)



  • As you probably know, we will have a Jenkins and Java 10+ online hackathon this week. In order to enable early adopters to try out Jenkins with new Java versions, we have updated Jenkins core and Docker packages. Starting from Jenkins 2.127, weekly releases can be launched with Java 10 and Java 11 (preview). Although there are some known compatibility issues, the packages are ready for evaluation and exploratory testing.

    This article explains how to run Jenkins with Java 10 and 11 using Docker images and WAR files. It also lists known issues and provides contributor guidelines.

    Running in Docker

    In order to simplify testing, we have created a new jenkins/jenkins-experimental repository on DockerHub. This repository includes various Jenkins Core images, including Java 10 and Java 11 images. We have also set up development branches and continuous delivery flows for Jenkins core, so now we can deliver patches for these images without waiting for weekly releases.

    You can run the image simply as:

    docker run -p 8080:8080 -p 50000:50000 jenkins/jenkins-experimental:latest-jdk10
    

    The following tags are available:

    • 2.127-jdk10, 2.127-jdk11 - Weekly releases packaged with Java 10 and 11

    • latest-jdk10 - Jenkins core build from the java10-support branch

    • latest-jdk11 - Automatic build from the core’s java11-support branch.

    Java 10/11 images are fully compatible with the official jenkins/jenkins Docker image documentation, e.g. you can use plugins.txt to install plugins, mount volumes and pass extra options via environment variables.

    Running Jenkins without Docker

    Java 10

    1. Download Jenkins WAR for 2.127 or above (or build the experimental branch)

    2. Run WAR with the following command:

    ${JAVA10_HOME}/bin/java --add-modules java.xml.bind -jar jenkins.war \ --enable-future-java --httpPort=8080 --prefix=/jenkins
    

    Java 11

    1. Download Jenkins WAR for 2.127 or above (or build the experimental branch)

    2. Download the following libraries to the same directory as jenkins.war

    3. Run the following command:

    Run Jenkins with ${JAVA11_HOME}/bin/java \ -p jaxb-api.jar:javax.activation.jar --add-modules java.xml.bind,java.activation \ -cp jaxb-core.jar:jaxb-impl.jar \ -jar jenkins.war --enable-future-java --httpPort=8080 --prefix=/jenkins
    

    Current state

    As of June 17, we have achieved the following state:

    Known issues

    So far we know about the following issues:

    We anticipate to discover and report more issues during the hackathon this week.

    Contributing

    If you discover incompatibilities in plugins, please report issues in our bugtracker. We have java10 and java11 labels for such issues.

    If you are interested to try out Jenkins with Java 10 and 11 before June 22nd, you may be interested to sign-up to the Jenkins and Java 10+ online hackathon. Everybody is welcome to join, independently of their Jenkins experience and amount of time they have available. Exploratory testing is also within the hackathon’s scope. During this event, please also use the java10_hackathon label. It will help us to track contributions and send folks some small "thank you" gifts for participating (details will be figured out during the hackathon).

    If you want to contribute patches to the core, please submit pull requests to java10-support or java11-support branches. If the patches are compatible with Java 8, we will try to upstream them to weekly releases. For plugin patches please create pull requests against main branches and then follow guidelines from plugin maintainers. If you need additional reviews and you are a member of the jenkinsci organization, feel free to mention the @jenkinsci/java10-support team in your PRs.

    Links:

    http://feedproxy.google.com/~r/ContinuousBlog/~3/bCy5b1kqPys/



© Lightnetics 2024