ium_s449288/lab6/Jenkinsfile_train

50 lines
1.7 KiB
Plaintext
Raw Normal View History

2022-04-24 15:07:23 +02:00
pipeline {
agent {
2022-05-05 21:03:48 +02:00
dockerfile {
dir 'lab6'
}
2022-04-24 15:07:23 +02:00
}
2022-04-24 18:03:25 +02:00
parameters {
string(
defaultValue: '100',
description: 'Example training parameter',
name: 'EPOCHS_NUM'
)
}
2022-04-24 15:07:23 +02:00
stages {
stage('Stage 1') {
steps {
2022-05-12 22:30:38 +02:00
sh 'chmod u+x ./lab6/simple_regression.py'
2022-04-24 16:04:46 +02:00
echo 'Copying datasets from create-dataset...'
2022-04-25 22:19:16 +02:00
copyArtifacts filter: '*', projectName: 's449288-create-dataset'
2022-04-24 16:04:46 +02:00
echo 'Datasets copied'
2022-04-24 15:07:23 +02:00
echo 'Conducting simple regression model test'
2022-05-12 22:30:38 +02:00
sh 'python3 lab6/simple_regression.py $EPOCHS_NUM'
2022-04-24 17:10:42 +02:00
echo 'Model and predictions saved'
2022-05-12 22:30:38 +02:00
sh 'head lab6/lego_reg_results.csv'
sh 'ls -lh lab6/lego_reg_model'
2022-04-24 17:28:49 +02:00
echo 'Archiving model...'
2022-05-12 22:30:38 +02:00
sh 'tar -czf lab6/lego_reg_model.tar.gz lab6/lego_reg_model/'
archiveArtifacts 'lab6/lego_reg_model.tar.gz'
2022-04-24 17:28:49 +02:00
echo 'Model archived'
2022-04-25 22:07:19 +02:00
echo 'Launching the s449288-evaluation job...'
2022-04-25 23:00:10 +02:00
build job: 's449288-evaluation/master/'
2022-04-24 15:07:23 +02:00
}
}
2022-04-24 17:51:33 +02:00
}
post {
success {
2022-04-24 17:56:19 +02:00
emailext body: 'SUCCESS', subject: 's449288-training build status', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
2022-04-24 17:51:33 +02:00
}
failure {
2022-04-24 17:56:19 +02:00
emailext body: 'FAILURE', subject: 's449288-training build status', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
2022-04-24 17:51:33 +02:00
}
unstable {
2022-04-24 17:56:19 +02:00
emailext body: 'UNSTABLE', subject: 's449288-training build status', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
2022-04-24 17:51:33 +02:00
}
changed {
2022-04-24 17:56:19 +02:00
emailext body: 'CHANGED', subject: 's449288-training build status', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
2022-04-24 15:07:23 +02:00
}
2022-04-24 17:51:33 +02:00
}
2022-05-12 22:30:38 +02:00
}