From d32e34f06b67a6d5410c45cc4d580a931b5d130d Mon Sep 17 00:00:00 2001 From: Kacper Dudzic Date: Tue, 26 Apr 2022 22:34:19 +0200 Subject: [PATCH] Update 'lab6/Jenkinsfile_eval' --- lab6/Jenkinsfile_eval | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lab6/Jenkinsfile_eval b/lab6/Jenkinsfile_eval index e09c2d1..0986da6 100644 --- a/lab6/Jenkinsfile_eval +++ b/lab6/Jenkinsfile_eval @@ -9,11 +9,6 @@ pipeline { description: 'Which build to use for copying artifacts', name: 'BUILD_SELECTOR' ) - string( - defaultValue: 'none', - description: 'Last mean absolute error of the model', - name: 'LAST_MAE' - ) } stages { stage('Stage 1') { @@ -33,7 +28,6 @@ pipeline { echo 'Evaluating model...' sh 'python3 evaluate.py' echo 'Model evaluated. Metrics saved. Plot saved.' - sh 'LAST_MAE=$(tail -1 eval_results.txt)' sh 'head eval_results.txt' sh 'file error_plot.jpg' echo 'Archiving metrics file...' @@ -42,6 +36,12 @@ pipeline { } } } + script { + LAST_MAE = sh ( + script: 'tail -1 eval_results.txt', + returnStdout: true + ).trim() + } post { success { emailext body: 'SUCCESS - ${LAST_MAE} MAE', subject: 's449288-evaluation build status', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'