replaced Jenkinsfile
parent
f4e26acdab
commit
2c402d8d2b
|
|
@ -31,26 +31,26 @@ def reportRetryCount = 0
|
|||
|
||||
string(name: 'TODATE', defaultValue: '', description: 'Enter to date in format YYYY-MM-DD e.g. 2021-11-30')
|
||||
|
||||
string(name: 'PRESELECT', defaultValue: 'day', description: 'Enter week | month (without |) - auto selects the last full week or last full month')
|
||||
string(name: 'PRESELECT', defaultValue: 'week', description: 'Enter week | month (without |) - auto selects the last full week or last full month')
|
||||
|
||||
string(name: 'SLICES', defaultValue: 'dh', description: 'Enter h | d | t | y (without spaces or |) - writes the slices hourly, daily, total or year to date into ecxel. given in any order')
|
||||
string(name: 'SLICES', defaultValue: 'tdhy', description: 'Enter h | d | t | y (without spaces or |) - writes the slices hourly, daily, total or year to date into ecxel. given in any order')
|
||||
}
|
||||
|
||||
//here comes the trigger according to crontabs - jenkins is in UTC
|
||||
|
||||
triggers {
|
||||
//every 1st of every month at 00:00
|
||||
//cron('0 0 1 * *')
|
||||
// triggers {
|
||||
// //every 1st of every month at 00:00
|
||||
// //cron('0 0 1 * *')
|
||||
|
||||
//every day at 08:00
|
||||
//cron('0 8 * * *')
|
||||
// //every day at 08:00
|
||||
// //cron('0 8 * * *')
|
||||
|
||||
//every monday at 06:00
|
||||
cron('0 5 * * 0-7')
|
||||
// //every monday at 06:00
|
||||
cron('0 4 * * 1')
|
||||
|
||||
//parameterizedCron('0 10 * * * %PRESELECT=week;SLICES=tdhy')
|
||||
// //parameterizedCron('0 10 * * * %PRESELECT=week;SLICES=tdhy')
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
environment {
|
||||
//ProxySettings
|
||||
|
|
@ -123,14 +123,8 @@ def reportRetryCount = 0
|
|||
}
|
||||
else { SCRIPT_PARAMETER = SCRIPT_PARAMETER + " -p " + PRESELECT.toString()}
|
||||
|
||||
|
||||
|
||||
|
||||
echo "${SCRIPT_PARAMETER}"
|
||||
sh "python3 createReport.py ${SCRIPT_PARAMETER}"
|
||||
|
||||
sh "python3 summary.py"
|
||||
summary = readFile('summary.txt').trim()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -144,10 +138,8 @@ def reportRetryCount = 0
|
|||
steps {
|
||||
script {
|
||||
try {
|
||||
tmp_body = "Please find the output of the daily QM-Report attached </br></br>${summary}"
|
||||
emailext subject: env.JOB_NAME,
|
||||
mimeType: 'text/html',
|
||||
body: tmp_body,
|
||||
body: 'Please find the output of the weekly QM-Report attached',
|
||||
//to: 'michaela.jaeger@bmw.de, OOC-Support@bmwgroup.com, Andreas.DA.Danzer@partner.bmw.de',
|
||||
//to: 'rene.forstner@nttdata.com, Andreas.DA.Danzer@partner.bmw.de, linnea.bickeboeller@partner.bmwgroup.com',
|
||||
//to: 'rene.forstner@nttdata.com, stephan.oertelt@bmw.de, Mohammed.Abadel@bmw.de, michaela.jaeger@bmw.de',
|
||||
|
|
@ -155,7 +147,7 @@ def reportRetryCount = 0
|
|||
//to: 'patryk.gudalewicz.bp@nttdata.com',
|
||||
//to: 'rene.forstner@nttdata.com, ermis.wieger@nttdata.com, arnel.arnautovic@nttdata.com, patryk.gudalewicz.bp@nttdata.com, stephan.oertelt@bmw.de, Mohammed.Abadel@bmw.de, michaela.jaeger@bmw.de, OOC-Support@bmwgroup.com, Andreas.DB.Danzer@bmwgroup.com',
|
||||
to: 'Arnel.Arnautovic@nttdata.com',
|
||||
replyTo: 'coco-apm@bmw.de',
|
||||
replyTo: 'coco-apm@bmw.de',
|
||||
attachmentsPattern: '*.xlsx'
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue