test - csv
parent
5a7543465d
commit
b6320b8417
|
|
@ -18,6 +18,7 @@ pipeline {
|
||||||
string(name: 'PRESELECT', defaultValue: 'week', description: 'Enter day | week | month (without |) - auto selects the last full day, week or month')
|
string(name: 'PRESELECT', defaultValue: 'week', description: 'Enter day | week | month (without |) - auto selects the last full day, week or month')
|
||||||
string(name: 'SLICES', defaultValue: 'dt', description: 'Enter h | d | t | y (without spaces or |) - writes the slices hourly, daily, total or year to date into excel given in any order')
|
string(name: 'SLICES', defaultValue: 'dt', description: 'Enter h | d | t | y (without spaces or |) - writes the slices hourly, daily, total or year to date into excel given in any order')
|
||||||
string(name: 'KPI_EXTENSION', defaultValue: 'true', description: 'Enter true or false if the extension should be executed')
|
string(name: 'KPI_EXTENSION', defaultValue: 'true', description: 'Enter true or false if the extension should be executed')
|
||||||
|
string(name: 'FORMATS', defaultValue: 'xc', description: 'Enter x | c (without spaces or |) - creates xlsx (x) and/or CSV (c) file - the csv file will include a reduced list (depending on target report)')
|
||||||
}
|
}
|
||||||
|
|
||||||
// here comes the trigger according to crontabs - jenkins is in UTC
|
// here comes the trigger according to crontabs - jenkins is in UTC
|
||||||
|
|
@ -136,6 +137,14 @@ pipeline {
|
||||||
SCRIPT_PARAMETER = SCRIPT_PARAMETER + " -p " + PRESELECT.toString()
|
SCRIPT_PARAMETER = SCRIPT_PARAMETER + " -p " + PRESELECT.toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (FORMATS.isEmpty()) {
|
||||||
|
currentBuild.result = 'ABORTED'
|
||||||
|
error('Aborting due to missing report format parameter')
|
||||||
|
return
|
||||||
|
} else {
|
||||||
|
SCRIPT_PARAMETER = SCRIPT_PARAMETER + " -o " + FORMATS.toString()
|
||||||
|
}
|
||||||
|
|
||||||
echo "${SCRIPT_PARAMETER}"
|
echo "${SCRIPT_PARAMETER}"
|
||||||
sh "python3.8 createReport.py ${SCRIPT_PARAMETER}"
|
sh "python3.8 createReport.py ${SCRIPT_PARAMETER}"
|
||||||
sh "python3.8 summary.py"
|
sh "python3.8 summary.py"
|
||||||
|
|
@ -160,14 +169,14 @@ pipeline {
|
||||||
script {
|
script {
|
||||||
dir("/opt/workspace/qm_report/") {
|
dir("/opt/workspace/qm_report/") {
|
||||||
try {
|
try {
|
||||||
emailext subject: "NEW ${env.JOB_NAME}",
|
emailext subject: "THE OFFICIAL ${env.JOB_NAME}",
|
||||||
mimeType: 'text/html',
|
mimeType: 'text/html',
|
||||||
body: "Please find the output of the daily QM-Report attached </br></br>${summary}",
|
body: "Please find the output of the daily QM-Report attached </br></br>${summary}",
|
||||||
to: 'ermis.wieger@nttdata.com, Andreas.DB.Danzer@bmwgroup.com, OOC-Support@bmwgroup.com, michaela.jaeger@bmw.de, thilo.bindel@bmwgroup.com, Mohammed.Abadel@bmw.de, jan.sc.schaefer@bmw.de, ops-xibix@list.bmw.com, omo-xibix@list.bmw.com',
|
// to: 'ermis.wieger@nttdata.com, Andreas.DB.Danzer@bmwgroup.com, OOC-Support@bmwgroup.com, michaela.jaeger@bmw.de, thilo.bindel@bmwgroup.com, Mohammed.Abadel@bmw.de, jan.sc.schaefer@bmw.de, ops-xibix@list.bmw.com, omo-xibix@list.bmw.com',
|
||||||
// test:
|
// test:
|
||||||
// to: 'Daniel.Mikula@nttdata.com, Arnel.Arnautovic@nttdata.com',
|
to: 'Daniel.Mikula@nttdata.com, Arnel.Arnautovic@nttdata.com',
|
||||||
replyTo: 'coco-apm@bmw.de',
|
replyTo: 'coco-apm@bmw.de',
|
||||||
attachmentsPattern: '*.xlsx'
|
attachmentsPattern: '*.xlsx, *.csv'
|
||||||
} catch ( mailExc ) {
|
} catch ( mailExc ) {
|
||||||
echo "Sending Email Failed: ${mailExc}"
|
echo "Sending Email Failed: ${mailExc}"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue