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

[JEP-236] [JENKINS-68570] Require Java 11 or newer #6083

Merged
merged 33 commits into from Jun 24, 2022
Merged

Conversation

basil
Copy link
Member

@basil basil commented Dec 19, 2021

[JEP-236] [JENKINS-68570] Require Java 11 or newer

Testing done

Start Jenkins from scratch; accept default plugins; build Freestyle and Pipeline jobs.

Proposed changelog entries

Require Java 11 or newer.

Proposed upgrade guidelines

The official Jenkins Docker images have been based on Java 11 for many months, with Java 8 available as a fallback and Java 17 available in preview mode. Beginning with Jenkins 2.357, the Java 8 images will be retired and the Java 17 images will transition from preview to general availability (GA). Users of the official Docker images need not install or configure Java on their own, as it comes preinstalled in the Docker images.

Users of the official Jenkins OS packages for Debian, Red Hat, and SUSE Linux distributions should note that these packages are agnostic to the Java vendor. In other words, you must bring your own Java package. One straightforward way to do this is to install Java 11 from your Linux distribution, as described in on the package download site:

By virtue of not requiring any custom repositories, this is certainly the simplest method (and the one used by the Jenkins project’s packaging tests), but it does not give the user a high degree of control over the Java runtime environment. As mentioned previously, the official Jenkins Docker images use Adoptium/Eclipse Temurin (as does the Jenkins infrastructure project). Enthusiastic users may wish to install Java from Adoptium or another vendor. Adoptium recently began providing Linux installation packages, as described in a piece by George Adams. Ultimately, the choice of which Java vendor to use is your own, as long as that vendor provides Java 11 or Java 17. Refer to your chosen Java vendor for installation instructions.

Once you have installed a suitable version of Java, configuring Jenkins to use that Java runtime is easy. The most straightforward way is to configure that version of Java as the default version of Java at the operating system (OS) level:

  • Debian: update-alternatives --config java
  • Red Hat: alternatives --config java
  • SUSE: update-alternatives --config java

Alternatively, users who do not wish to change the default version of Java can customize the JAVA_HOME or JENKINS_JAVA_CMD environment variable as part of the Jenkins systemd(1) service unit. Refer to the Managing systemd services section of the Jenkins documentation for more information.

Maintainer checklist

Before the changes are marked as ready-for-merge:

  • There are at least 2 approvals for the pull request and no outstanding requests for change
  • Conversations in the pull request are over OR it is explicit that a reviewer does not block the change
  • Changelog entries in the PR title and/or Proposed changelog entries are accurate, human-readable, and in the imperative mood
  • Proper changelog labels are set so that the changelog can be generated automatically
  • If the change needs additional upgrade steps from users, upgrade-guide-needed label is set and there is a Proposed upgrade guidelines section in the PR title. (example)
  • If it would make sense to backport the change to LTS, a Jira issue must exist, be a Bug or Improvement, and be labeled as lts-candidate to be considered (see query).

@basil basil added the rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted label Dec 19, 2021
basil added a commit to basil/jenkins that referenced this pull request Dec 19, 2021
@basil basil mentioned this pull request Dec 19, 2021
@oleg-nenashev oleg-nenashev added major-rfe For changelog: Major enhancement. Will be highlighted on the top upgrade-guide-needed This changes might be breaking in rare circumstances, an entry in the LTS upgrade guide is needed and removed rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted labels Dec 19, 2021
@basil basil mentioned this pull request Dec 19, 2021
10 tasks
basil added a commit to basil/jenkins that referenced this pull request Dec 19, 2021
basil added a commit to basil/jenkins that referenced this pull request Dec 20, 2021
@timja
Copy link
Member

timja commented Dec 21, 2021

Nice, I’ve tried switching bom to Java 11 a couple of times but always hit weird test failures I didn’t manage to track down :(

pom.xml Outdated Show resolved Hide resolved
@jglick
Copy link
Member

jglick commented Jan 31, 2022

@basil basil marked this pull request as ready for review June 22, 2022 17:05
Copy link
Member

@NotMyFault NotMyFault left a comment

Choose a reason for hiding this comment

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

Really looking forward to this in the next weekly release 🎉

Copy link
Member

@jglick jglick left a comment

Choose a reason for hiding this comment

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

🎉

.mvn/jvm.config Outdated Show resolved Hide resolved
Jenkinsfile Show resolved Hide resolved
@@ -719,7 +719,8 @@ THE SOFTWARE.
<artifactId>maven-surefire-plugin</artifactId>
<!-- Version specified in grandparent POM -->
<configuration>
<argLine>@{jacocoSurefireArgs}</argLine>
<!-- Make sure to keep the directives in test/pom.xml and war/pom.xml in sync with these. -->
Copy link
Member

Choose a reason for hiding this comment

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

Just seems to be shuffled around from a profile, but while we are here and since it is related to Java 11: would it be possible to introduce a POM property in root pom.xml to enforce that?

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 versions in core/pom.xml and test/pom.xml could be deduplicated but the version in war/pom.xml cannot be deduplicated because it is in the form of a MANIFEST.MF directive rather than command-line arguments. I am not sure the savings of 3 to 2 copies of the code is worth it.

@jglick
Copy link
Member

jglick commented Jun 24, 2022

Hmm, somehow GitHub seems to have scrambled up the list of commits? (diff still looks sane)

@basil
Copy link
Member Author

basil commented Jun 24, 2022

Hmm, somehow GitHub seems to have scrambled up the list of commits? (diff still looks sane)

Seems fine to me? I can squash and force push if you think that would help somehow? Was planning to squash merge anyway.

@jglick
Copy link
Member

jglick commented Jun 24, 2022

wtf
Possibly the result of trying to (topologically) merge in some branch which had been squash-“merged” before, or similar. Probably does not matter if this PR is ultimately squash-merged itself, just confusing for future readers.

@basil basil changed the title Require Java 11 [JEP-236] [JENKINS-68570] Require Java 11 or newer Jun 24, 2022
@basil basil added the ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback label Jun 24, 2022
@basil
Copy link
Member Author

basil commented Jun 24, 2022

I just filled out the PR template and added the ready-for-merge label. The next step at this point would be to wait for 24 hours to allow for objections, but perhaps we can dispense with that this time around.

@basil
Copy link
Member Author

basil commented Jun 24, 2022

I am going to dispense with the formality because I doubt anyone is going to object at this point. I still have a number of tasks on my landing checklist to do before Tuesday and delaying this further will just slow down the process for no benefit I think.

@timja
Copy link
Member

timja commented Jul 2, 2022

@basil
Copy link
Member Author

basil commented Jul 6, 2022

Caused jenkinsci/acceptance-test-harness#807

Sorry for the inconvenience and thank you for helping to restore the status quo. I must admit that I have very little motivation to work on acceptance-test-harness: the whole setup seems highly problematic to me, including but not limited to its continued use of the deprecated docker-fixtures library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
major-rfe For changelog: Major enhancement. Will be highlighted on the top ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback upgrade-guide-needed This changes might be breaking in rare circumstances, an entry in the LTS upgrade guide is needed
Projects
None yet
6 participants