Calculate previous job number.
This commit is contained in:
parent
517153a3ae
commit
68826de759
|
@ -70,12 +70,12 @@ if (verbose) {
|
||||||
jsonConfig.gCube_release.Components.each { println it.key }
|
jsonConfig.gCube_release.Components.each { println it.key }
|
||||||
}
|
}
|
||||||
|
|
||||||
def jobs = parseJobs("${agent_root_folder}/build_jobs.${env.BUILD_NUMBER -1}.csv")
|
def report_number = env.BUILD_NUMBER -1
|
||||||
|
def jobs = parseJobs("${agent_root_folder}/build_jobs.${report_number}.csv")
|
||||||
for (job in jobs) {
|
for (job in jobs) {
|
||||||
println "$job"
|
println "$job"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
|
|
||||||
// see https://jenkins.io/doc/book/pipeline/syntax/#agent
|
// see https://jenkins.io/doc/book/pipeline/syntax/#agent
|
||||||
|
@ -250,10 +250,12 @@ def buildComponents(args, maven_settings_file, maven_local_repo_path) {
|
||||||
@NonCPS
|
@NonCPS
|
||||||
def parseJobs(job_file) {
|
def parseJobs(job_file) {
|
||||||
def jobs = [:]
|
def jobs = [:]
|
||||||
|
try {
|
||||||
new File(job_file).splitEachLine(',') { columns ->
|
new File(job_file).splitEachLine(',') { columns ->
|
||||||
if (columns[0].startsWith('#') || columns[0].startsWith('GroupID'))
|
if (columns[0].startsWith('#') || columns[0].startsWith('GroupID'))
|
||||||
return
|
return
|
||||||
jobs["${columns[0]}"] = columns[1]
|
jobs["${columns[0]}"] = columns[1]
|
||||||
}
|
}
|
||||||
|
} catch() {println "Previous job report not available"}
|
||||||
jobs;
|
jobs;
|
||||||
}
|
}
|
Loading…
Reference in New Issue