Use groovy var to read the file.
This commit is contained in:
parent
676d975fa7
commit
90c536315e
|
@ -139,7 +139,7 @@ pipeline {
|
|||
steps {
|
||||
script {
|
||||
sh 'cat ${PREVIOUS_JOB_REPORT}'
|
||||
content = readFile ${PREVIOUS_JOB_REPORT}
|
||||
content = readFile ${previous_report_file}
|
||||
println "CONTENT ${content}"
|
||||
content.splitEachLine(',') { columns ->
|
||||
if (columns[0].startsWith('#') || columns[0].startsWith('JobName'))
|
||||
|
@ -177,8 +177,6 @@ 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_JOB_REPORT} not available"
|
||||
ls -lrt ${AGENT_ROOT_FOLDER}/
|
||||
echo "#Build ${PIPELINE_BUILD_NUMBER}" > ${JOB_REPORT}
|
||||
echo "#StartTime ${date}" >> ${JOB_REPORT}
|
||||
echo -e "JobName,Status" >> ${JOB_REPORT}
|
||||
|
|
Loading…
Reference in New Issue