Skip to content

Commit

Permalink
add dragonwell support (adoptium#2051)
Browse files Browse the repository at this point in the history
* add dragonwell support

* fix bootJDK

* Update jdk8u.groovy
  • Loading branch information
gdams authored and Morgan Davies committed Sep 11, 2020
1 parent 45f298a commit 2cf9384
Show file tree
Hide file tree
Showing 11 changed files with 62 additions and 12 deletions.
2 changes: 2 additions & 0 deletions configureBuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ setRepository() {
suffix="SAP/SapMachine"
elif [[ "${BUILD_CONFIG[BUILD_VARIANT]}" == "${BUILD_VARIANT_CORRETTO}" ]]; then
suffix="corretto/corretto-${BUILD_CONFIG[OPENJDK_CORE_VERSION]:3}"
elif [[ "${BUILD_CONFIG[BUILD_VARIANT]}" == "${BUILD_VARIANT_DRAGONWELL}" ]]; then
suffix="alibaba/dragonwell${BUILD_CONFIG[OPENJDK_CORE_VERSION]/jdk/}"
elif [ "${BUILD_CONFIG[OPENJDK_CORE_VERSION]}" == "${JDK8_CORE_VERSION}" ] && [ "${BUILD_CONFIG[OS_ARCHITECTURE]}" == "armv7l" ]; then
suffix="adoptopenjdk/openjdk-aarch32-jdk8u";
elif [ "${BUILD_CONFIG[OPENJDK_CORE_VERSION]}" == "${JDK8_CORE_VERSION}" ] && [ "${BUILD_CONFIG[OS_ARCHITECTURE]}" == "aarch64" ]; then
Expand Down
7 changes: 6 additions & 1 deletion pipelines/build/common/openjdk_build_pipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ class Build {
switch (buildConfig.VARIANT) {
case "openj9": variant = "j9"; break
case "corretto": variant = "corretto"; break
case "dragonwell": variant = "dragonwell"; break;
default: variant = "hs"
}

Expand Down Expand Up @@ -118,6 +119,8 @@ class Build {
jdkBranch = 'openj9'
} else if (buildConfig.VARIANT == "hotspot"){
jdkBranch = 'dev'
} else if (buildConfig.VARIANT == "dragonwell") {
jdkBranch = 'master'
} else {
context.error("Unrecognized build variant '${buildConfig.VARIANT}' ")
throw new Exception()
Expand All @@ -135,8 +138,10 @@ class Build {
suffix="corretto/corretto-${javaNumber}"
} else if (buildConfig.VARIANT == "openj9") {
suffix = "ibmruntimes/openj9-openjdk-jdk${javaNumber}"
} else if (buildConfig.VARIANT == "hotspot"){
} else if (buildConfig.VARIANT == "hotspot") {
suffix = "adoptopenjdk/openjdk-${buildConfig.JAVA_TO_BUILD}"
} else if (buildConfig.VARIANT == "dragonwell") {
suffix = "alibaba/dragonwell${javaNumber}"
} else {
context.error("Unrecognized build variant '${buildConfig.VARIANT}' ")
throw new Exception()
Expand Down
12 changes: 12 additions & 0 deletions pipelines/build/dockerFiles/dragonwell.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ARG image

FROM $image

RUN \
# Dragonewell 8 requires a dragonwell 8 BootJDK
mkdir -p /opt/dragonwell; \
wget https://github.com/alibaba/dragonwell8/releases/download/dragonwell-8.4.4_jdk8u262-ga/Alibaba_Dragonwell_8.4.4-GA_Linux_x64.tar.gz; \
tar -xf Alibaba_Dragonwell_8.4.4-GA_Linux_x64.tar.gz -C /opt/; \
mv /opt/jdk8u262-b10 /opt/dragonwell8

ENV JDK7_BOOT_DIR="/opt/dragonwell8"
3 changes: 2 additions & 1 deletion pipelines/jobs/configurations/jdk11u.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ targetConfigurations = [
"x64Linux" : [
"hotspot",
"openj9",
"corretto"
"corretto",
"dragonwell"
],
"x64Windows" : [
"hotspot",
Expand Down
3 changes: 2 additions & 1 deletion pipelines/jobs/configurations/jdk11u_pipeline_config.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ class Config11 {
"openj9" : '--enable-jitserver --enable-dtrace=auto',
"hotspot" : '--enable-dtrace=auto',
"corretto" : '--enable-dtrace=auto',
"SapMachine" : '--enable-dtrace=auto'
"SapMachine" : '--enable-dtrace=auto',
"dragonwell" : '--enable-dtrace=auto --enable-unlimited-crypto --with-jvm-variants=server --with-zlib=system --with-jvm-features=zgc'
]
],

Expand Down
3 changes: 2 additions & 1 deletion pipelines/jobs/configurations/jdk8u.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ targetConfigurations = [
"x64Linux" : [
"hotspot",
"openj9",
"corretto"
"corretto",
"dragonwell"
],
"x32Windows" : [
"hotspot",
Expand Down
6 changes: 4 additions & 2 deletions pipelines/jobs/configurations/jdk8u_pipeline_config.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ class Config8 {
arch : 'x64',
dockerImage : 'adoptopenjdk/centos6_build_image',
dockerFile: [
openj9 : 'pipelines/build/dockerFiles/cuda.dockerfile'
openj9 : 'pipelines/build/dockerFiles/cuda.dockerfile',
dragonwell: 'pipelines/build/dockerFiles/dragonwell.dockerfile'
],
test : ['sanity.openjdk', 'sanity.system', 'extended.system', 'sanity.perf', 'sanity.external', 'special.functional', 'special.openjdk'],
configureArgs : [
"openj9" : '--enable-jitserver'
"openj9" : '--enable-jitserver',
"dragonwell" : '--enable-jfr --enable-unlimited-crypto --with-jvm-variants=server --with-zlib=system',
]
],

Expand Down
20 changes: 15 additions & 5 deletions sbin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ getOpenJdkVersion() {
fi
else
version=${BUILD_CONFIG[TAG]:-$(getFirstTagFromOpenJDKGitRepo)}

if [ "${BUILD_CONFIG[BUILD_VARIANT]}" == "${BUILD_VARIANT_DRAGONWELL}" ]; then
version=$(echo $version | cut -d'_' -f 2)
fi
# TODO remove pending #1016
version=${version%_adopt}
version=${version#aarch64-shenandoah-}
Expand Down Expand Up @@ -244,10 +246,18 @@ configuringVersionStringParameter()

addConfigureArg "--without-version-pre" ""
addConfigureArgIfValueIsNotEmpty "--with-version-build=" "${buildNumber}"
addConfigureArg "--with-vendor-version-string=" "AdoptOpenJDK"
addConfigureArg "--with-vendor-url=" "https://adoptopenjdk.net/"
addConfigureArg "--with-vendor-name=" "AdoptOpenJDK"
addConfigureArg "--with-vendor-bug-url=" "https://github.com/AdoptOpenJDK/openjdk-support/issues"

if [[ "${BUILD_CONFIG[BUILD_VARIANT]}" == "${BUILD_VARIANT_DRAGONWELL}" ]]; then
addConfigureArg "--with-vendor-name=" "Alibaba"
addConfigureArg "--with-vendor-url=" "http://www.alibabagroup.com"
addConfigureArg "--with-vendor-bug-url=" "mailto:[email protected]"
addConfigureArg "--with-vendor-version-string=" "\"(Alibaba Dragonwell)\""
else
addConfigureArg "--with-vendor-version-string=" "AdoptOpenJDK"
addConfigureArg "--with-vendor-url=" "https://adoptopenjdk.net/"
addConfigureArg "--with-vendor-name=" "AdoptOpenJDK"
addConfigureArg "--with-vendor-bug-url=" "https://github.com/AdoptOpenJDK/openjdk-support/issues"
fi

if [[ "${BUILD_CONFIG[BUILD_VARIANT]}" == "${BUILD_VARIANT_OPENJ9}" ]]; then
addConfigureArg "--with-vendor-vm-bug-url=" "https://github.com/eclipse/openj9/issues"
Expand Down
2 changes: 2 additions & 0 deletions sbin/common/config_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,8 @@ function setBranch() {
local branch="dev"
if [ "${BUILD_CONFIG[BUILD_VARIANT]}" == "${BUILD_VARIANT_OPENJ9}" ]; then
branch="openj9";
elif [ "${BUILD_CONFIG[BUILD_VARIANT]}" == "${BUILD_VARIANT_DRAGONWELL}" ]; then
branch="master";
elif [ "${BUILD_CONFIG[BUILD_VARIANT]}" == "${BUILD_VARIANT_CORRETTO}" ]; then
branch="develop";
fi
Expand Down
1 change: 1 addition & 0 deletions sbin/common/constants.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export BUILD_VARIANT_HOTSPOT="hotspot"
export BUILD_VARIANT_OPENJ9="openj9"
export BUILD_VARIANT_CORRETTO="corretto"
export BUILD_VARIANT_SAP="SapMachine"
export BUILD_VARIANT_DRAGONWELL="dragonwell"

export GIT_TAGS_TO_SEARCH=100

Expand Down
15 changes: 14 additions & 1 deletion sbin/prepareWorkspace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ checkoutAndCloneOpenJDKGitRepo() {
# eg. origin https://github.com/adoptopenjdk/openjdk-jdk11u (fetch)
# eg. origin https://github.com/adoptopenjdk/openjdk-jdk (fetch)
# eg. origin [email protected]:adoptopenjdk/openjdk-jdk.git (fetch)
git --git-dir "${BUILD_CONFIG[OPENJDK_SOURCE_DIR]}/.git" remote -v | grep "origin.*fetch" | grep "${BUILD_CONFIG[OPENJDK_CORE_VERSION]}" | grep "${BUILD_CONFIG[REPOSITORY]}.git\|${BUILD_CONFIG[REPOSITORY]}\s"
if [ "${BUILD_CONFIG[BUILD_VARIANT]}" == "${BUILD_VARIANT_DRAGONWELL}" ]; then
git --git-dir "${BUILD_CONFIG[OPENJDK_SOURCE_DIR]}/.git" remote -v | grep "origin.*fetch"
else
git --git-dir "${BUILD_CONFIG[OPENJDK_SOURCE_DIR]}/.git" remote -v | grep "origin.*fetch" | grep "${BUILD_CONFIG[OPENJDK_CORE_VERSION]}" | grep "${BUILD_CONFIG[REPOSITORY]}.git\|${BUILD_CONFIG[REPOSITORY]}\s"
fi
local isValidGitRepo=$?
set -e

Expand Down Expand Up @@ -102,6 +106,7 @@ checkoutAndCloneOpenJDKGitRepo() {
git clean -ffdx

updateOpenj9Sources
updateDragonwellSources

createSourceTagFile

Expand Down Expand Up @@ -256,6 +261,14 @@ updateOpenj9Sources() {
fi
}

updateDragonwellSources() {
if [[ "${BUILD_CONFIG[BUILD_VARIANT]}" == "${BUILD_VARIANT_DRAGONWELL}" ]] && [[ "${BUILD_CONFIG[OPENJDK_CORE_VERSION]}" == "${JDK8_CORE_VERSION}" ]]; then
cd "${BUILD_CONFIG[WORKSPACE_DIR]}/${BUILD_CONFIG[WORKING_DIR]}/${BUILD_CONFIG[OPENJDK_SOURCE_DIR]}" || return
bash get_source_dragonwell.sh --site github
cd "${BUILD_CONFIG[WORKSPACE_DIR]}"
fi
}

# Clone the git repo
cloneOpenJDKGitRepo() {
setGitCloneArguments
Expand Down

0 comments on commit 2cf9384

Please sign in to comment.