ium_s449288/lab6/Jenkinsfile_train

47 lines
1.6 KiB
Plaintext
Raw Normal View History

2022-04-24 15:07:23 +02:00
pipeline {
agent {
dockerfile true
}
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-04-24 16:04:46 +02:00
sh 'chmod u+x ./simple_regression.py'
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-04-24 18:03:25 +02:00
sh 'python3 simple_regression.py $EPOCHS_NUM'
2022-04-24 17:10:42 +02:00
echo 'Model and predictions saved'
sh 'head lego_reg_results.csv'
2022-04-24 17:15:16 +02:00
sh 'ls -lh lego_reg_model'
2022-04-24 17:28:49 +02:00
echo 'Archiving model...'
2022-04-24 17:34:59 +02:00
sh 'tar -czf lego_reg_model.tar.gz lego_reg_model/'
2022-04-24 17:28:49 +02:00
archiveArtifacts 'lego_reg_model.tar.gz'
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-04-24 15:07:23 +02:00
}