ium_s449288/lab6/Jenkinsfile_eval
Kacper Dudzic 789ecba3dc
Some checks failed
s449288-evaluation/pipeline/head There was a failure building this commit
s449288-training/pipeline/head There was a failure building this commit
Update 'lab6/Jenkinsfile_eval'
2022-04-25 22:55:09 +02:00

44 lines
1.8 KiB
Plaintext

pipeline {
agent {
dockerfile true
}
stages {
stage('Stage 1') {
steps {
sh 'chmod u+x ./evaluate.py'
echo 'Copying datasets from the create-dataset job...'
copyArtifacts filter: 'lego_sets_clean_test.csv', projectName: 's449288-create-dataset'
echo 'Datasets copied'
echo 'Copying model from the training job...'
copyArtifacts filter: 'lego_reg_model.tar.gz', projectName: 's449288-training/master/'
echo 'Model copied'
sh 'tar xvzf lego_reg_model.tar.gz'
echo 'Optional copying of the metrics file from previous build...'
copyArtifacts filter: 'eval_results.txt', projectName: 's449288-evaluation/master/', optional: 'True'
echo 'Metrics file copied if it did not exist'
echo 'Evaluating model...'
sh 'python3 evaluate.py'
echo 'Model evaluated. Metrics saved. Plot saved.'
sh 'head eval_results.txt'
sh 'file error_plot.jpg'
echo 'Archiving metrics file...'
archiveArtifacts 'eval_results.txt'
echo 'File archived'
}
}
}
post {
success {
emailext body: 'SUCCESS', subject: 's449288-evaluation build status', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
failure {
emailext body: 'FAILURE', subject: 's449288-evaluation build status', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
unstable {
emailext body: 'UNSTABLE', subject: 's449288-evaluation build status', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
changed {
emailext body: 'CHANGED', subject: 's449288-evaluation build status', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
}
}