Split lines before parsing.

This commit is contained in:
Manuele Simi 2019-12-11 23:45:24 -05:00
parent d300e57f52
commit 26de7d4e76
1 changed files with 1 additions and 11 deletions

12
Jenkinsfile vendored
View File

@ -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]