I was seeing notification in Jenkins regarding upgrading the Java version from 8 to 11 for future Jenkins release support. But I am not seeing that notification now. So little confused whether Jenkins continuing support with Java 1.8?I was getting the java support notification to stop
From the Jenkins documentation.
Java 8 or Java 11 are required for running modern versions of Jenkins.
Upgrading an existing Jenkins setup from Java 8 to Java 11? See the
upgrade guidelines.
Java 11 Docker installation instructions are included in "Downloading
and running Jenkins in Docker"
Starting with the Jenkins 2.357 weekly release, Java 11 or Java 17
will be required. Java 8 is supported on the Long Term Support release
line until the September 2022 LTS release.
Java 17 users can run the jenkins/jenkins:jdk17 Docker image.
All other Java versions are not supported.
These requirements apply to all components of the Jenkins system,
including Jenkins controller, all types of agents, CLI clients, and
other components.
Jenkins project performs a full test flow with the following JDK/JREs:
OpenJDK JDK / JRE 11 - 64 bits
OpenJDK JDK / JRE 17 - 64 bits
JRE/JDKs from other vendors are supported and may be used. See our
Issue tracker for known Java compatibility issues.
The comment by Mark Rotteveel is very important: running Jenkins with Java 11 is not a big deal, the problem is what you can build. The biggest limitation is with Maven Jobs: if you have Maven projects based on Java 8 and you use Jenkins' Maven Job for them, you'll have to change something.
See https://plugins.jenkins.io/maven-plugin/ where it says:
Jenkins >= 1.520 requires Java 6 thus Maven jobs must be launched with Java >= 6.
Jenkins >= 1.612 requires Java 7 thus Maven jobs must be launched with Java >= 7.
Jenkins >= 2.54 requires Java 8 thus Maven jobs must be launched with Java >= 8.
Jenkins >= 2.357 requires Java 11 thus Maven jobs must be launched with Java >= 11.
The same thing is said at https://community.jenkins.io/t/maven-builds-fails-after-upgrade/3850/2.
Note that the migration guide at https://www.jenkins.io/doc/upgrade-guide/2.361/ does not make evident this limitation: it says you can still use Java 8 to build your projects but it does not say that you cannot build them as Maven Jobs anymore.
Similarly this post says:
The controller and agent must run java 11. [...] Your jobs however can
run whatever they want.
But, again, this is true only if you opt out of Maven Jobs.
Related
I have a basic question, I am trying to install jenkins on AWS EC2 ubantu instance.
I see Jenkins requires Java 11 to use newer versions - https://www.jenkins.io/doc/tutorials/tutorial-for-installing-jenkins-on-AWS/
I am planning to run junit tests which supports Java 8 on Jeknins node.
If I install Jenkins with Java 11 on EC2, does it impacts executing junits tests?
UPDATED:
Why Install automatically doesn't show list of options to select jdk versions?
In Jenkins I would like to use docker with pipeline.
That documentation says:
Starting with Pipeline versions 2.5 and higher, Pipeline has built-in
support for interacting with Docker
Our Jenkins is using version 2.305 (2021-08-03) right now. The latest version of jenkins currently is 2.340 (2022-03-22).
How can I find the version of "Pipeline" used at our system?
I found quite a few installed plugins called "Pipeline: ..." with various versions. Which one should be 2.5 in order to make the docker feature available?
Oh, I found it:
https://plugins.jenkins.io/workflow-aggregator/
https://github.com/jenkinsci/workflow-aggregator-plugin/blob/master/CHANGELOG.md
The Plugin was simply not installed at all. (Only many of it's dependencies where installed independently.)
My Jenkins current version is 2.19.3 with Java 7, and I am planning to upgrade my NXRM to 3.18 which will use JAVA 8, so does my Nexus upgrade impact Jenkins and Sonar running on Java 7?
Jenkins and Sonar work with java8 with no problems.
Every one of the apps you list starts up its own jvm; they are all independent. As long as you launch the right jvm you are fine. It worries me that as a developer, you'd be asking this.
Since 2.60, Jenkins has required Java 8 jvm to run. As Jenkins 2.164, it supports running on Java 11 jvm.
Since SonarQube, LTS 6.x, I believe, it has required Java 8 jvm to run. As of LTS 7.9, Java 11 jvm is required. It will still anaylze java 8 code.
Evidently, you should really be upgrading your SonarQube and especially Jenkins instances well. Jenkins in particular has had many security improvements.
I am trying to use jekins for deployment of my patch so here the server on which I want to deploy is a Windows server and my Jenkins is a Aix system and also my Jenkins version is 2.9 and it's run on java 7 where as the application I am deploying has a constraint that it could only be run on java 6 which is on Windows hence I need a solution for this java 7 to to java 6 slave connection.
I have resolved this issue by just installing a java 7 on the windows server with the constraint,
but the java 7 isn't configured in the path variable i have kept a command handy with the complete path of bin directory of the java 7 installed on the windows so i can connect via slave.jar to my jenkins server giving the path and executing the slave.jar with java 7 so that i dont get a major minor version error, and later on since its not in the path further use java 6 for later processing of windows server.
I am setting up the build system for a team that produces APIs used on several platforms and architectures. There has been a lot of work already spent on setting up Ant to build all of the Java code, so I would prefer to stick with Ant if possible.
Where I am stumped is how to build the C++ software. Here are the platforms and languages I need to support:
Java - Linux - 32bit & 64bit: Ant
Java - Windows - 32bit & 64bit: Ant
C++ - Linux - 32bit & 64bit: Ant w/CppTasks (question #1)
C++ - Windows - 32bit: (question #2)
Note: C++ on Windows is MS Visual Studio C++ projects.
I think the answer to question #1 is CppTasks because that seems to be the standard way to build C++ from Ant.
For question #2, I could also use CppTasks, but the developers will be compiling in Visual Studio, so it seems beneficial to use their Visual Studio project for building, which means calling MSBuild from Ant.
Has anyone tried this before and has a good solution for building Java & C++ on both Linux and Windows?
Do you use a Continuous Build System like Jenkins?
With Jenkins, your builds can be automatically triggered by check in/commit, time of day, and/or on command. The great thing about Jenkins is that you can have it automatically build all of the various versions of your software.
For example, you'll probably need to run make on Linux C++ but use msbuild on Windows systems, and you'll need to trigger a build on a Linux machine and one for a Windows machine. Jenkins can be setup to do this automatically. When a commit happens, all your various builds on all of your systems can be triggered at once. Then, you can store the builds you need on Jenkins and have your users actually pull the type they need off the project they need.
There are so many ways this could be setup, but the easiest is to simply create four separate jobs (One for Java 32bit, Java 64bit, C++ Linux, and C++ Microsoft). You don't necessarily need a separate Microsoft Java build (at least in theory), but there's nothing stopping you.
You can have a single Jenkins server run "slave" jobs on other build systems, so you could have Jenkins live on the 64Bit Linux system, but use a 32bit Linux system as a slave to do the 32bit build, and call a Windows slave to do the Visual Basic build. That way, all of your jobs are located in a central place, but you can use the environments you want.
If you've never used a Continuous Build system, download Jenkins and play around with it. It's free and open source, and very, very easy to use. You can run it on any machine that has a JDK or JRE 1.6. If you download the Windows version, it even comes with the JRE already built in.
Your best bet is to use a continuous build system and allow it to handle the mess. By the way, there's also Bamboo, CruiseControl, and Hudson (which was split from Jenkins a few months ago)
TeamCity should fit the bill very well. It supports Ant and MSBuild natively and has a pretty good cross plartform story (written in Java but excellent integration with e.g. Win).
Dont see any benefit in wrapping you Win MSBuild-based builds in yet another build system.
The list for this looks a little bit different (in my opinion)
Java -Maven for all platforms
C++ - Maybe Maven as well (Check http://duns.github.com/maven-nar-plugin/).