This commit is a manual backport of #15628 on the 7.17 branch.
Since 7.17 uses Java 11, we switch to the adoptium variant, which is
still receiving updates (latest available is `11.0.21+9` as of now.)
This is a backport of #12538 to 7.17
This is not clean backport because #12538 results in empty commit due to the changes already committed into main with PR #13344, which is not backported because it removes the Java 8 testing.
Backport PR #13369 to 7.16 branch. Original message:
Add ability to pull the version used to build java from the logstash repo, rather
than rely on system Java. Previously, builds would use JAVA_HOME, now this setting
is ignored in Logstash (and by extension, parts of the Logstash build), which was causing
variations in the version of Java used to build Logstash, including the use of Java 8,
which the Logstash team would like to remove support for.
Relates: https://github.com/elastic/infra/pull/32818
This adds the .ci/matrix-runtime-javas.yml file that defines all
the JDKs logstash could be tested against. This is meant to be
used for the Matrix Combinations Jenkins plugin to be able to
select which JDK to test against dynamically.
openjdk14 appears to be the only version of java14 installed on jenkins windows
worker nodes, so use this instead of zulu14 and adoptopenjdk14
Backport of #11971
* Defined the versions of JDK to use in test build separated by OS (#11768)
* Added JDK 11 and 14 to Unix testing matrix (#11801)
- OpenJDK14 AdoptOpenJDK11 Zulu11
- OpenJDK14 AdoptOpenJDK14 Zulu14
Close#11801
Co-authored-by: Andrea Selva <andrea.selva@elastic.co>