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

DO-NOT-MERGE Test Java 17 #6914

Open
wants to merge 9 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
159 changes: 0 additions & 159 deletions dev-support/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -83,27 +83,6 @@ pipeline {
// optional stages after the first one.
stage ('setup sources') {
steps {
dir("${WORKSPACE}/centos-7") {
sh '''#!/usr/bin/env bash

cp -Rp ${WORKSPACE}/src ${WORKSPACE}/centos-7
'''
}

dir("${WORKSPACE}/centos-8") {
sh '''#!/usr/bin/env bash

cp -Rp ${WORKSPACE}/src ${WORKSPACE}/centos-8
'''
}

dir("${WORKSPACE}/debian-10") {
sh '''#!/usr/bin/env bash

cp -Rp ${WORKSPACE}/src ${WORKSPACE}/debian-10
'''
}

dir("${WORKSPACE}/ubuntu-focal") {
sh '''#!/usr/bin/env bash

Expand All @@ -113,144 +92,6 @@ pipeline {
}
}

// This is an optional stage which runs only when there's a change in
// C++/C++ build/platform.
// This stage serves as a means of cross platform validation, which is
// really needed to ensure that any C++ related/platform change doesn't
// break the Hadoop build on Centos 7.
stage ('precommit-run Centos 7') {
environment {
SOURCEDIR = "${WORKSPACE}/centos-7/src"
PATCHDIR = "${WORKSPACE}/centos-7/out"
DOCKERFILE = "${SOURCEDIR}/dev-support/docker/Dockerfile_centos_7"
IS_OPTIONAL = 1
}

steps {
withCredentials(getGithubCreds()) {
sh '''#!/usr/bin/env bash

chmod u+x "${SOURCEDIR}/dev-support/jenkins.sh"
"${SOURCEDIR}/dev-support/jenkins.sh" run_ci
'''
}
}

post {
// Since this is an optional platform, we want to copy the artifacts
// and archive it only if the build fails, to help with debugging.
failure {
sh '''#!/usr/bin/env bash

cp -Rp "${WORKSPACE}/centos-7/out" "${WORKSPACE}"
'''
archiveArtifacts "out/**"
}

cleanup() {
script {
sh '''#!/usr/bin/env bash

chmod u+x "${SOURCEDIR}/dev-support/jenkins.sh"
"${SOURCEDIR}/dev-support/jenkins.sh" cleanup_ci_proc
'''
}
}
}
}

// This is an optional stage which runs only when there's a change in
// C++/C++ build/platform.
// This stage serves as a means of cross platform validation, which is
// really needed to ensure that any C++ related/platform change doesn't
// break the Hadoop build on Centos 8.
stage ('precommit-run Centos 8') {
environment {
SOURCEDIR = "${WORKSPACE}/centos-8/src"
PATCHDIR = "${WORKSPACE}/centos-8/out"
DOCKERFILE = "${SOURCEDIR}/dev-support/docker/Dockerfile_centos_8"
IS_OPTIONAL = 1
}

steps {
withCredentials(getGithubCreds()) {
sh '''#!/usr/bin/env bash

chmod u+x "${SOURCEDIR}/dev-support/jenkins.sh"
"${SOURCEDIR}/dev-support/jenkins.sh" run_ci
'''
}
}

post {
// Since this is an optional platform, we want to copy the artifacts
// and archive it only if the build fails, to help with debugging.
failure {
sh '''#!/usr/bin/env bash

cp -Rp "${WORKSPACE}/centos-8/out" "${WORKSPACE}"
'''
archiveArtifacts "out/**"
}

cleanup() {
script {
sh '''#!/usr/bin/env bash

chmod u+x "${SOURCEDIR}/dev-support/jenkins.sh"
"${SOURCEDIR}/dev-support/jenkins.sh" cleanup_ci_proc
'''
}
}
}
}

// This is an optional stage which runs only when there's a change in
// C++/C++ build/platform.
// This stage serves as a means of cross platform validation, which is
// really needed to ensure that any C++ related/platform change doesn't
// break the Hadoop build on Debian 10.
stage ('precommit-run Debian 10') {
environment {
SOURCEDIR = "${WORKSPACE}/debian-10/src"
PATCHDIR = "${WORKSPACE}/debian-10/out"
DOCKERFILE = "${SOURCEDIR}/dev-support/docker/Dockerfile_debian_10"
IS_OPTIONAL = 1
}

steps {
withCredentials(getGithubCreds()) {
sh '''#!/usr/bin/env bash

chmod u+x "${SOURCEDIR}/dev-support/jenkins.sh"
"${SOURCEDIR}/dev-support/jenkins.sh" run_ci
'''
}
}

post {
// Since this is an optional platform, we want to copy the artifacts
// and archive it only if the build fails, to help with debugging.
failure {
sh '''#!/usr/bin/env bash

cp -Rp "${WORKSPACE}/debian-10/out" "${WORKSPACE}"
'''
archiveArtifacts "out/**"
}

cleanup() {
script {
sh '''#!/usr/bin/env bash

chmod u+x "${SOURCEDIR}/dev-support/jenkins.sh"
"${SOURCEDIR}/dev-support/jenkins.sh" cleanup_ci_proc
'''
}
}
}
}

// We want to use Ubuntu Focal as our main CI and thus, this stage
// isn't optional (runs for all the PRs).
stage ('precommit-run Ubuntu focal') {
Expand Down
2 changes: 1 addition & 1 deletion dev-support/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ ENV PYTHONIOENCODING=utf-8
######
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 JAVA_HOME /usr/lib/jvm/java-17-openjdk-amd64

#######
# Set env vars for SpotBugs 4.2.2
Expand Down
16 changes: 2 additions & 14 deletions dev-support/docker/Dockerfile_centos_7
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,6 @@ COPY pkg-resolver pkg-resolver
RUN chmod a+x pkg-resolver/*.sh pkg-resolver/*.py \
&& chmod a+r pkg-resolver/*.json

######
# Centos 7 has reached its EOL and the packages
# are no longer available on mirror.centos.org site.
# Please see https://www.centos.org/centos-linux-eol/
######
RUN pkg-resolver/set-vault-as-baseurl-centos.sh centos:7

######
# Install packages from yum
######
Expand All @@ -45,13 +38,8 @@ RUN yum update -y \
&& yum groupinstall -y "Development Tools" \
&& yum install -y \
centos-release-scl \
python3

# Apply the script again because centos-release-scl creates new YUM repo files
RUN pkg-resolver/set-vault-as-baseurl-centos.sh centos:7

# hadolint ignore=DL3008,SC2046
RUN yum install -y $(pkg-resolver/resolve.py centos:7)
python3 \
&& yum install -y $(pkg-resolver/resolve.py centos:7)

# Set GCC 9 as the default C/C++ compiler
RUN echo "source /opt/rh/devtoolset-9/enable" >> /etc/bashrc
Expand Down
6 changes: 4 additions & 2 deletions dev-support/docker/pkg-resolver/packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,13 @@
"debian:10": "openjdk-11-jdk",
"ubuntu:focal": [
"openjdk-8-jdk",
"openjdk-11-jdk"
"openjdk-11-jdk",
"openjdk-17-jdk"
],
"ubuntu:focal::arch64": [
"openjdk-8-jdk",
"openjdk-11-jdk"
"openjdk-11-jdk",
"openjdk-17-jdk"
]
},
"pinentry-curses": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ fi
if [ "$1" == "centos:7" ] || [ "$1" == "centos:8" ]; then
cd /etc/yum.repos.d/ || exit &&
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* &&
sed -i 's|# *baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* &&
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* &&
yum update -y &&
cd /root || exit
else
Expand Down
8 changes: 3 additions & 5 deletions dev-support/jenkins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,10 @@ function run_ci() {
YETUS_ARGS+=("--docker")
YETUS_ARGS+=("--dockerfile=${DOCKERFILE}")
YETUS_ARGS+=("--mvn-custom-repos")
YETUS_ARGS+=("--dockermemlimit=22g")
YETUS_ARGS+=("--dockermemlimit=32g")

# 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")
# test with Java 17
YETUS_ARGS+=("--java-home=/usr/lib/jvm/java-17-openjdk-amd64")
fi

if [[ "$IS_NIGHTLY_BUILD" && "$IS_NIGHTLY_BUILD" == 1 ]]; then
Expand Down
21 changes: 11 additions & 10 deletions hadoop-common-project/hadoop-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,17 @@
</filesets>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<sourceFileExcludes>
<sourceFileExclude>**/FSProtos.java</sourceFileExclude>
</sourceFileExcludes>
<excludePackageNames>*.proto:*.tracing:*.protobuf</excludePackageNames>
</configuration>
</plugin>
</plugins>
</build>

Expand Down Expand Up @@ -1279,16 +1290,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<sourceFileExcludes>
<sourceFileExclude>**/FSProtos.java</sourceFileExclude>
</sourceFileExcludes>
<excludePackageNames>*.proto:*.tracing:*.protobuf</excludePackageNames>
</configuration>
</plugin>
</plugins>
</build>
</profile>
Expand Down
Loading
Loading