ium_s449288/lab8/Jenkinsfile_train

50 lines
1.9 KiB
Plaintext
Raw Permalink Normal View History

2022-05-12 21:55:50 +02:00
pipeline {
agent {
2022-05-13 16:01:03 +02:00
docker {
2022-05-13 17:08:58 +02:00
image 's449288/ium:lab8.1'
2022-05-13 16:07:26 +02:00
args '-v /mlruns:/mlruns'
2022-05-12 21:55:50 +02:00
}
}
stages {
stage('Stage 1') {
steps {
2022-05-12 22:57:13 +02:00
sh 'cd lab8/'
2022-05-12 23:17:24 +02:00
sh 'chmod u+x simple_regression_lab8.py'
2022-05-12 21:55:50 +02:00
echo 'Copying datasets from create-dataset...'
copyArtifacts filter: '*', projectName: 's449288-create-dataset'
echo 'Datasets copied'
echo 'Conducting simple regression model test'
sh 'python3 simple_regression_lab8.py'
echo 'Model and predictions saved'
sh 'head lego_reg_results.csv'
echo 'Archiving model...'
sh 'ls -lh lego_reg_model'
sh 'tar -czf lego_reg_model.tar.gz lego_reg_model/'
archiveArtifacts 'lego_reg_model.tar.gz'
echo 'Model archived'
2022-05-13 14:46:06 +02:00
echo 'Archiving the MLflow repo...'
2022-05-13 15:02:15 +02:00
sh 'ls -lh mlruns'
sh 'tar -czf mlruns.tar.gz mlruns/'
archiveArtifacts 'mlruns.tar.gz'
2022-05-13 14:46:06 +02:00
echo 'MLflow repo archived'
2022-05-12 21:55:50 +02:00
echo 'Launching the s449288-evaluation job...'
build job: 's449288-evaluation/master/'
}
}
}
post {
success {
emailext body: 'SUCCESS', subject: 's449288-training build status', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
failure {
emailext body: 'FAILURE', subject: 's449288-training build status', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
unstable {
emailext body: 'UNSTABLE', subject: 's449288-training build status', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
changed {
emailext body: 'CHANGED', subject: 's449288-training build status', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
}
}