Use groovy var to read the file.

This commit is contained in:
Manuele Simi 2019-12-11 23:24:19 -05:00
parent 676d975fa7
commit 90c536315e
1 changed files with 1 additions and 3 deletions

4
Jenkinsfile vendored
View File

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