Skip to content

Commit 0bd5ecb

Browse files
committed
[I/Y-Build] Unify creation of job definitions and simplify schedule
1 parent 2eb07d5 commit 0bd5ecb

File tree

2 files changed

+11
-17
lines changed

2 files changed

+11
-17
lines changed

JenkinsJobs/buildConfigurations.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"I": {
33
"typeName": "Integration",
4+
"folder": "Builds",
45
"streams": {
56
"4.38": {
67
"branch": "master",
@@ -54,6 +55,7 @@
5455
},
5556
"Y": {
5657
"typeName": "Beta Java 25",
58+
"folder": "YBuilds",
5759
"streams": {
5860
"4.38": {
5961
"branch": "master",

JenkinsJobs/seedJob.jenkinsfile

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -38,23 +38,15 @@ pipeline {
3838
def buildJob = pipelineJobDefinitions.remove('Builds/build')
3939

4040
def buildConfigurations = readJSON(file: 'buildConfigurations.json')
41-
buildConfigurations.I.streams.each{ STREAM, config ->
42-
pipelineJobDefinitions["Builds/I-build-${STREAM}"] = [scriptPath: buildJob.scriptPath, branch: config.branch,
43-
description: 'Daily Eclipse Integration builds.', disabled: config.disabled, cronTrigger: config.schedule ? ('''\
44-
TZ=America/Toronto
45-
# Format: Minute Hour Day Month Day-of-week (1-7)
46-
# - - - Integration Eclipse SDK builds - - -
47-
# Schedule: 6 PM every day until end of RC2
48-
'''.stripIndent() + config.schedule).trim() : null]
49-
}
50-
buildConfigurations.Y.streams.each{ STREAM, config ->
51-
pipelineJobDefinitions["YBuilds/Y-build-${STREAM}"] = [scriptPath: buildJob.scriptPath, branch: config.branch,
52-
description: 'Beta Java Eclipse builds.', disabled: config.disabled, cronTrigger: config.schedule ? ('''\
53-
TZ=America/Toronto
54-
# Format: Minute Hour Day Month Day-of-week (1-7)
55-
# - - - Beta Java Eclipse SDK builds - - -
56-
# Schedule: 10 AM every second day (and every day in Java RC phase)
57-
'''.stripIndent() + config.schedule).trim() : null]
41+
buildConfigurations.each{ buildType, buildConfig ->
42+
buildConfig.streams.each{ STREAM, streamConfig ->
43+
def (MAJOR, MINOR) = STREAM.split('\\.')
44+
pipelineJobDefinitions["${buildConfig.folder}/${buildType}-build-${STREAM}"] = [scriptPath: buildJob.scriptPath, branch: streamConfig.branch,
45+
description: "Eclipse SDK ${buildConfig.typeName} builds", disabled: streamConfig.disabled, cronTrigger: '''\
46+
TZ=America/Toronto
47+
# Format: Minute Hour Day Month Day-of-week (1-7)
48+
'''.stripIndent() + streamConfig.schedule]
49+
}
5850
}
5951

6052
jobDsl(additionalParameters: [FOLDER_DEFINITIONS: folderDefinitions, PIPELINE_JOB_DEFINITIONS: pipelineJobDefinitions], sandbox: true, scriptText : '''\

0 commit comments

Comments
 (0)