diff --git a/Jenkinsfile b/Jenkinsfile index accc679..1564237 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -76,7 +76,7 @@ stage('Execute Reporting Script') { steps { - sh 'python slo-report-monthly.py' + sh 'python createReport.py' print env.FROMDATE //Only required once CN is not reachable from EMEA //loopEnvironments(environments) @@ -91,7 +91,7 @@ body: 'Please find the output of your reports attached', to: 'rene.forstner@nttdata.com', replyTo: 'coco-apm@bmw.de', - attachmentsPattern: '*.csv' + attachmentsPattern: '*.xlsx' } catch ( mailExc ){ diff --git a/createReport.py b/createReport.py index d278c6d..2a4e3cc 100644 --- a/createReport.py +++ b/createReport.py @@ -39,7 +39,7 @@ def GatherReportingInfo(DTAPIToken, DTENV,friendlyName): days = (date_to - date_from).days print (str(days) + " days within reproting period") - + writer = pd.ExcelWriter(friendlyName+'QM_.xlsx') while (date_report<=date_to): date_report_end = date_report + datetime.timedelta(hours=days*24) millisec_date_report = date_report.timestamp() * 1000 @@ -65,7 +65,7 @@ def GatherReportingInfo(DTAPIToken, DTENV,friendlyName): date_report = date_report + datetime.timedelta(hours=days*24) - + writer.save() with open('./environment.yaml') as file: