Split lines before parsing.
This commit is contained in:
parent
d300e57f52
commit
26de7d4e76
|
@ -74,16 +74,6 @@ def jobs = [:]
|
|||
def previous_report_content = ''
|
||||
def previous_report_file = "${agent_root_folder}/build_jobs.${resume_from}.csv"
|
||||
|
||||
/*if (resume_from) {
|
||||
echo "Previous report file: ${previous_report_file}"
|
||||
jobs = parseJobs(previous_report_file)
|
||||
if (verbose) {
|
||||
for (job in jobs)
|
||||
println job
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
pipeline {
|
||||
|
||||
// see https://jenkins.io/doc/book/pipeline/syntax/#agent
|
||||
|
@ -283,7 +273,7 @@ def buildComponents(args, maven_settings_file, maven_local_repo_path, jobs) {
|
|||
def parseJobs(content) {
|
||||
def jobs = [:]
|
||||
try {
|
||||
for (String line : content) {
|
||||
for (String line : content.split('\n') {
|
||||
if (!line.startsWith('#') && !line.startsWith('JobName')) {
|
||||
def columns = line.split(',')
|
||||
jobs["${columns[0]}"] = columns[1]
|
||||
|
|
Loading…
Reference in New Issue