Skip to content

Commit

Permalink
Enable Corretto builds
Browse files Browse the repository at this point in the history
Signed-off-by: andrew-m-leonard <[email protected]>
  • Loading branch information
andrew-m-leonard authored and sxa555 committed Feb 26, 2020
1 parent 89d61df commit f55f08c
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 23 deletions.
7 changes: 1 addition & 6 deletions configureBuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,7 @@ setRepository() {
suffix="SAP/SapMachine";
elif [[ "${BUILD_CONFIG[BUILD_VARIANT]}" == "${BUILD_VARIANT_CORRETTO}" ]]
then
if [ "${BUILD_CONFIG[OPENJDK_CORE_VERSION]}" == "${JDK8_CORE_VERSION}" ]; then
suffix="corretto/corretto-8";
else
echo "Adopt only currently supports corretto for JDK8"
exit 1
fi
suffix="corretto/corretto-${BUILD_CONFIG[OPENJDK_CORE_VERSION]:3}"
elif [ "${BUILD_CONFIG[OPENJDK_CORE_VERSION]}" == "${JDK8_CORE_VERSION}" ] && [ "${BUILD_CONFIG[OS_ARCHITECTURE]}" == "armv7l" ]; then
suffix="adoptopenjdk/openjdk-aarch32-jdk8u";
else
Expand Down
5 changes: 3 additions & 2 deletions pipelines/jobs/configurations/jdk11u.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ targetConfigurations = [
],
"x64Linux" : [
"hotspot",
"openj9"
"openj9",
"corretto"
],
"x64Windows" : [
"hotspot",
Expand Down Expand Up @@ -56,4 +57,4 @@ targetConfigurations = [
// 23:30
triggerSchedule="TZ=UTC\n30 23 * * *"

return this
return this
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",
"hotspot-jfr",
"openj9"
"openj9",
"corretto"
],
"x32Windows" : [
"hotspot",
Expand Down
28 changes: 15 additions & 13 deletions sbin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,20 +132,22 @@ getOpenJdkVersion() {
local version;

if [ "${BUILD_CONFIG[BUILD_VARIANT]}" == "${BUILD_VARIANT_CORRETTO}" ]; then
local updateRegex="UPDATE_VERSION=([0-9]+)";
local buildRegex="BUILD_NUMBER=b([0-9]+)";

local versionData="$(tr '\n' ' ' < ${BUILD_CONFIG[WORKSPACE_DIR]}/${BUILD_CONFIG[WORKING_DIR]}/${BUILD_CONFIG[OPENJDK_SOURCE_DIR]}/version.spec)"

local updateNum
local buildNum
if [[ "${versionData}" =~ $updateRegex ]]; then
updateNum="${BASH_REMATCH[1]}"
fi
if [[ "${versionData}" =~ $buildRegex ]]; then
buildNum="${BASH_REMATCH[1]}"
local corrVerFile=${BUILD_CONFIG[WORKSPACE_DIR]}/${BUILD_CONFIG[WORKING_DIR]}/${BUILD_CONFIG[OPENJDK_SOURCE_DIR]}/version.txt

local corrVersion="$(cut -d'.' -f 1 < ${corrVerFile})"

if [ "${corrVersion}" == "8" ]; then
local updateNum="$(cut -d'.' -f 2 < ${corrVerFile})"
local buildNum="$(cut -d'.' -f 3 < ${corrVerFile})"
local fixNum="$(cut -d'.' -f 4 < ${corrVerFile})"
version="jdk8u${updateNum}-b${buildNum}.${fixNum}"
else
local minorNum="$(cut -d'.' -f 2 < ${corrVerFile})"
local updateNum="$(cut -d'.' -f 3 < ${corrVerFile})"
local buildNum="$(cut -d'.' -f 4 < ${corrVerFile})"
local fixNum="$(cut -d'.' -f 5 < ${corrVerFile})"
version="jdk-${corrVersion}.${minorNum}.${updateNum}+${buildNum}.${fixNum}"
fi
version="8u${updateNum}-b${buildNum}"
else
version=${BUILD_CONFIG[TAG]:-$(getFirstTagFromOpenJDKGitRepo)}

Expand Down
2 changes: 1 addition & 1 deletion sbin/common/config_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ function setBranch() {
if [ "${BUILD_CONFIG[BUILD_VARIANT]}" == "${BUILD_VARIANT_OPENJ9}" ]; then
branch="openj9";
elif [ "${BUILD_CONFIG[BUILD_VARIANT]}" == "${BUILD_VARIANT_CORRETTO}" ]; then
branch="preview-release";
branch="develop";
fi

BUILD_CONFIG[BRANCH]=${BUILD_CONFIG[BRANCH]:-$branch}
Expand Down

0 comments on commit f55f08c

Please sign in to comment.