Skip to content

Commit

Permalink
[I-Build-Tests] Merge multiple definitions into one per OS
Browse files Browse the repository at this point in the history
  • Loading branch information
HannesWell committed Oct 14, 2024
1 parent 11c5730 commit eee587c
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 443 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
def config = new groovy.json.JsonSlurper().parseText(readFileFromWorkspace('JenkinsJobs/JobDSL.json'))
def STREAMS = config.Streams
def JAVA_VERSIONS = ['17', '21', '23']

for (STREAM in STREAMS){
def MAJOR = STREAM.split('\\.')[0]
def MINOR = STREAM.split('\\.')[1]
for (JAVA_VERSION in JAVA_VERSIONS){
def (MAJOR, MINOR) = STREAM.split('\\.')

pipelineJob('AutomatedTests/ep' + MAJOR + MINOR + 'I-unit-cen64-gtk3-java21'){
pipelineJob('AutomatedTests/ep' + MAJOR + MINOR + 'I-unit-cen64-gtk3-java' + JAVA_VERSION){
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).')
Expand All @@ -23,7 +24,7 @@ pipeline {
}
agent {
kubernetes {
label 'centos-unitpod21'
label 'centos-unitpod&&JAVA_VERSION&&'
defaultContainer 'custom'
yaml """
apiVersion: v1
Expand Down Expand Up @@ -83,7 +84,7 @@ spec:
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
JAVA_HOME = tool(type:'jdk', name:'openjdk-jdk21-latest')
JAVA_HOME = tool(type:'jdk', name:'openjdk-jdk&&JAVA_VERSION&&-latest')
ANT_HOME = tool(type:'ant', name:'apache-ant-latest')
PATH = "${JAVA_HOME}/bin:${ANT_HOME}/bin:${PATH}"
}
Expand Down Expand Up @@ -153,8 +154,9 @@ spec:
}
}
}
''')
'''.replace('&&JAVA_VERSION&&', JAVA_VERSION))
}
}
}
}
}
160 changes: 0 additions & 160 deletions JenkinsJobs/AutomatedTests/I_unit_cen64_gtk3_java17.groovy

This file was deleted.

160 changes: 0 additions & 160 deletions JenkinsJobs/AutomatedTests/I_unit_cen64_gtk3_java23.groovy

This file was deleted.

Loading

0 comments on commit eee587c

Please sign in to comment.