50 lines
1.7 KiB
Plaintext
50 lines
1.7 KiB
Plaintext
pipeline {
|
|
agent {
|
|
dockerfile {
|
|
dir 'lab6'
|
|
}
|
|
}
|
|
parameters {
|
|
string(
|
|
defaultValue: '100',
|
|
description: 'Example training parameter',
|
|
name: 'EPOCHS_NUM'
|
|
)
|
|
}
|
|
stages {
|
|
stage('Stage 1') {
|
|
steps {
|
|
sh 'chmod u+x ./lab6/simple_regression.py'
|
|
echo 'Copying datasets from create-dataset...'
|
|
copyArtifacts filter: '*', projectName: 's449288-create-dataset'
|
|
echo 'Datasets copied'
|
|
echo 'Conducting simple regression model test'
|
|
sh 'python3 lab6/simple_regression.py $EPOCHS_NUM'
|
|
echo 'Model and predictions saved'
|
|
sh 'head lab6/lego_reg_results.csv'
|
|
sh 'ls -lh lab6/lego_reg_model'
|
|
echo 'Archiving model...'
|
|
sh 'tar -czf lab6/lego_reg_model.tar.gz lab6/lego_reg_model/'
|
|
archiveArtifacts 'lab6/lego_reg_model.tar.gz'
|
|
echo 'Model archived'
|
|
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'
|
|
}
|
|
}
|
|
}
|