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

Run I-built tests on Java 23 on Linux #2363

Merged
merged 1 commit into from
Sep 19, 2024
Merged
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: 159 additions & 0 deletions JenkinsJobs/AutomatedTests/I_unit_cen64_gtk3_java23.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
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('AutomatedTests/ep' + MAJOR + MINOR + 'I-unit-cen64-gtk3-java23'){
description('Run Eclipse SDK Tests for the platform implied by this job\'s name')
parameters { // Define parameters in job configuration to make them available from the very first build onwards
stringParam('buildId', null, 'Build Id to test (such as I20240611-1800, N20120716-0800).')
}

definition {
cps {
sandbox()
script('''
pipeline {
options {
timeout(time: 600, unit: 'MINUTES')
timestamps()
buildDiscarder(logRotator(numToKeepStr:'5'))
}
agent {
kubernetes {
label 'centos-unitpod23'
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'){
environment {
// Declaring a jdk and ant the usual way in the 'tools' section, because of unknown reasons, breaks the usage of system commands like xvnc, pkill and sh
ANT_HOME = tool(type:'ant', name:'apache-ant-latest')
PATH = "${JAVA_HOME}/bin:${ANT_HOME}/bin:${PATH}"
}
steps {
container ('custom'){
xvnc(useXauthority: true) {
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

echo JAVA_HOME: $JAVA_HOME
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: 'Releng/ep-collectResults', wait: false, parameters: [
string(name: 'triggeringJob', value: "${JOB_BASE_NAME}"),
string(name: 'buildURL', value: "${BUILD_URL}"),
string(name: 'buildID', value: "${params.buildId}")
]
}
}
}
}
''')
}
}
}
}
1 change: 1 addition & 0 deletions JenkinsJobs/Builds/I_build.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@ spec:
build job: 'AutomatedTests/ep''' + MAJOR + MINOR + '''I-unit-cen64-gtk3-java17', parameters: [string(name: 'buildId', value: "${env.BUILD_IID.trim()}")], wait: false
build job: 'AutomatedTests/ep''' + MAJOR + MINOR + '''I-unit-cen64-gtk3-java21', parameters: [string(name: 'buildId', value: "${env.BUILD_IID.trim()}")], wait: false
build job: 'AutomatedTests/ep''' + MAJOR + MINOR + '''I-unit-cen64-gtk3-java22', parameters: [string(name: 'buildId', value: "${env.BUILD_IID.trim()}")], wait: false
build job: 'AutomatedTests/ep''' + MAJOR + MINOR + '''I-unit-cen64-gtk3-java23', parameters: [string(name: 'buildId', value: "${env.BUILD_IID.trim()}")], wait: false
build job: 'AutomatedTests/ep''' + MAJOR + MINOR + '''I-unit-macM1-java17', parameters: [string(name: 'buildId', value: "${env.BUILD_IID.trim()}")], wait: false
build job: 'AutomatedTests/ep''' + MAJOR + MINOR + '''I-unit-mac64-java17', parameters: [string(name: 'buildId', value: "${env.BUILD_IID.trim()}")], wait: false
build job: 'AutomatedTests/ep''' + MAJOR + MINOR + '''I-unit-win32-java17', parameters: [string(name: 'buildId', value: "${env.BUILD_IID.trim()}")], wait: false
Expand Down
2 changes: 1 addition & 1 deletion cje-production/scripts/publish.xml
Original file line number Diff line number Diff line change
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-java21_linux.gtk.x86_64_21,ep${eclipseStreamMajor}${eclipseStreamMinor}${buildType}-unit-cen64-gtk3-java22_linux.gtk.x86_64_22" />
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,ep${eclipseStreamMajor}${eclipseStreamMinor}${buildType}-unit-cen64-gtk3-java23_linux.gtk.x86_64_23" />

<condition
property="expectedConfigFilename"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
$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-java21_linux.gtk.x86_64_21";
$expectedTestConfigs[]="ep$STREAMMajor$STREAMMinor$TESTED_BUILD_TYPE-unit-cen64-gtk3-java22_linux.gtk.x86_64_22";
$expectedTestConfigs[]="ep$STREAMMajor$STREAMMinor$TESTED_BUILD_TYPE-unit-cen64-gtk3-java23_linux.gtk.x86_64_23";