Use readfile to read the job report.
This commit is contained in:
parent
b45efcb2a5
commit
31c46b8fbd
|
@ -74,10 +74,6 @@ def jobs = [:]
|
|||
if (resume_from) {
|
||||
def previous_report_file = "${agent_root_folder}/build_jobs.${resume_from}.csv"
|
||||
echo "Previous report file: ${previous_report_file}"
|
||||
def lines = new File("${agent_root_folder}/build_jobs.${resume_from}.csv").readLines()
|
||||
lines.each { String line ->
|
||||
println line
|
||||
}
|
||||
jobs = parseJobs(previous_report_file)
|
||||
if (verbose) {
|
||||
for (job in jobs)
|
||||
|
@ -163,7 +159,7 @@ pipeline {
|
|||
echo -e "GroupID,ArtifactID,Version,SCM URL,Build Number,Distribution URL,Filename,Packaging" >> ${AGENT_ROOT_FOLDER}/build_commits.csv
|
||||
|
||||
#job report
|
||||
cat ${PREVIOUS_JOB_REPORT} || echo "${previous_report_file} not available"
|
||||
cat ${PREVIOUS_JOB_REPORT} || echo "${PREVIOUS_JOB_REPORT} not available"
|
||||
ls -lrt ${AGENT_ROOT_FOLDER}/
|
||||
echo "#Build ${PIPELINE_BUILD_NUMBER}" > ${JOB_REPORT}
|
||||
echo "#StartTime ${date}" >> ${JOB_REPORT}
|
||||
|
@ -275,7 +271,9 @@ def buildComponents(args, maven_settings_file, maven_local_repo_path, jobs) {
|
|||
def parseJobs(job_file) {
|
||||
def jobs = [:]
|
||||
try {
|
||||
new File(job_file).splitEachLine(',') { columns ->
|
||||
def content = readFile file:job_file
|
||||
println content
|
||||
content.splitEachLine(',') { columns ->
|
||||
if (columns[0].startsWith('#') || columns[0].startsWith('JobName'))
|
||||
return
|
||||
jobs["${columns[0]}"] = columns[1]
|
||||
|
|
Loading…
Reference in New Issue