Skip to content

Commit b4ac006

Browse files
committed
[I/Y-Build] Convert RelEng Build-Tools ANT tasks to plain Java scripts
Convert the previous ANT tasks classes to plain Java Source-Code Programs that can be launched directly from source via the 'java' command, without being compiled. Arguments are read as system properties. This leverages JEP-458 - 'Launch Multi-File Source-Code Programs': https://openjdk.org/jeps/458 With this and the previous commit, this makes this repository independent from eclipse.platform.releng.buildtools.
1 parent c8e7a39 commit b4ac006

File tree

16 files changed

+376
-1217
lines changed

16 files changed

+376
-1217
lines changed

JenkinsJobs/Builds/build.jenkinsfile

Lines changed: 56 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ pipeline {
211211
$BASE_BUILDER_ECLIPSE_EXE \
212212
-debug -consolelog -data $CJE_ROOT/$TMP_DIR/workspace-toolsinstall \
213213
-application org.eclipse.equinox.p2.director \
214-
-repository ${ECLIPSE_RUN_REPO},${BUILDTOOLS_REPO},https://download.eclipse.org/cbi/updates/p2-analyzers/products/nightly/latest \
215-
-installIU org.eclipse.pde.api.tools,org.eclipse.releng.build.tools.feature.feature.group,org.eclipse.cbi.p2repo.analyzers \
214+
-repository ${ECLIPSE_RUN_REPO},https://download.eclipse.org/cbi/updates/p2-analyzers/products/nightly/latest \
215+
-installIU org.eclipse.pde.api.tools,org.eclipse.cbi.p2repo.analyzers \
216216
-profile SDKProfile
217217
'''
218218
}
@@ -251,6 +251,7 @@ pipeline {
251251

252252
# Gather maven properties
253253
cp ${AGG_DIR}/eclipse-platform-parent/target/mavenproperties.properties ${DROP_DIR}/$BUILD_ID/mavenproperties.properties
254+
comparatorRepo=$(grep '^comparator.repo=' ${DROP_DIR}/${BUILD_ID}/mavenproperties.properties | cut -d'=' -f2-)
254255

255256
# Gather artifactcomparisons
256257
pushd ${AGG_DIR}
@@ -260,23 +261,14 @@ pipeline {
260261
popd
261262

262263
# Verify comparatorlogs
263-
#
264-
# Note: copy mb220_buildSdkPatch.sh.log as mb060_run-maven-build_output.txt for now to avoid changing eclipse_compare.xml
265-
# ToDo: Modify org.eclipse.releng.build.tools.comparator.Extractor to be configurable:
266-
# https://github.com/eclipse-platform/eclipse.platform.releng.buildtools/blob/c5f7ecf1951d44311e24ce7bd6b505189aabb4da/bundles/org.eclipse.releng.build.tools.comparator/src/org/eclipse/releng/build/tools/comparator/Extractor.java#L27
267264
#TODO: Generally try to avoid the need to capture the build log in a file/for teeing
268-
cp ${logDir}/mb220_buildSdkPatch.sh.log ${DROP_DIR}/$BUILD_ID/buildlogs/mb060_run-maven-build_output.txt
265+
cp ${logDir}/mb220_buildSdkPatch.sh.log ${DROP_DIR}/$BUILD_ID/buildlogs/
269266

270-
pushd ${DROP_DIR}/$BUILD_ID
271-
$BASE_BUILDER_ECLIPSE_EXE \
272-
-application org.eclipse.ant.core.antRunner \
273-
-buildfile $ECLIPSE_BUILDER_DIR/eclipse/buildScripts/eclipse_compare.xml \
274-
-data $CJE_ROOT/$TMP_DIR/workspace-comparatorLogs \
267+
java \
275268
-DbuildDirectory=${DROP_DIR}/$BUILD_ID \
269+
-DcomparatorRepo=${comparatorRepo} \
276270
-Djava.io.tmpdir=$CJE_ROOT/$TMP_DIR \
277-
-v \
278-
compare
279-
popd
271+
${WORKSPACE}/scripts/releng/ComparatorSummaryExtractor.java
280272

281273
comparatorLogMinimumSize=350
282274
comparatorLog=${comparatorlogsDir}/buildtimeComparatorUnanticipated.log.txt
@@ -297,6 +289,9 @@ pipeline {
297289
stage('Eclipse') {
298290
stages {
299291
stage('Gather Eclipse parts') {
292+
tools {
293+
jdk 'temurin-jdk25-latest'
294+
}
300295
environment {
301296
KEYRING = credentials('secret-subkeys-releng.asc')
302297
KEYRING_PASSPHRASE = credentials('secret-subkeys-releng.asc-passphrase')
@@ -402,19 +397,9 @@ pipeline {
402397
popd
403398

404399
# Verify compilelog
405-
pushd ${DROP_DIR}/${BUILD_ID}
406-
$BASE_BUILDER_ECLIPSE_EXE \
407-
-application org.eclipse.ant.core.antRunner \
408-
-buildfile $ECLIPSE_BUILDER_DIR/eclipse/helper.xml \
409-
-data $CJE_ROOT/$TMP_DIR/workspace-verifyCompile \
410-
-DcjeDir=$CJE_ROOT \
411-
-DEBuilderDir=$ECLIPSE_BUILDER_DIR \
412-
-DbuildDirectory=${DROP_DIR}/${BUILD_ID} \
413-
-DbuildLabel=$BUILD_ID \
414-
-Djava.io.tmpdir=$CJE_ROOT/$TMP_DIR \
415-
-v \
416-
verifyCompile
417-
popd
400+
java \
401+
-Dinput=${DROP_DIR}/${BUILD_ID}/compilelogs/plugins \
402+
${WORKSPACE}/scripts/releng/CompileLogConverter.java
418403

419404
# Generate repository reports
420405
$BASE_BUILDER_ECLIPSE_EXE \
@@ -451,25 +436,25 @@ pipeline {
451436
done
452437

453438
# Publish Eclipse
454-
pushd $CJE_ROOT
455-
$BASE_BUILDER_ECLIPSE_EXE \
456-
-application org.eclipse.ant.core.antRunner \
457-
-buildfile $ECLIPSE_BUILDER_DIR/eclipse/helper.xml \
458-
-data $CJE_ROOT/$TMP_DIR/workspace-publish \
459-
-DAGGR_DIR=${AGG_DIR} \
460-
-DcjeDir=$CJE_ROOT \
461-
-DEBuilderDir=$ECLIPSE_BUILDER_DIR \
462-
-DbuildDirectory=${DROP_DIR}/${BUILD_ID} \
463-
-DbuildLabel=$BUILD_ID \
464-
-DbuildDir=$BUILD_ID \
465-
-DbuildRepo=$PLATFORM_REPO_DIR \
466-
-DbuildType=$BUILD_TYPE \
467-
-DpublishingContent=$ECLIPSE_BUILDER_DIR/eclipse/publishingFiles \
468-
-DindexFileName=index.php \
469-
-Djava.io.tmpdir=$CJE_ROOT/$TMP_DIR \
470-
-v \
471-
publish
439+
440+
pushd ${DROP_DIR}/${BUILD_ID}
441+
bash ${CJE_ROOT}/scripts/produceChecksum.sh eclipse
472442
popd
443+
444+
cp -r ${ECLIPSE_BUILDER_DIR}/eclipse/publishingFiles/staticDropFiles/. ${DROP_DIR}/${BUILD_ID}
445+
446+
java \
447+
-DisBuildTested=true \
448+
-DbuildType=${BUILD_TYPE} \
449+
-DdropTokenList='%repository%,%sdk%,%tests%,%runtime%,%jdtc%,%swt%' \
450+
-DdropHtmlFileName=index.php \
451+
-DxmlDirectoryName=${DROP_DIR}/${BUILD_ID}/testresults/xml \
452+
-DdropDirectoryName=${DROP_DIR}/${BUILD_ID} \
453+
-DdropTemplateFileName=${ECLIPSE_BUILDER_DIR}/eclipse/publishingFiles/templateFiles/index.template.php \
454+
-DcompileLogsDirectoryName=${DROP_DIR}/${BUILD_ID}/compilelogs/plugins \
455+
-DtestManifestFileName=${ECLIPSE_BUILDER_DIR}/eclipse/publishingFiles/testManifest.xml \
456+
-DtestsConfigExpected=${TEST_CONFIGURATIONS_EXPECTED} \
457+
${WORKSPACE}/scripts/releng/TestResultsGenerator.java
473458
'''
474459
}
475460
}
@@ -492,6 +477,9 @@ pipeline {
492477
stage('Equinox') {
493478
stages {
494479
stage('Gather Equinox parts') {
480+
tools {
481+
jdk 'temurin-jdk25-latest'
482+
}
495483
environment {
496484
KEYRING = credentials('secret-subkeys-releng.asc')
497485
KEYRING_PASSPHRASE = credentials('secret-subkeys-releng.asc-passphrase')
@@ -533,25 +521,43 @@ pipeline {
533521
# Publish Equinox
534522
pushd $CJE_ROOT
535523
mkdir -p $ECLIPSE_BUILDER_DIR/equinox/$TMP_DIR
524+
mkdir -p $CJE_ROOT/$TMP_DIR
536525
$BASE_BUILDER_ECLIPSE_EXE \
537526
-application org.eclipse.ant.core.antRunner \
538527
-buildfile $ECLIPSE_BUILDER_DIR/equinox/helper.xml \
539528
-data $CJE_ROOT/$TMP_DIR/workspace-publishEquinox \
540529
-DEBuilderDir=$ECLIPSE_BUILDER_DIR \
541530
-DbuildDir=$BUILD_ID \
542-
-DbuildDirectory=${EQUINOX_DROP_DIR} \
543531
-DbuildId=$BUILD_ID \
544532
-DbuildRepo=$PLATFORM_REPO_DIR \
545-
-DbuildType=$BUILD_TYPE \
546-
-DpostingDirectory=${DROP_DIR}/$BUILD_ID \
547533
-DequinoxPostingDirectory=${EQUINOX_DROP_DIR} \
548534
-DeqpublishingContent=$ECLIPSE_BUILDER_DIR/equinox/publishingFiles \
549-
-DindexFileName=index.php \
550535
-Dequinox.build.configs=$ECLIPSE_BUILDER_DIR/equinox/buildConfigs \
551536
-Djava.io.tmpdir=$CJE_ROOT/$TMP_DIR \
552537
-v \
553538
publish
554539
popd
540+
541+
pushd ${EQUINOX_DROP_DIR}/${BUILD_ID}
542+
bash ${CJE_ROOT}/scripts/produceChecksum.sh equinox
543+
popd
544+
545+
# Copy compile logs to this posting directory. Not sure needed. Is this where API reports come from? TODO: check this or just remove it? It's probably not of interest anyways.
546+
#cp -r ${DROP_DIR}/$BUILD_ID/compilelogs/**/plugins/org.eclipse.osgi*/** ${DROP_DIR}/$BUILD_ID/compilelogs/**/plugins/org.eclipse.equinox*/** ${EQUINOX_DROP_DIR}/${BUILD_ID}
547+
548+
cp -r ${ECLIPSE_BUILDER_DIR}/equinox/publishingFiles/staticDropFiles/. ${EQUINOX_DROP_DIR}/${BUILD_ID}
549+
550+
java \
551+
-DisBuildTested=false \
552+
-DbuildType=${BUILD_TYPE} \
553+
-DdropTokenList='%equinox%,%framework%,%extrabundles%,%other%,%launchers%,%osgistarterkits%' \
554+
-DdropHtmlFileName=index.php \
555+
-DxmlDirectoryName=${DROP_DIR}/$BUILD_ID/testresults/xml \
556+
-DdropDirectoryName=${EQUINOX_DROP_DIR}/${BUILD_ID} \
557+
-DdropTemplateFileName=${ECLIPSE_BUILDER_DIR}/equinox/publishingFiles/templateFiles/index.template.php \
558+
-DcompileLogsDirectoryName=${EQUINOX_DROP_DIR}/${BUILD_ID}/compilelogs/plugins \
559+
-DtestManifestFileName=${ECLIPSE_BUILDER_DIR}/equinox/publishingFiles/testManifest.xml \
560+
${WORKSPACE}/scripts/releng/TestResultsGenerator.java
555561
'''
556562
}
557563
}

JenkinsJobs/Releng/updateTestResultIndex.jenkinsfile

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,16 @@ pipeline {
1616
label 'basic'
1717
}
1818
tools {
19-
jdk 'temurin-jdk21-latest'
19+
jdk 'temurin-jdk25-latest'
2020
}
2121
stages {
2222
stage('Checkout SCM') {
2323
steps {
2424
dir("${WORKSPACE}/git-repo") {
2525
checkout scmGit(userRemoteConfigs: [[url: "${scm.userRemoteConfigs[0].url}"]], branches: [[name: "${scm.branches[0].name}"]],
2626
extensions: [cloneOption(depth: 1, shallow: true, noTags: true), sparseCheckout([
27-
[path: 'cje-production/'],
27+
[path: 'scripts/releng/'],
2828
[path: 'eclipse.platform.releng.tychoeclipsebuilder/eclipse/publishingFiles/testManifest.xml'],
29-
[path: 'JenkinsJobs/shared/utilities.groovy'],
3029
])])
3130
}
3231
}
@@ -35,7 +34,6 @@ pipeline {
3534
environment {
3635
// Download Server locations (seldomly change)
3736
EP_ECLIPSE_DROPS = '/home/data/httpd/download.eclipse.org/eclipse/downloads/drops4'
38-
ECLIPSE = installLatestEclipse()
3937
}
4038
steps {
4139
sshagent(['projects-storage.eclipse.org-bot-ssh']) {
@@ -44,26 +42,21 @@ pipeline {
4442
curl -L -o "${WORKSPACE}/buildproperties.shsource" http://download.eclipse.org/eclipse/downloads/drops4/${buildID}/buildproperties.shsource
4543
source "${WORKSPACE}/buildproperties.shsource"
4644

47-
$ECLIPSE -data workspace-toolsinstall \
48-
-application org.eclipse.equinox.p2.director \
49-
-repository ${ECLIPSE_RUN_REPO},${BUILDTOOLS_REPO} \
50-
-installIU org.eclipse.releng.build.tools.feature.feature.group
51-
5245
buildDirectory="${WORKSPACE}/postingDir/${buildID}"
5346
testResultsDir="${buildDirectory}/testresults"
5447
mkdir -p "${testResultsDir}"
5548

5649
# Fetch previously collected test results of all completed runs
5750
rsync -avzh [email protected]:${EP_ECLIPSE_DROPS}/${buildID}/testresults/xml ${testResultsDir}
5851

59-
#triggering ant runner
60-
$ECLIPSE -debug -data ${WORKSPACE}/workspace-updateTestResults \
61-
-application org.eclipse.ant.core.antRunner \
62-
-file "${WORKSPACE}/git-repo/cje-production/scripts/publish.xml" \
63-
-DbuildDirectory=${buildDirectory} \
52+
java \
53+
-DisBuildTested=true \
6454
-DbuildType=${BUILD_TYPE} \
65-
"-DtestsConfigExpected=${TEST_CONFIGURATIONS_EXPECTED}" \
66-
"-DmanifestFile=${WORKSPACE}/git-repo/eclipse.platform.releng.tychoeclipsebuilder/eclipse/publishingFiles/testManifest.xml"
55+
-DdropDirectoryName=${buildDirectory} \
56+
-DxmlDirectoryName=${buildDirectory}/testresults/xml \
57+
-DtestManifestFileName=${WORKSPACE}/git-repo/eclipse.platform.releng.tychoeclipsebuilder/eclipse/publishingFiles/testManifest.xml \
58+
-DtestsConfigExpected=${TEST_CONFIGURATIONS_EXPECTED} \
59+
${WORKSPACE}/git-repo/scripts/releng/TestResultsGenerator.java
6760

6861
rsync -avzh ${buildDirectory} [email protected]:${EP_ECLIPSE_DROPS}
6962
'''
@@ -73,13 +66,3 @@ pipeline {
7366
}
7467
}
7568
}
76-
77-
def installLatestEclipse(){
78-
def props = readProperties(file: "${WORKSPACE}/git-repo/cje-production/buildproperties.txt").collectEntries{n, v ->
79-
v = v.trim();
80-
return [n, (v.startsWith('"') && v.endsWith('"') ? v.substring(1, v.length() - 1) : v)]
81-
}
82-
def utilities = load "${WORKSPACE}/git-repo/JenkinsJobs/shared/utilities.groovy"
83-
def eclipseURL = "https://download.eclipse.org/eclipse/downloads/drops4/${props.PREVIOUS_RELEASE_ID}/eclipse-platform-${props.PREVIOUS_RELEASE_VER}-linux-gtk-x86_64.tar.gz"
84-
return utilities.installDownloadableTool('eclipse', eclipseURL) + '/eclipse --launcher.suppressErrors -nosplash -consolelog'
85-
}

cje-production/buildproperties.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,4 @@ BASEBUILD_ID="I20251126-2330"
3838
#release id for downloading eclipse
3939
PREVIOUS_RELEASE_ID="S-4.38RC2-202511262330"
4040

41-
BUILDTOOLS_REPO="https://download.eclipse.org/eclipse/updates/buildtools"
4241
ECLIPSE_RUN_REPO="https://download.eclipse.org/eclipse/updates/4.39-I-builds/"

eclipse.platform.releng.tychoeclipsebuilder/eclipse/extras/produceChecksum.sh renamed to cje-production/scripts/produceChecksum.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/bin/bash -x
22
#*******************************************************************************
33
# Copyright (c) 2017, 2025 IBM Corporation and others.
44
#
@@ -12,10 +12,18 @@
1212
# Contributors:
1313
# David Williams - initial API and implementation
1414
#*******************************************************************************
15-
#
15+
16+
if [ $# -ne 1 ]; then
17+
echo USAGE: $0 client
18+
exit 1
19+
fi
20+
client=$1
21+
1622
echo "[DEBUG] Producing checksums starting"
1723
echo "[DEBUG] current directory: ${PWD}"
1824

25+
mkdir checksum
26+
1927
allCheckSumsSHA512=checksum/${client}-${BUILD_ID}-SUMSSHA512
2028
fileExtensionsToHash='zip dmg gz tar.xz jar'
2129

cje-production/scripts/publish.xml

Lines changed: 0 additions & 97 deletions
This file was deleted.

0 commit comments

Comments
 (0)