Skip to content

Commit

Permalink
YBuild Update for Java 22 (#1644)
Browse files Browse the repository at this point in the history
  • Loading branch information
MohananRahul committed Dec 7, 2023
1 parent 4e024b9 commit ecf11bc
Show file tree
Hide file tree
Showing 10 changed files with 196 additions and 27 deletions.
7 changes: 4 additions & 3 deletions JenkinsJobs/YBuilds/Y_build.groovy
Expand Up @@ -17,7 +17,7 @@ for (STREAM in STREAMS){
# format: Minute Hour Day Month Day of the week (0-7)
#Daily Y-build
#0 10 * * *
0 10 * * *
#milestone week
#0 6 * * 2
#0 6 * * 4
Expand Down Expand Up @@ -517,6 +517,7 @@ spec:
container('jnlp') {
build job: 'YPBuilds/ep''' + MAJOR + MINOR + '''Y-unit-cen64-gtk3-java17', parameters: [string(name: 'buildId', value: "${env.BUILD_IID.trim()}")], wait: false
build job: 'YPBuilds/ep''' + MAJOR + MINOR + '''Y-unit-cen64-gtk3-java21', parameters: [string(name: 'buildId', value: "${env.BUILD_IID.trim()}")], wait: false
build job: 'YPBuilds/ep''' + MAJOR + MINOR + '''Y-unit-cen64-gtk3-java22', parameters: [string(name: 'buildId', value: "${env.BUILD_IID.trim()}")], wait: false
build job: 'YPBuilds/ep''' + MAJOR + MINOR + '''Y-unit-macM1-java17', parameters: [string(name: 'buildId', value: "${env.BUILD_IID.trim()}")], wait: false
build job: 'YPBuilds/ep''' + MAJOR + MINOR + '''Y-unit-mac64-java17', parameters: [string(name: 'buildId', value: "${env.BUILD_IID.trim()}")], wait: false
build job: 'Start-smoke-tests', parameters: [string(name: 'buildId', value: "${env.BUILD_IID.trim()}")], wait: false
Expand All @@ -528,13 +529,13 @@ spec:
failure {
emailext body: "Please go to <a href='${BUILD_URL}console'>${BUILD_URL}console</a> and check the build failure.<br><br>",
subject: "${env.BUILD_VERSION} Y-Build: ${env.BUILD_IID.trim()} - BUILD FAILED",
to: "rahul.mohanan@ibm.com jarthana@in.ibm.com Sheena.Sheena@ibm.com alshama.m.s@ibm.com elsa.zacharia@ibm.com suby.surendran@ibm.com gpunathi@in.ibm.com sravankumarl@in.ibm.com kalyan_prasad@in.ibm.com lshanmug@in.ibm.com manoj.palat@in.ibm.com niraj.modi@in.ibm.com noopur_gupta@in.ibm.com sarika.sinha@in.ibm.com vikas.chandra@in.ibm.com akurtakov@gmail.com",
to: "rahul.mohanan@ibm.com jarthana@in.ibm.com alshama.m.s@ibm.com elsa.zacharia@ibm.com suby.surendran@ibm.com gpunathi@in.ibm.com sravankumarl@in.ibm.com manoj.palat@in.ibm.com noopur_gupta@in.ibm.com akurtakov@gmail.com",
from:"genie.releng@eclipse.org"
}
success {
emailext body: "Eclipse downloads:<br> <a href='https://download.eclipse.org/eclipse/downloads/drops4/${env.BUILD_IID.trim()}'>https://download.eclipse.org/eclipse/downloads/drops4/${env.BUILD_IID.trim()}</a><br><br> Build logs and/or test results (eventually):<br> <a href='https://download.eclipse.org/eclipse/downloads/drops4/${env.BUILD_IID.trim()}/testResults.php'>https://download.eclipse.org/eclipse/downloads/drops4/${env.BUILD_IID.trim()}/testResults.php</a><br><br>${env.POM_UPDATES_BODY.trim()}${env.COMPARATOR_ERRORS_BODY.trim()}Software site repository:<br> <a href='https://download.eclipse.org/eclipse/updates/${env.RELEASE_VER.trim()}-Y-builds'>https://download.eclipse.org/eclipse/updates/${env.RELEASE_VER.trim()}-Y-builds</a><br><br>Specific (simple) site repository:<br> <a href='https://download.eclipse.org/eclipse/updates/${env.RELEASE_VER.trim()}-Y-builds/${env.BUILD_IID.trim()}'>https://download.eclipse.org/eclipse/updates/${env.RELEASE_VER.trim()}-Y-builds/${env.BUILD_IID.trim()}</a><br><br>Equinox downloads:<br> <a href='https://download.eclipse.org/equinox/drops/${env.BUILD_IID.trim()}'>https://download.eclipse.org/equinox/drops/${env.BUILD_IID.trim()}</a><br><br>",
subject: "${env.BUILD_VERSION} Y-Build: ${env.BUILD_IID.trim()} ${env.POM_UPDATES_SUBJECT.trim()} ${env.COMPARATOR_ERRORS_SUBJECT.trim()}",
to: "rahul.mohanan@ibm.com jarthana@in.ibm.com Sheena.Sheena@ibm.com alshama.m.s@ibm.com elsa.zacharia@ibm.com suby.surendran@ibm.com gpunathi@in.ibm.com sravankumarl@in.ibm.com kalyan_prasad@in.ibm.com lshanmug@in.ibm.com manoj.palat@in.ibm.com niraj.modi@in.ibm.com noopur_gupta@in.ibm.com sarika.sinha@in.ibm.com vikas.chandra@in.ibm.com akurtakov@gmail.com",
to: "rahul.mohanan@ibm.com jarthana@in.ibm.com alshama.m.s@ibm.com elsa.zacharia@ibm.com suby.surendran@ibm.com gpunathi@in.ibm.com sravankumarl@in.ibm.com manoj.palat@in.ibm.com noopur_gupta@in.ibm.com akurtakov@gmail.com",
from:"genie.releng@eclipse.org"
}
}
Expand Down
168 changes: 168 additions & 0 deletions JenkinsJobs/YBuilds/Y_unit_cen64_gtk3_java22.groovy
@@ -0,0 +1,168 @@
def config = new groovy.json.JsonSlurper().parseText(readFileFromWorkspace('JenkinsJobs/JobDSL.json'))
def STREAMS = config.Streams

for (STREAM in STREAMS){
def MAJOR = STREAM.split('\\.')[0]
def MINOR = STREAM.split('\\.')[1]

pipelineJob('YPBuilds/ep' + MAJOR + MINOR + 'Y-unit-cen64-gtk3-java22'){

logRotator {
numToKeep(5)
}

parameters {
stringParam('buildId', null, null)
stringParam('javaDownload', 'https://download.java.net/java/early_access/jdk22/26/GPL/openjdk-22-ea+26_linux-x64_bin.tar.gz', null)
}

definition {
cps {
sandbox()
script('''
pipeline {
options {
timeout(time: 600, unit: 'MINUTES')
timestamps()
buildDiscarder(logRotator(numToKeepStr:'5'))
}
agent {
kubernetes {
label 'centos-unitpod22'
defaultContainer 'custom'
yaml """
apiVersion: v1
kind: Pod
spec:
containers:
- name: "jnlp"
resources:
limits:
memory: "2048Mi"
cpu: "2000m"
requests:
memory: "512Mi"
cpu: "1000m"
- name: "custom"
image: "eclipse/platformreleng-centos-gtk3-metacity:8"
imagePullPolicy: "Always"
resources:
limits:
memory: "4096Mi"
cpu: "1000m"
requests:
# memory needs to be at least 1024Mi, see https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/issues/2478
memory: "1024Mi"
cpu: "1000m"
securityContext:
privileged: false
tty: true
command:
- cat
volumeMounts:
- mountPath: "/opt/tools"
name: "volume-0"
readOnly: false
workingDir: "/home/jenkins/agent"
nodeSelector: {}
restartPolicy: "Never"
volumes:
- name: "volume-0"
persistentVolumeClaim:
claimName: "tools-claim-jiro-releng"
readOnly: true
- configMap:
name: "known-hosts"
name: "volume-1"
- emptyDir:
medium: ""
name: "workspace-volume"
- emptyDir:
medium: ""
name: "volume-3"
"""
}
}
stages {
stage('Run tests'){
steps {
container ('custom'){
wrap([$class: 'Xvnc', takeScreenshot: false, useXauthority: true]) {
withEnv(["JAVA_HOME_NEW=${ tool 'openjdk-jdk18-latest' }"]) {
withAnt(installation: 'apache-ant-latest') {
sh \'\'\'#!/bin/bash -x
buildId=$(echo $buildId|tr -d ' ')
RAW_DATE_START="$(date +%s )"
export LANG=en_US.UTF-8
cat /etc/*release
echo -e "\\n\\tRAW Date Start: ${RAW_DATE_START} \\n"
echo -e "\\n\\t whoami: $( whoami )\\n"
echo -e "\\n\\t uname -a: $(uname -a)\\n"
# 0002 is often the default for shell users, but it is not when ran from
# a cron job, so we set it explicitly, to be sure of value, so releng group has write access to anything
# we create on shared area.
oldumask=$(umask)
umask 0002
echo "umask explicitly set to 0002, old value was $oldumask"
# we want java.io.tmpdir to be in $WORKSPACE, but must already exist, for Java to use it.
mkdir -p ${WORKSPACE}/tmp
wget -O ${WORKSPACE}/getEBuilder.xml --no-verbose --no-check-certificate https://download.eclipse.org/eclipse/relengScripts/production/testScripts/hudsonBootstrap/getEBuilder.xml 2>&1
wget -O ${WORKSPACE}/buildproperties.shsource --no-check-certificate https://download.eclipse.org/eclipse/downloads/drops4/${buildId}/buildproperties.shsource
cat ${WORKSPACE}/buildproperties.shsource
source ${WORKSPACE}/buildproperties.shsource
set -x
mkdir -p ${WORKSPACE}/java
pushd ${WORKSPACE}/java
wget -O jdk.tar.gz --no-verbose ${javaDownload}
tar xzf jdk.tar.gz
rm jdk.tar.gz
export JAVA_HOME_NEW=$(pwd)/$(ls)
popd
set +x
export PATH=${JAVA_HOME_NEW}/bin:${ANT_HOME}/bin:${PATH}
echo JAVA_HOME: $JAVA_HOME
export JAVA_HOME=$JAVA_HOME_NEW
echo ANT_HOME: $ANT_HOME
echo PATH: $PATH
export ANT_OPTS="${ANT_OPTS} -Djava.io.tmpdir=${WORKSPACE}/tmp -Djava.security.manager=allow"
env 1>envVars.txt 2>&1
ant -diagnostics 1>antDiagnostics.txt 2>&1
java -XshowSettings -version 1>javaSettings.txt 2>&1
ant -f getEBuilder.xml -Djava.io.tmpdir=${WORKSPACE}/tmp -DbuildId=$buildId -DeclipseStream=$STREAM -DEBUILDER_HASH=${EBUILDER_HASH} -DdownloadURL=https://download.eclipse.org/eclipse/downloads/drops4/${buildId} -Dosgi.os=linux -Dosgi.ws=gtk -Dosgi.arch=x86_64 -DtestSuite=all -Djvm=${JAVA_HOME}/bin/java
RAW_DATE_END="$(date +%s )"
echo -e "\\n\\tRAW Date End: ${RAW_DATE_END} \\n"
TOTAL_TIME=$((${RAW_DATE_END} - ${RAW_DATE_START}))
echo -e "\\n\\tTotal elapsed time: ${TOTAL_TIME} \\n"
\'\'\'
}
}
}
}
archiveArtifacts '**/eclipse-testing/results/**, **/eclipse-testing/directorLogs/**, *.properties, *.txt'
junit keepLongStdio: true, testResults: '**/eclipse-testing/results/xml/*.xml'
build job: 'YPBuilds/ep-collectYbuildResults', parameters: [string(name: 'triggeringJob', value: "${JOB_BASE_NAME}"), string(name: 'buildURL', value: "${BUILD_URL}"), string(name: 'buildID', value: "${params.buildId}")], wait: false
}
}
}
}
''')
}
}
}
}
28 changes: 14 additions & 14 deletions cje-production/P-build/buildproperties.txt
Expand Up @@ -17,15 +17,15 @@

# CJE build variables
BRANCH="master"
PATCH_OR_BRANCH_LABEL="java21patch"
PATCH_BUILD="java21patch"
BUILD_TYPE_NAME="Beta Java 21"
PATCH_OR_BRANCH_LABEL="java22patch"
PATCH_BUILD="java22patch"
BUILD_TYPE_NAME="Beta Java 22"
BUILD_TYPE="P"
TESTED_BUILD_TYPE="P"
RELEASE_VER="4.30"
STREAM="4.30.0"
RELEASE_VER="4.31"
STREAM="4.31.0"
STREAMMajor="4"
STREAMMinor="29"
STREAMMinor="31"
STREAMService="0"
GIT_ROOT="git@github.com:"
AGG_REPO="eclipse-platform/eclipse.platform.releng.aggregator.git"
Expand All @@ -39,26 +39,26 @@ BUILD_TO_COMPARE_SITE="ftp.osuosl.org/pub/eclipse/eclipse/updates"
LOCAL_REPO="localMavenRepo"

# Base builder parameters
BASEBUILDER_TAG="4.28"
API_PREV_REF_LABEL="4.28"
BASEBUILDER_TAG="4.30"
API_PREV_REF_LABEL="4.30"
#API_FREEZE_REF_LABEL="4.28RC1"
API_FREEZE_REF_LABEL=""
# Change to appropriate versions and uncomment when entering API freeze
#FREEZE_PARAMS="-DfreezeBaseURL=https://${DOWNLOAD_HOST}/eclipse/downloads/drops4/S-${API_FREEZE_REF_LABEL}-202208241800/eclipse-SDK-${API_FREEZE_REF_LABEL}-win32-x86_64.zip -DfreezeName=Eclipse-SDK-${API_FREEZE_REF_LABEL} -DfreezeFilename=eclipse-SDK-${API_FREEZE_REF_LABEL}-win32-x86_64.zip"
# Otherwise set to a blank space
FREEZE_PARAMS=" "

PREVIOUS_RELEASE_VER="4.28"
PREVIOUS_RELEASE_REPO_ID="4.28"
PREVIOUS_RELEASE_VER="4.30"
PREVIOUS_RELEASE_REPO_ID="4.30"
#build id for getting repo
BASEBUILD_ID="R-4.28-202306050440"
BASEBUILD_ID="R-4.30-202312010110"
#release id for downloading eclipse
PREVIOUS_RELEASE_ID="R-4.28-202306050440"
PREVIOUS_RELEASE_ID="R-4.30-202312010110"

BUILDTOOLS_REPO="https://download.eclipse.org/eclipse/updates/buildtools/"
WEBTOOLS_REPO="https://download.eclipse.org/webtools/downloads/drops/R3.27.0/R-3.27.0-20220829002010/repositoryunittests/"
WEBTOOLS_REPO="https://download.eclipse.org/webtools/downloads/drops/R3.31.0/R-3.31.0-20230903090456/repositoryunittests/"
BASEBUILDER_DIR="tmp/org.eclipse.releng.basebuilder"
ECLIPSE_RUN_REPO="https://download.eclipse.org/eclipse/updates/4.29-I-builds/"
ECLIPSE_RUN_REPO="https://download.eclipse.org/eclipse/updates/4.31-I-builds/"

#Maven parameters
MAVEN_OPTS="-Xmx6G"
Expand Down
2 changes: 1 addition & 1 deletion cje-production/P-build/mb300_gatherEclipseParts.sh
Expand Up @@ -32,7 +32,7 @@ cp $CJE_ROOT/$AGG_DIR/eclipse-platform-parent/target/mavenproperties.properties

# gather repo
echo $PATCH_BUILD
PATCH_BUILD_GENERIC=java21patch
PATCH_BUILD_GENERIC=java22patch
REPO_DIR=$ECLIPSE_BUILDER_DIR/$PATCH_BUILD/eclipse.releng.repository.$PATCH_BUILD_GENERIC/target/repository

if [ -d $REPO_DIR ]; then
Expand Down
2 changes: 1 addition & 1 deletion cje-production/Y-build/buildproperties.txt
Expand Up @@ -55,7 +55,7 @@ BASEBUILD_ID="R-4.30-202312010110"
PREVIOUS_RELEASE_ID="R-4.30-202312010110"

BUILDTOOLS_REPO="https://download.eclipse.org/eclipse/updates/buildtools/"
WEBTOOLS_REPO="https://download.eclipse.org/webtools/downloads/drops/R3.22.0/R-3.22.0-20210612170523/repositoryunittests/"
WEBTOOLS_REPO="https://download.eclipse.org/webtools/downloads/drops/R3.31.0/R-3.31.0-20230903090456/repositoryunittests/"
BASEBUILDER_DIR="tmp/org.eclipse.releng.basebuilder"
ECLIPSE_RUN_REPO="https://download.eclipse.org/eclipse/updates/4.31-I-builds/"

Expand Down
2 changes: 1 addition & 1 deletion cje-production/Y-build/publish.xml
Expand Up @@ -184,7 +184,7 @@
<!-- else normal unit tests configs -->
<property
name="testsConfigExpected"
value="ep${eclipseStreamMajor}${eclipseStreamMinor}${buildType}-unit-mac64-java17_macosx.cocoa.x86_64_17,ep${eclipseStreamMajor}${eclipseStreamMinor}${buildType}-unit-macM1-java17_macosx.cocoa.aarch64_17,ep${eclipseStreamMajor}${eclipseStreamMinor}${buildType}-unit-win32-java17_win32.win32.x86_64_17,ep${eclipseStreamMajor}${eclipseStreamMinor}${buildType}-unit-cen64-gtk3-java17_linux.gtk.x86_64_17,ep${eclipseStreamMajor}${eclipseStreamMinor}${buildType}-unit-cen64-gtk3-java20_linux.gtk.x86_64_20,ep${eclipseStreamMajor}${eclipseStreamMinor}${buildType}-unit-cen64-gtk3-java21_linux.gtk.x86_64_21" />
value="ep${eclipseStreamMajor}${eclipseStreamMinor}${buildType}-unit-mac64-java17_macosx.cocoa.x86_64_17,ep${eclipseStreamMajor}${eclipseStreamMinor}${buildType}-unit-macM1-java17_macosx.cocoa.aarch64_17,ep${eclipseStreamMajor}${eclipseStreamMinor}${buildType}-unit-win32-java17_win32.win32.x86_64_17,ep${eclipseStreamMajor}${eclipseStreamMinor}${buildType}-unit-cen64-gtk3-java17_linux.gtk.x86_64_17,ep${eclipseStreamMajor}${eclipseStreamMinor}${buildType}-unit-cen64-gtk3-java21_linux.gtk.x86_64_21,ep${eclipseStreamMajor}${eclipseStreamMinor}${buildType}-unit-cen64-gtk3-java22_linux.gtk.x86_64_22" />

<condition
property="expectedConfigFilename"
Expand Down
2 changes: 1 addition & 1 deletion cje-production/Y-build/testConfigs.php
Expand Up @@ -13,5 +13,5 @@
$expectedTestConfigs[]="ep$STREAMMajor$STREAMMinor$TESTED_BUILD_TYPE-unit-mac64-java17_macosx.cocoa.x86_64_17";
$expectedTestConfigs[]="ep$STREAMMajor$STREAMMinor$TESTED_BUILD_TYPE-unit-macM1-java17_macosx.cocoa.aarch64_17";
$expectedTestConfigs[]="ep$STREAMMajor$STREAMMinor$TESTED_BUILD_TYPE-unit-cen64-gtk3-java17_linux.gtk.x86_64_17";
$expectedTestConfigs[]="ep$STREAMMajor$STREAMMinor$TESTED_BUILD_TYPE-unit-cen64-gtk3-java20_linux.gtk.x86_64_20";
$expectedTestConfigs[]="ep$STREAMMajor$STREAMMinor$TESTED_BUILD_TYPE-unit-cen64-gtk3-java21_linux.gtk.x86_64_21";
$expectedTestConfigs[]="ep$STREAMMajor$STREAMMinor$TESTED_BUILD_TYPE-unit-cen64-gtk3-java22_linux.gtk.x86_64_22";
3 changes: 0 additions & 3 deletions cje-production/streams/repositories_java21patch.txt

This file was deleted.

Expand Up @@ -3,9 +3,9 @@ equinox: master
rt.equinox.p2: master
eclipse.jdt: master
eclipse.jdt.core.binaries: master
eclipse.jdt.core: BETA_JAVA21
eclipse.jdt.debug: BETA_JAVA21
eclipse.jdt.ui: BETA_JAVA21
eclipse.jdt.core: BETA_JAVA22
eclipse.jdt.debug: BETA_JAVA22
eclipse.jdt.ui: BETA_JAVA22
eclipse.pde: master
eclipse.platform.debug: master
eclipse.platform.resources: master
Expand Down
3 changes: 3 additions & 0 deletions cje-production/streams/repositories_java22patch.txt
@@ -0,0 +1,3 @@
eclipse.jdt.core: BETA_JAVA22
eclipse.jdt.debug: BETA_JAVA22
eclipse.jdt.ui: BETA_JAVA22

0 comments on commit ecf11bc

Please sign in to comment.