Skip to content

Commit

Permalink
[Build] Unify Y-build test job definitions into one file per OS
Browse files Browse the repository at this point in the history
  • Loading branch information
HannesWell committed Dec 4, 2024
1 parent f19c9f9 commit 2da2519
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 505 deletions.
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
def config = new groovy.json.JsonSlurper().parseText(readFileFromWorkspace('JenkinsJobs/JobDSL.json'))
def STREAMS = config.Streams

def BUILD_CONFIGURATIONS = [
[javaVersion: 17, javaDownload: 'https://download.java.net/java/GA/jdk17.0.2/dfd4a8d0985749f896bed50d7138ee7f/8/GPL/openjdk-17.0.2_linux-x64_bin.tar.gz' ],
[javaVersion: 21, javaDownload: 'https://download.java.net/java/GA/jdk21/fd2272bbf8e04c3dbaee13770090416c/35/GPL/openjdk-21_linux-x64_bin.tar.gz' ],
[javaVersion: 24, javaDownload: 'https://download.java.net/java/early_access/jdk24/18/GPL/openjdk-24-ea+18_linux-x64_bin.tar.gz' ]
]

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

pipelineJob('YPBuilds/ep' + MAJOR + MINOR + 'Y-unit-cen64-gtk3-java21'){
for (BUILD_CONFIG in BUILD_CONFIGURATIONS){

pipelineJob('YPBuilds/ep' + MAJOR + MINOR + 'Y-unit-cen64-gtk3-java' + BUILD_CONFIG.javaVersion){

logRotator {
numToKeep(5)
}

parameters {
stringParam('buildId', null, null)
stringParam('javaDownload', 'https://download.java.net/java/GA/jdk21/fd2272bbf8e04c3dbaee13770090416c/35/GPL/openjdk-21_linux-x64_bin.tar.gz', null)
stringParam('javaDownload', BUILD_CONFIG.javaDownload, null)
}

definition {
Expand All @@ -28,7 +35,7 @@ pipeline {
}
agent {
kubernetes {
label 'centos-unitpod21'
label 'centos-unitpod''' + BUILD_CONFIG.javaVersion + '''\'
defaultContainer 'custom'
yaml """
apiVersion: v1
Expand Down Expand Up @@ -89,7 +96,7 @@ spec:
steps {
container ('custom'){
wrap([$class: 'Xvnc', takeScreenshot: false, useXauthority: true]) {
withEnv(["JAVA_HOME_NEW=${ tool 'openjdk-jdk18-latest' }"]) {
withEnv(["JAVA_HOME_NEW=${ tool 'openjdk-jdk15-latest' }"]) {
withAnt(installation: 'apache-ant-latest') {
sh \'\'\'#!/bin/bash -x
Expand Down Expand Up @@ -166,3 +173,4 @@ spec:
}
}
}
}
168 changes: 0 additions & 168 deletions JenkinsJobs/YBuilds/Y_unit_cen64_gtk3_java17.groovy

This file was deleted.

168 changes: 0 additions & 168 deletions JenkinsJobs/YBuilds/Y_unit_cen64_gtk3_java24.groovy

This file was deleted.

Loading

0 comments on commit 2da2519

Please sign in to comment.