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

Support JDK-19 builds on Jenkins #2808

Merged
merged 4 commits into from
Nov 1, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,21 @@ RUN curl -SL https://github.com/adoptium/temurin17-binaries/releases/download/jd
mkdir -p /opt/java/openjdk-17 && \
tar -xzf /opt/jdk17.tar.gz --strip-components 1 -C /opt/java/openjdk-17/ && \
rm /opt/jdk17.tar.gz
# JDK 19
RUN curl -SL https://github.com/adoptium/temurin19-binaries/releases/download/jdk-19.0.1%2B10/OpenJDK19U-jdk_x64_linux_hotspot_19.0.1_10.tar.gz -o /opt/jdk19.tar.gz && \
mkdir -p /opt/java/openjdk-19 && \
tar -xzf /opt/jdk19.tar.gz --strip-components 1 -C /opt/java/openjdk-19/ && \
rm /opt/jdk19.tar.gz


# ENV JDK
ENV JAVA_HOME=/opt/java/openjdk-14 \
PATH=$PATH:$JAVA_HOME/bin \
JAVA14_HOME=/opt/java/openjdk-14 \
JAVA8_HOME=/opt/java/openjdk-8 \
JAVA11_HOME=/opt/java/openjdk-11 \
JAVA17_HOME=/opt/java/openjdk-17
JAVA17_HOME=/opt/java/openjdk-17 \
JAVA19_HOME=/opt/java/openjdk-19

# Sets user to opensearch as gradle check requires non-root user
USER opensearch
Expand Down
10 changes: 10 additions & 0 deletions jenkins/gradle/gradle-check.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ pipeline {
JAVA11_HOME="/var/jenkins/tools/hudson.model.JDK/openjdk-11"
JAVA14_HOME="/var/jenkins/tools/hudson.model.JDK/openjdk-14"
JAVA17_HOME="/var/jenkins/tools/hudson.model.JDK/openjdk-17"
JAVA19_HOME="/var/jenkins/tools/hudson.model.JDK/openjdk-19"
peterzhuamazon marked this conversation as resolved.
Show resolved Hide resolved
USER_BUILD_CAUSE = currentBuild.getBuildCauses('hudson.model.Cause$UserIdCause')
TIMER_BUILD_CAUSE = currentBuild.getBuildCauses('hudson.triggers.TimerTrigger$TimerTriggerCause')
}
Expand Down Expand Up @@ -100,6 +101,15 @@ pipeline {
sh("ls ${JAVA17_HOME}/.. | grep openjdk-17")
}
}
stage('Install openjdk-19') {
tools {
jdk 'openjdk-19'
}
steps {
echo "Install openjdk-19"
sh("ls ${JAVA19_HOME}/.. | grep openjdk-19")
}
}
stage('Run Gradle Check') {
steps {
script {
Expand Down