HADOOP-16888. [JDK11] Support JDK11 in the precommit job (#2012)
* Install JDK 11 in the docker image * Refactor Dockerfile * Add compile test with JDK11 via Yetus multijdk feature
This commit is contained in:
parent
d50e93ce7b
commit
9821b94c94
5
Jenkinsfile
vendored
5
Jenkinsfile
vendored
@ -154,6 +154,11 @@ pipeline {
|
||||
# use emoji vote so it is easier to find the broken line
|
||||
YETUS_ARGS+=("--github-use-emoji-vote")
|
||||
|
||||
# test with Java 8 and 11
|
||||
YETUS_ARGS+=("--java-home=/usr/lib/jvm/java-8-openjdk-amd64")
|
||||
YETUS_ARGS+=("--multijdkdirs=/usr/lib/jvm/java-11-openjdk-amd64")
|
||||
YETUS_ARGS+=("--multijdktests=compile")
|
||||
|
||||
"${TESTPATCHBIN}" "${YETUS_ARGS[@]}"
|
||||
'''
|
||||
}
|
||||
|
@ -33,16 +33,10 @@ RUN echo APT::Install-Suggests "0"\; >> /etc/apt/apt.conf.d/10disableextras
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
ENV DEBCONF_TERSE true
|
||||
|
||||
######
|
||||
# Install common dependencies from packages. Versions here are either
|
||||
# sufficient or irrelevant.
|
||||
#
|
||||
# WARNING: DO NOT PUT JAVA APPS HERE! Otherwise they will install default
|
||||
# Ubuntu Java. See Java section below!
|
||||
######
|
||||
# hadolint ignore=DL3008
|
||||
RUN apt-get -q update \
|
||||
&& apt-get -q install -y --no-install-recommends \
|
||||
ant \
|
||||
apt-utils \
|
||||
bats \
|
||||
build-essential \
|
||||
@ -51,11 +45,13 @@ RUN apt-get -q update \
|
||||
cmake \
|
||||
curl \
|
||||
doxygen \
|
||||
findbugs \
|
||||
fuse \
|
||||
g++ \
|
||||
gcc \
|
||||
git \
|
||||
gnupg-agent \
|
||||
libbcprov-java \
|
||||
libbz2-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libfuse-dev \
|
||||
@ -64,11 +60,13 @@ RUN apt-get -q update \
|
||||
libsasl2-dev \
|
||||
libsnappy-dev \
|
||||
libssl-dev \
|
||||
libsnappy-dev \
|
||||
libtool \
|
||||
libzstd1-dev \
|
||||
locales \
|
||||
make \
|
||||
maven \
|
||||
openjdk-11-jdk \
|
||||
openjdk-8-jdk \
|
||||
pinentry-curses \
|
||||
pkg-config \
|
||||
python \
|
||||
@ -86,15 +84,13 @@ RUN apt-get -q update \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
#######
|
||||
# OpenJDK 8
|
||||
#######
|
||||
# hadolint ignore=DL3008
|
||||
RUN apt-get -q update \
|
||||
&& apt-get -q install -y --no-install-recommends openjdk-8-jdk libbcprov-java \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
######
|
||||
# Set env vars required to build Hadoop
|
||||
######
|
||||
ENV MAVEN_HOME /usr
|
||||
# JAVA_HOME must be set in Maven >= 3.5.0 (MNG-6003)
|
||||
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
|
||||
ENV FINDBUGS_HOME /usr
|
||||
|
||||
######
|
||||
# Install Google Protobuf 3.7.1 (3.0.0 ships with Bionic)
|
||||
@ -113,29 +109,6 @@ RUN mkdir -p /opt/protobuf-src \
|
||||
ENV PROTOBUF_HOME /opt/protobuf
|
||||
ENV PATH "${PATH}:/opt/protobuf/bin"
|
||||
|
||||
######
|
||||
# Install Apache Maven 3.6.0 (3.6.0 ships with Bionic)
|
||||
######
|
||||
# hadolint ignore=DL3008
|
||||
RUN apt-get -q update \
|
||||
&& apt-get -q install -y --no-install-recommends maven \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
ENV MAVEN_HOME /usr
|
||||
# JAVA_HOME must be set in Maven >= 3.5.0 (MNG-6003)
|
||||
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
|
||||
|
||||
######
|
||||
# Install findbugs 3.1.0 (3.1.0 ships with Bionic)
|
||||
# Ant is needed for findbugs
|
||||
######
|
||||
# hadolint ignore=DL3008
|
||||
RUN apt-get -q update \
|
||||
&& apt-get -q install -y --no-install-recommends findbugs ant \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
ENV FINDBUGS_HOME /usr
|
||||
|
||||
####
|
||||
# Install pylint at fixed version (2.0.0 removed python2 support)
|
||||
# https://github.com/PyCQA/pylint/issues/2294
|
||||
|
Loading…
Reference in New Issue
Block a user