Skip to content

Commit e1384a2

Browse files
committed
[I-Build-Tests] Merge multiple definitions into one per OS
1 parent 13381e2 commit e1384a2

File tree

7 files changed

+24
-443
lines changed

7 files changed

+24
-443
lines changed

JenkinsJobs/AutomatedTests/I_unit_cen64_gtk3_java21.groovy renamed to JenkinsJobs/AutomatedTests/I_unit_cen64_gtk3.groovy

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
def config = new groovy.json.JsonSlurper().parseText(readFileFromWorkspace('JenkinsJobs/JobDSL.json'))
22
def STREAMS = config.Streams
3+
def JAVA_VERSIONS = ['17', '21', '23']
34

45
for (STREAM in STREAMS){
5-
def MAJOR = STREAM.split('\\.')[0]
6-
def MINOR = STREAM.split('\\.')[1]
6+
for (JAVA_VERSION in JAVA_VERSIONS){
7+
def (MAJOR, MINOR) = STREAM.split('\\.')
78

8-
pipelineJob('AutomatedTests/ep' + MAJOR + MINOR + 'I-unit-cen64-gtk3-java21'){
9+
pipelineJob('AutomatedTests/ep' + MAJOR + MINOR + 'I-unit-cen64-gtk3-java' + JAVA_VERSION){
910
description('Run Eclipse SDK Tests for the platform implied by this job\'s name')
1011
parameters { // Define parameters in job configuration to make them available from the very first build onwards
1112
stringParam('buildId', null, 'Build Id to test (such as I20240611-1800, N20120716-0800).')
@@ -23,7 +24,7 @@ pipeline {
2324
}
2425
agent {
2526
kubernetes {
26-
label 'centos-unitpod21'
27+
label 'centos-unitpod&&JAVA_VERSION&&'
2728
defaultContainer 'custom'
2829
yaml """
2930
apiVersion: v1
@@ -83,7 +84,7 @@ spec:
8384
stage('Run tests'){
8485
environment {
8586
// 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
86-
JAVA_HOME = tool(type:'jdk', name:'openjdk-jdk21-latest')
87+
JAVA_HOME = tool(type:'jdk', name:'openjdk-jdk&&JAVA_VERSION&&-latest')
8788
ANT_HOME = tool(type:'ant', name:'apache-ant-latest')
8889
PATH = "${JAVA_HOME}/bin:${ANT_HOME}/bin:${PATH}"
8990
}
@@ -153,8 +154,9 @@ spec:
153154
}
154155
}
155156
}
156-
''')
157+
'''.replace('&&JAVA_VERSION&&', JAVA_VERSION))
157158
}
158159
}
159160
}
160161
}
162+
}

JenkinsJobs/AutomatedTests/I_unit_cen64_gtk3_java17.groovy

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

JenkinsJobs/AutomatedTests/I_unit_cen64_gtk3_java23.groovy

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

0 commit comments

Comments
 (0)