From 9e16be7a3ee72d8289d156a6067df7e73dc2cd1a Mon Sep 17 00:00:00 2001 From: Wojciech Jarmosz Date: Sat, 15 May 2021 02:50:40 +0200 Subject: [PATCH] Mock fix --- Jenkinsfile_eval | 10 +++------- save_metrics.py | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Jenkinsfile_eval b/Jenkinsfile_eval index 311d4bf..f7b291f 100644 --- a/Jenkinsfile_eval +++ b/Jenkinsfile_eval @@ -21,17 +21,13 @@ pipeline { sh "python3 evaluation.py" } } - stage('Archive single metrics') { - steps{ - archiveArtifacts 'rmse.txt' - } - } - stage('Save metrics to bulk file & create chart') { + stage('Save metrics & create chart') { steps{ sh "python3 save_metrics.py ${env.BUILD_ID}" - archiveArtifacts 'bulk_metrics.txt' sh "python3 create_chart.py" archiveArtifacts 'chart.png' + archiveArtifacts 'bulk_metrics.txt' + archiveArtifacts 'rmse.txt' } } } diff --git a/save_metrics.py b/save_metrics.py index f2b994e..cc415a3 100644 --- a/save_metrics.py +++ b/save_metrics.py @@ -13,5 +13,5 @@ if os.path.exists("rmse.txt"): for line in file.readlines(): result = line - with open("bulk_metrics.txt", "w") as file: + with open("bulk_metrics.txt", "a") as file: file.write(build_no + " " + result)