Skip to content

Commit

Permalink
(v1.0.4-release) Cherry-pick changes for openj9 (#5702)
Browse files Browse the repository at this point in the history
* exclude JDK23+ and jdknext openj9 xmac testing on mac10 (#5688)

Signed-off-by: Lan Xia <Lan_Xia@ca.ibm.com>

* Support Semeru Artifactoriy SDK URL for releases (#5697)

resolves: #5696 and automation/issues/82

Signed-off-by: Lan Xia <Lan_Xia@ca.ibm.com>

* Remove support for semeru-runtimes/api (#5700)

related: #5696 and automation/issues/82

Signed-off-by: Lan Xia <Lan_Xia@ca.ibm.com>

---------

Signed-off-by: Lan Xia <Lan_Xia@ca.ibm.com>
  • Loading branch information
llxia authored Oct 17, 2024
1 parent 17d24b4 commit fc4bbe0
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 15 deletions.
2 changes: 1 addition & 1 deletion buildenv/jenkins/JenkinsfileBase
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ def setup() {
stage('Setup') {
setupEnv()
if (params.CUSTOMIZED_SDK_URL) {
if (params.SDK_RESOURCE == 'nightly') {
if (params.SDK_RESOURCE == 'nightly' || params.SDK_RESOURCE == 'releases') {
// remove single quote to allow variables to be set in CUSTOMIZED_SDK_URL
CUSTOMIZED_SDK_URL_OPTION = "-c ${params.CUSTOMIZED_SDK_URL}"
} else if (!params.SDK_RESOURCE || params.SDK_RESOURCE == 'customized') {
Expand Down
6 changes: 0 additions & 6 deletions buildenv/jenkins/aqaTestPipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,6 @@ def generateJobs(jobJdkVersion, jobTestFlag, jobPlatforms, jobTargets, jobParall
// example: <jenkins_url>/job/build-scripts/job/openjdk11-pipeline/123/artifact/target/linux/aarch64/openj9/*_aarch64_linux_*.tar.gz/*zip*/openj9.zip
download_url = "${url}artifact/target/${os}/${arch}/${params.VARIANT}/${filter}/*zip*/${params.VARIANT}.zip"
}
} else if (SDK_RESOURCE == "releases") {
if (params.VARIANT == "openj9") {
// get IBM Semeru CE
sdk_resource_value = "customized"
download_url="https://ibm.com/semeru-runtimes/api/v3/binary/latest/${jobJdkVersion}/ga/${os}/${arch}/jdk/openj9/normal/ibm_ce https://ibm.com/semeru-runtimes/api/v3/binary/latest/${jobJdkVersion}/ga/${os}/${arch}/testimage/openj9/normal/ibm_ce"
}
}
echo "download_url: ${download_url}"

Expand Down
7 changes: 5 additions & 2 deletions buildenv/jenkins/openjdk_tests
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,11 @@ timestamps{
}

// JDK23+ isn't supported on machines prior to Mac 11 https://github.com/eclipse-openj9/openj9/issues/19694
if (params.JDK_IMPL == "openj9" && PLATFORM == "x86-64_mac" && params.JDK_VERSION && params.JDK_VERSION.toInteger() >= 23) {
LABEL += "&&!sw.os.mac.10"
// assume if JDK_VERSION is set to next, JDK_VERSION is 23+
if (params.JDK_IMPL == "openj9" && PLATFORM == "x86-64_mac" && params.JDK_VERSION) {
if (!params.JDK_VERSION.isInteger() || params.JDK_VERSION.toInteger() >= 23) {
LABEL += "&&!sw.os.mac.10"
}
}

if (params.DOCKER_REQUIRED) {
Expand Down
35 changes: 29 additions & 6 deletions get.sh
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ getBinaryOpenjdk()
download_url+=" ${latestBuildUrl}${n}"
fi
done
elif [ "$CUSTOMIZED_SDK_URL" != "" ]; then
elif [ "$SDK_RESOURCE" == "customized" ] && [ "$CUSTOMIZED_SDK_URL" != "" ]; then
download_url=$CUSTOMIZED_SDK_URL
images="test-images.tar.gz debug-image.tar.gz"
download_urls=($download_url)
Expand Down Expand Up @@ -233,20 +233,43 @@ getBinaryOpenjdk()
arch="x64"
fi
if [[ $arch = *"x86-32"* ]]; then
arch="x32"
if [ "$JDK_IMPL" == "openj9" ]; then
arch="x86-32"
else
arch="x32"
fi
fi
release_type="ea"
if [ "$SDK_RESOURCE" = "releases" ]; then
release_type="ga"
fi

if [ "$JDK_IMPL" == "openj9" ]; then
if [ "$SDK_RESOURCE" = "nightly" ]; then
echo "Semeru API does not provide openj9 SDK nightly at the moment. Please use CUSTOMIZED_SDK_URL to provide the SDK URL directly."
if [ "$CUSTOMIZED_SDK_URL" == "" ]; then
echo "Please use CUSTOMIZED_SDK_URL to provide the base SDK URL for Artifactory."
exit 1
else
download_url="https://ibm.com/semeru-runtimes/api/v3/binary/latest/${JDK_VERSION}/${release_type}/${os}/${arch}/jdk/openj9/${heap_size}/ibm https://ibm.com/semeru-runtimes/api/v3/binary/latest/${JDK_VERSION}/${release_type}/${os}/${arch}/testimage/openj9/${heap_size}/ibm"
info_url="https://ibm.com/semeru-runtimes/api/v3/assets/feature_releases/${JDK_VERSION}/${release_type}?architecture=${arch}&heap_size=${heap_size}&image_type=jdk&jvm_impl=openj9&os=${os}&project=jdk&vendor=ibm https://ibm.com/semeru-runtimes/api/v3/assets/feature_releases/${JDK_VERSION}/${release_type}?architecture=${arch}&heap_size=${heap_size}&image_type=testimage&jvm_impl=openj9&os=${os}&project=jdk&vendor=ibm"
download_url_base="${CUSTOMIZED_SDK_URL}/${arch}_${os}/"
# Artifactory cannot handle duplicate slashes (//) in URL. Remove // except after http:// or https://
download_url_base=$(echo "$download_url_base" | sed -r 's|([^:])/+|\1/|g')
echo "artifactory URL: ${download_url_base}"
download_api_url_base=(${download_url_base//\/ui\/native\//\/artifactory\/api\/storage\/})
echo "use artifactory API to get the jdk and/or test images: ${download_api_url_base}"
download_urls=$(curl ${curl_options} ${download_api_url_base} | grep -E '.*\.tar\.gz"|.*\.zip"' | grep -E 'testimage|jdk'| sed 's/.*"uri" : "\([^"]*\)".*/\1/')
arr=(${download_urls/ / })
download_url=()
download_url_base=(${download_url_base//\/ui\/native\//\/artifactory\/})
echo "downloading files from $latestBuildUrl"
for n in "${arr[@]}" ; do
if [[ $n =~ 'testimage' ]]; then
if [ "$TEST_IMAGES_REQUIRED" == "true" ]; then
download_url+=" ${download_url_base}${n}"
fi
else
download_url+=" ${download_url_base}${n}"
fi
done
download_url=$(echo "$download_url" | sed -r 's|([^:])/+|\1/|g')
fi
else
download_url="https://api.adoptium.net/v3/binary/latest/${JDK_VERSION}/${release_type}/${os}/${arch}/jdk/${JDK_IMPL}/${heap_size}/adoptium?project=jdk https://api.adoptium.net/v3/binary/latest/${JDK_VERSION}/${release_type}/${os}/${arch}/sbom/${JDK_IMPL}/${heap_size}/adoptium?project=jdk"
Expand Down

0 comments on commit fc4bbe0

Please sign in to comment.