Skip to content

Commit 1419aaf

Browse files
committed
[I/Y-Build] Inline scripts for Eclipse base-builder and report creation
Also use the same Eclipse installation to generate the repository and API report and don't create a separate installation from the one fetched from the download server. This avoids the need to maintain the simple eclipse invocations in separate files and thus simplifies the pipeline.
1 parent dd00ff7 commit 1419aaf

File tree

8 files changed

+56
-161
lines changed

8 files changed

+56
-161
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ workspace/
99
RemoteSystemsTempFiles/
1010
/apiAnalyzer-workspace/
1111
eclipse.platform.common/bundles/org.eclipse.platform.doc.isv/samples/*/doc-html
12+
/tools/
1213

1314
# Maven/Tycho build artifats
1415
target/

JenkinsJobs/Builds/build.jenkinsfile

Lines changed: 51 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ pipeline {
6161
assignEnvVariable('TEST_CONFIGURATIONS_EXPECTED', BUILD.tests.collect{ c ->
6262
"${TEST_NAME_PREFIX}-${c.os}-${c.arch}-java${c.javaVersion}_${c.os}.${c.ws}.${c.arch}_${c.javaVersion}"
6363
}.join(','))
64+
65+
utilities = load 'JenkinsJobs/shared/utilities.groovy'
6466
}
6567
dir("${CJE_ROOT}") {
6668
sh '''#!/bin/bash -xe
@@ -73,6 +75,7 @@ pipeline {
7375
exportPropertiesAsEnvironmentVariables("${CJE_ROOT}/buildproperties.properties", [
7476
'BUILD_ID',
7577
'STREAM', 'RELEASE_VER',
78+
'PREVIOUS_RELEASE_ID', 'PREVIOUS_RELEASE_VER',
7679
])
7780
}
7881
}
@@ -191,14 +194,21 @@ pipeline {
191194
}
192195
}
193196
}
194-
stage('Create Base builder'){
195-
steps {
196-
dir("${CJE_ROOT}/mbscripts") {
197-
sshagent(['projects-storage.eclipse.org-bot-ssh']) {
198-
sh '''#!/bin/bash -xe
199-
./mb020_createBaseBuilder.sh $CJE_ROOT/buildproperties.shsource 2>&1
200-
'''
201-
}
197+
stage('Create base builder'){
198+
steps {
199+
script{
200+
def eclipsePlatformLatestRelease = "https://download.eclipse.org/eclipse/downloads/drops4/${PREVIOUS_RELEASE_ID}/eclipse-platform-${PREVIOUS_RELEASE_VER}-linux-gtk-x86_64.tar.gz"
201+
def exe = utilities.installDownloadableTool('eclipse', eclipsePlatformLatestRelease) + '/eclipse'
202+
assignEnvVariable('BASE_BUILDER_ECLIPSE_EXE', "${exe} -nosplash --launcher.suppressErrors")
203+
sh '''
204+
source $CJE_ROOT/buildproperties.shsource
205+
$BASE_BUILDER_ECLIPSE_EXE \
206+
-debug -consolelog -data $CJE_ROOT/$TMP_DIR/workspace-toolsinstall \
207+
-application org.eclipse.equinox.p2.director \
208+
-repository ${ECLIPSE_RUN_REPO},${BUILDTOOLS_REPO},https://download.eclipse.org/cbi/updates/p2-analyzers/products/nightly/latest \
209+
-installIU org.eclipse.pde.api.tools,org.eclipse.releng.build.tools.feature.feature.group,org.eclipse.cbi.p2repo.analyzers \
210+
-profile SDKProfile
211+
'''
202212
}
203213
}
204214
}
@@ -252,7 +262,7 @@ pipeline {
252262
cp ${logDir}/mb220_buildSdkPatch.sh.log $CJE_ROOT/$DROP_DIR/$BUILD_ID/buildlogs/mb060_run-maven-build_output.txt
253263

254264
pushd $CJE_ROOT/$DROP_DIR/$BUILD_ID
255-
java -jar $LAUNCHER_JAR \
265+
$BASE_BUILDER_ECLIPSE_EXE \
256266
-application org.eclipse.ant.core.antRunner \
257267
-buildfile $ECLIPSE_BUILDER_DIR/eclipse/buildScripts/eclipse_compare.xml \
258268
-data $CJE_ROOT/$TMP_DIR/workspace-comparatorLogs \
@@ -297,21 +307,39 @@ pipeline {
297307
}
298308
stage('Generate Repo reports') {
299309
steps {
300-
dir("${CJE_ROOT}/mbscripts") {
301-
sh '''#!/bin/bash -xe
302-
./mb500_createRepoReports.sh $CJE_ROOT/buildproperties.shsource 2>&1
303-
'''
304-
}
310+
sh '''#!/bin/bash -xe
311+
source $CJE_ROOT/buildproperties.shsource
312+
$BASE_BUILDER_ECLIPSE_EXE \
313+
-application org.eclipse.cbi.p2repo.analyzers.repoReport \
314+
-data $CJE_ROOT/$TMP_DIR/workspace-report -vmargs -Xmx1g \
315+
-DreferenceRepo=$CJE_ROOT/$TMP_DIR/$BUILD_TO_COMPARE_SITE/$PREVIOUS_RELEASE_VER/$BASEBUILD_ID \
316+
-DreportRepoDir=${PLATFORM_REPO_DIR} \
317+
-DreportOutputDir=${CJE_ROOT}/${DROP_DIR}/${BUILD_ID}/buildlogs
318+
'''
305319
}
306320
}
307321
stage('Generate API tools reports') {
308322
steps {
309-
dir("${CJE_ROOT}/mbscripts") {
310-
sh '''#!/bin/bash -xe
311-
./mb510_createApiToolsReports.sh $CJE_ROOT/buildproperties.shsource 2>&1
312-
rm -rf $CJE_ROOT/$DROP_DIR/$BUILD_ID/apitoolingreference
313-
'''
314-
}
323+
sh '''#!/bin/bash -xe
324+
source $CJE_ROOT/buildproperties.shsource
325+
pushd $CJE_ROOT/$DROP_DIR/$BUILD_ID
326+
$BASE_BUILDER_ECLIPSE_EXE \
327+
-application org.eclipse.ant.core.antRunner \
328+
-buildfile $ECLIPSE_BUILDER_DIR/eclipse/buildScripts/api-tools-builder.xml \
329+
-data $CJE_ROOT/$TMP_DIR/workspace-apitoolingsLogs \
330+
-DEBuilderDir=$ECLIPSE_BUILDER_DIR \
331+
-DbuildDirectory=$CJE_ROOT/$DROP_DIR/$BUILD_ID \
332+
-DbuildId=$BUILD_ID \
333+
-DbuildLabel=$BUILD_ID \
334+
-DbuildWorkingArea=$CJE_ROOT/$AGG_DIR \
335+
-DpreviousBaseURL=https://$DOWNLOAD_HOST/eclipse/downloads/drops4/$PREVIOUS_RELEASE_ID/eclipse-SDK-$PREVIOUS_RELEASE_VER-win32-x86_64.zip \
336+
-DpreviousBaselineName=Eclipse-SDK-$PREVIOUS_RELEASE_VER \
337+
-DpreviousBaselineFilename=eclipse-SDK-$PREVIOUS_RELEASE_VER-win32-x86_64.zip \
338+
-Djava.io.tmpdir=$CJE_ROOT/$TMP_DIR \
339+
apiToolsReports
340+
popd
341+
rm -rf $CJE_ROOT/$DROP_DIR/$BUILD_ID/apitoolingreference
342+
'''
315343
}
316344
}
317345
stage('Promote Eclipse platform') {
@@ -481,6 +509,9 @@ pipeline {
481509
}
482510
}
483511

512+
@groovy.transform.Field
513+
def utilities = null
514+
484515
@NonCPS
485516
def assignEnvVariable(String name, String value) {
486517
env[name] = value

cje-production/buildproperties.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,4 @@ BASEBUILD_ID="I20251126-2330"
4040
PREVIOUS_RELEASE_ID="S-4.38RC2-202511262330"
4141

4242
BUILDTOOLS_REPO="https://download.eclipse.org/eclipse/updates/buildtools/snapshots"
43-
WEBTOOLS_REPO="https://download.eclipse.org/webtools/downloads/drops/R3.37.0/R-3.37.0-20250303081219/repositoryunittests/"
44-
BASEBUILDER_DIR="tmp/org.eclipse.releng.basebuilder"
4543
ECLIPSE_RUN_REPO="https://download.eclipse.org/eclipse/updates/4.39-I-builds/"

cje-production/mbscripts/mb020_createBaseBuilder.sh

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

cje-production/mbscripts/mb300_gatherEclipseParts.sh

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ source $1
2424

2525
mkdir -p $CJE_ROOT/$DROP_DIR/$BUILD_ID/testresults/consolelogs
2626

27-
JavaCMD=${JAVA_HOME}/bin/java
28-
2927
# gather repo
3028
REPO_ZIP=$PLATFORM_TARGET_DIR/eclipse.platform.repository-${STREAMMajor}.${STREAMMinor}.${STREAMService}-SNAPSHOT.zip
3129

@@ -94,7 +92,7 @@ fi
9492
ANT_SCRIPT=$ECLIPSE_BUILDER_DIR/repos/platformrepo.xml
9593
if [ -d $PLATFORM_REPO_DIR ]; then
9694
pushd $PLATFORM_REPO_DIR
97-
java -jar $LAUNCHER_JAR \
95+
$BASE_BUILDER_ECLIPSE_EXE \
9896
-application org.eclipse.ant.core.antRunner \
9997
-buildfile $ANT_SCRIPT \
10098
-data $CJE_ROOT/$TMP_DIR/workspace-buildrepos \
@@ -158,7 +156,7 @@ fi
158156
# verify compilelog
159157
pushd $CJE_ROOT/$DROP_DIR/$BUILD_ID
160158
ANT_SCRIPT=$ECLIPSE_BUILDER_DIR/eclipse/helper.xml
161-
$JavaCMD -jar $LAUNCHER_JAR \
159+
$BASE_BUILDER_ECLIPSE_EXE \
162160
-application org.eclipse.ant.core.antRunner \
163161
-buildfile $ANT_SCRIPT \
164162
-data $CJE_ROOT/$TMP_DIR/workspace-verifyCompile \
@@ -185,7 +183,7 @@ fi
185183
# publish Eclipse
186184
pushd $CJE_ROOT
187185
ANT_SCRIPT=$ECLIPSE_BUILDER_DIR/eclipse/helper.xml
188-
$JavaCMD -jar $LAUNCHER_JAR \
186+
$BASE_BUILDER_ECLIPSE_EXE \
189187
-application org.eclipse.ant.core.antRunner \
190188
-buildfile $ANT_SCRIPT \
191189
-data $CJE_ROOT/$TMP_DIR/workspace-publish \
@@ -199,7 +197,6 @@ $JavaCMD -jar $LAUNCHER_JAR \
199197
-DbuildType=$BUILD_TYPE \
200198
-DpublishingContent=$ECLIPSE_BUILDER_DIR/eclipse/publishingFiles \
201199
-DindexFileName=index.php \
202-
-Dbase.builder=$CJE_ROOT/$BASEBUILDER_DIR \
203200
-Djava.io.tmpdir=$CJE_ROOT/$TMP_DIR \
204201
-v \
205202
publish

cje-production/mbscripts/mb310_gatherEquinoxParts.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ fi
6969
pushd $CJE_ROOT
7070
mkdir -p $ECLIPSE_BUILDER_DIR/equinox/$TMP_DIR
7171
ANT_SCRIPT=$ECLIPSE_BUILDER_DIR/equinox/helper.xml
72-
${JAVA_HOME}/bin/java -jar $LAUNCHER_JAR \
72+
$BASE_BUILDER_ECLIPSE_EXE \
7373
-application org.eclipse.ant.core.antRunner \
7474
-buildfile $ANT_SCRIPT \
7575
-data $CJE_ROOT/$TMP_DIR/workspace-publishEquinox \
@@ -84,7 +84,6 @@ ${JAVA_HOME}/bin/java -jar $LAUNCHER_JAR \
8484
-DeqpublishingContent=$ECLIPSE_BUILDER_DIR/equinox/publishingFiles \
8585
-DindexFileName=index.php \
8686
-Dequinox.build.configs=$ECLIPSE_BUILDER_DIR/equinox/buildConfigs \
87-
-Dbase.builder=$CJE_ROOT/$BASEBUILDER_DIR \
8887
-Djava.io.tmpdir=$CJE_ROOT/$TMP_DIR \
8988
-v \
9089
publish

cje-production/mbscripts/mb500_createRepoReports.sh

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

cje-production/mbscripts/mb510_createApiToolsReports.sh

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

0 commit comments

Comments
 (0)