Skip to content

Commit 338dfb0

Browse files
committed
[Build] Unify declarations of list of executed I-/Y-build tests
This reduces the number of places to adapt in case the I-/Y-build test-configurations are changed and in general reduces the difference between I-builds and Y-builds. Furthermore it reduces duplication introduced to handle the small difference between I- and Y-builds. Part of #2625
1 parent 993f61c commit 338dfb0

File tree

5 files changed

+32
-296
lines changed

5 files changed

+32
-296
lines changed

JenkinsJobs/Builds/I_build.groovy

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
def config = new groovy.json.JsonSlurper().parseText(readFileFromWorkspace('JenkinsJobs/JobDSL.json'))
22
def STREAMS = config.Streams
33

4+
def TEST_CONFIGURATIONS = [
5+
[ os: 'linux' , ws: 'gtk' , arch: 'x86_64' , javaVersion: 21],
6+
[ os: 'linux' , ws: 'gtk' , arch: 'x86_64' , javaVersion: 23],
7+
[ os: 'macosx', ws: 'cocoa', arch: 'aarch64', javaVersion: 21],
8+
[ os: 'macosx', ws: 'cocoa', arch: 'x86_64' , javaVersion: 21],
9+
[ os: 'win32' , ws: 'win32', arch: 'x86_64' , javaVersion: 21],
10+
]
11+
412
for (STREAM in STREAMS){
513
def BRANCH = config.Branches[STREAM]
614
def MAJOR = STREAM.split('\\.')[0]
@@ -80,6 +88,9 @@ spec:
8088
MAVEN_OPTS = "-Xmx6G"
8189
CJE_ROOT = "${WORKSPACE}/eclipse.platform.releng.aggregator/eclipse.platform.releng.aggregator/cje-production"
8290
logDir = "$CJE_ROOT/buildlogs"
91+
TESTS_CONFIGURATIONS_EXPECTED = \'''' + TEST_CONFIGURATIONS.collect{c ->
92+
'ep' + MAJOR + MINOR + 'I-unit-' + c.os + '-' + c.arch + '-java' + c.javaVersion + '_' + c.os + '.' + c.ws + '.' + c.arch + '_' + c.javaVersion
93+
}.join(',') + ''''
8394
}
8495
stages {
8596
stage('Clean Workspace'){
@@ -358,11 +369,9 @@ spec:
358369
}
359370
stage('Trigger tests'){
360371
steps {
361-
build job: 'AutomatedTests/ep''' + MAJOR + MINOR + '''I-unit-linux-x86_64-java21', parameters: [string(name: 'buildId', value: "${env.BUILD_IID.trim()}")], wait: false
362-
build job: 'AutomatedTests/ep''' + MAJOR + MINOR + '''I-unit-linux-x86_64-java23', parameters: [string(name: 'buildId', value: "${env.BUILD_IID.trim()}")], wait: false
363-
build job: 'AutomatedTests/ep''' + MAJOR + MINOR + '''I-unit-macosx-aarch64-java21', parameters: [string(name: 'buildId', value: "${env.BUILD_IID.trim()}")], wait: false
364-
build job: 'AutomatedTests/ep''' + MAJOR + MINOR + '''I-unit-macosx-x86_64-java21', parameters: [string(name: 'buildId', value: "${env.BUILD_IID.trim()}")], wait: false
365-
build job: 'AutomatedTests/ep''' + MAJOR + MINOR + '''I-unit-win32-x86_64-java21', parameters: [string(name: 'buildId', value: "${env.BUILD_IID.trim()}")], wait: false
372+
''' + TEST_CONFIGURATIONS.collect{ c ->
373+
" build job: 'AutomatedTests/ep" + MAJOR + MINOR + 'I-unit-' + c.os + '-' + c.arch + '-' + 'java'+ c.javaVersion + '''', parameters: [string(name: 'buildId', value: "${env.BUILD_IID.trim()}")], wait: false'''
374+
}.join('\n') + '''
366375
build job: 'SmokeTests/Start-smoke-tests', parameters: [string(name: 'buildId', value: "${env.BUILD_IID.trim()}")], wait: false
367376
}
368377
}

JenkinsJobs/YBuilds/Y_build.groovy

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
def config = new groovy.json.JsonSlurper().parseText(readFileFromWorkspace('JenkinsJobs/JobDSL.json'))
22
def STREAMS = config.Streams
33

4+
def TEST_CONFIGURATIONS = [
5+
[ os: 'linux' , ws: 'gtk' , arch: 'x86_64' , javaVersion: 21],
6+
[ os: 'linux' , ws: 'gtk' , arch: 'x86_64' , javaVersion: 24],
7+
[ os: 'macosx', ws: 'cocoa', arch: 'aarch64', javaVersion: 21],
8+
[ os: 'macosx', ws: 'cocoa', arch: 'x86_64' , javaVersion: 21],
9+
]
10+
411
for (STREAM in STREAMS){
512
def BRANCH = config.Branches[STREAM]
613
def MAJOR = STREAM.split('\\.')[0]
@@ -77,6 +84,9 @@ spec:
7784
MAVEN_OPTS = "-Xmx6G"
7885
CJE_ROOT = "${WORKSPACE}/eclipse.platform.releng.aggregator/eclipse.platform.releng.aggregator/cje-production"
7986
logDir = "$CJE_ROOT/buildlogs"
87+
TESTS_CONFIGURATIONS_EXPECTED = \'''' + TEST_CONFIGURATIONS.collect{c ->
88+
'ep' + MAJOR + MINOR + 'Y-unit-' + c.os + '-' + c.arch + '-java' + c.javaVersion + '_' + c.os + '.' + c.ws + '.' + c.arch + '_' + c.javaVersion
89+
}.join(',') + ''''
8090
}
8191
8292
stages {
@@ -206,15 +216,6 @@ spec:
206216
}
207217
}
208218
}
209-
stage('Copy test configs for Y-build'){
210-
steps {
211-
sh \'\'\'
212-
cd ${WORKSPACE}/eclipse.platform.releng.aggregator/eclipse.platform.releng.aggregator/cje-production/Y-build
213-
cp publish.xml ${WORKSPACE}/eclipse.platform.releng.aggregator/eclipse.platform.releng.aggregator/cje-production/gitCache/eclipse.platform.releng.aggregator/eclipse.platform.releng.tychoeclipsebuilder/eclipse/buildScripts/.
214-
cp publish.xml ${WORKSPACE}/eclipse.platform.releng.aggregator/eclipse.platform.releng.aggregator/eclipse.platform.releng.tychoeclipsebuilder/eclipse/buildScripts/.
215-
\'\'\'
216-
}
217-
}
218219
stage('Aggregator maven build'){
219220
environment {
220221
KEYRING = credentials('secret-subkeys-releng.asc')
@@ -366,10 +367,9 @@ spec:
366367
}
367368
stage('Trigger tests'){
368369
steps {
369-
build job: 'YPBuilds/ep''' + MAJOR + MINOR + '''Y-unit-linux-x86_64-java21', parameters: [string(name: 'buildId', value: "${env.BUILD_IID.trim()}")], wait: false
370-
build job: 'YPBuilds/ep''' + MAJOR + MINOR + '''Y-unit-linux-x86_64-java24', parameters: [string(name: 'buildId', value: "${env.BUILD_IID.trim()}")], wait: false
371-
build job: 'YPBuilds/ep''' + MAJOR + MINOR + '''Y-unit-macosx-aarch64-java21', parameters: [string(name: 'buildId', value: "${env.BUILD_IID.trim()}")], wait: false
372-
build job: 'YPBuilds/ep''' + MAJOR + MINOR + '''Y-unit-macosx-x86_64-java21', parameters: [string(name: 'buildId', value: "${env.BUILD_IID.trim()}")], wait: false
370+
''' + TEST_CONFIGURATIONS.collect{ c ->
371+
" build job: 'YPBuilds/ep" + MAJOR + MINOR + 'Y-unit-' + c.os + '-' + c.arch + '-' + 'java'+ c.javaVersion + '''', parameters: [string(name: 'buildId', value: "${env.BUILD_IID.trim()}")], wait: false'''
372+
}.join('\n') + '''
373373
build job: 'SmokeTests/Start-smoke-tests', parameters: [string(name: 'buildId', value: "${env.BUILD_IID.trim()}")], wait: false
374374
}
375375
}

cje-production/Y-build/publish.xml

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

cje-production/mbscripts/mb010_createEnvfiles.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,4 @@ fn-addToPropFiles ECLIPSE_BUILDER_DIR "\"$CJE_ROOT/$AGG_DIR/eclipse.platform.rel
7878
fn-addToPropFiles PLATFORM_PRODUCTS_DIR "\"$CJE_ROOT/$AGG_DIR/eclipse.platform.releng.tychoeclipsebuilder/eclipse.platform.repository/target/products\""
7979
fn-addToPropFiles PLATFORM_REPO_DIR "\"$CJE_ROOT/$AGG_DIR/eclipse.platform.releng.tychoeclipsebuilder/eclipse.platform.repository/target/repository\""
8080
fn-addToPropFiles PLATFORM_TARGET_DIR "\"$CJE_ROOT/$AGG_DIR/eclipse.platform.releng.tychoeclipsebuilder/eclipse.platform.repository/target\""
81+
fn-addToPropFiles TESTS_CONFIGURATIONS_EXPECTED "\"${TESTS_CONFIGURATIONS_EXPECTED}\""

cje-production/scripts/publish.xml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -182,14 +182,7 @@
182182
substring="-perf-" />
183183
</condition>
184184
<!-- else normal unit tests configs -->
185-
<resources id="testsConfigExpected">
186-
<string>ep${eclipseStreamMajor}${eclipseStreamMinor}${buildType}-unit-macosx-x86_64-java21_macosx.cocoa.x86_64_21</string>
187-
<string>ep${eclipseStreamMajor}${eclipseStreamMinor}${buildType}-unit-macosx-aarch64-java21_macosx.cocoa.aarch64_21</string>
188-
<string>ep${eclipseStreamMajor}${eclipseStreamMinor}${buildType}-unit-win32-x86_64-java21_win32.win32.x86_64_21</string>
189-
<string>ep${eclipseStreamMajor}${eclipseStreamMinor}${buildType}-unit-linux-x86_64-java21_linux.gtk.x86_64_21</string>
190-
<string>ep${eclipseStreamMajor}${eclipseStreamMinor}${buildType}-unit-linux-x86_64-java23_linux.gtk.x86_64_23</string>
191-
</resources>
192-
<pathconvert property="testsConfigExpected" refid="testsConfigExpected" pathsep="," />
185+
<property name="testsConfigExpected" value="${env.TESTS_CONFIGURATIONS_EXPECTED}"/>
193186

194187
<condition
195188
property="expectedConfigFilename"
@@ -263,7 +256,9 @@
263256
</filterchain>
264257
</loadresource>
265258
<echo message="eclipseStreamService: ${eclipseStreamService}"/>
266-
259+
260+
<property environment="env" />
261+
267262
</target>
268263

269264
</project>

0 commit comments

Comments
 (0)