ium_434788/Jenkinsfile_train

65 lines
1.8 KiB
Plaintext
Raw Normal View History

2021-05-13 19:18:15 +02:00
pipeline {
2021-05-15 20:16:39 +02:00
agent {docker { image 'snowycocoon/ium_434788:4'}}
2021-05-14 18:07:29 +02:00
parameters{
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts',
name: 'WHICH_BUILD'
)
string(
defaultValue: '16',
description: 'batch size',
name: 'BATCH_SIZE'
)
string(
defaultValue: '15',
description: 'epochs',
name: 'EPOCHS'
)
}
2021-05-13 19:18:15 +02:00
stages {
2021-05-14 18:07:29 +02:00
stage('copy artifacts')
{
steps
{
copyArtifacts(fingerprintArtifacts: true, projectName: 's434788-create-dataset', selector: buildParameter('WHICH_BUILD'))
}
}
stage('train')
{
steps
{
catchError {
2021-05-23 18:31:45 +02:00
sh 'python3.8 Zadanie_06_and_07_training.py ${BATCH_SIZE} ${EPOCHS}'
2021-05-14 18:07:29 +02:00
}
}
2021-05-13 19:18:15 +02:00
}
stage('Archive artifacts') {
steps{
2021-05-23 18:31:45 +02:00
archiveArtifacts 'wine_model.h5'
archiveArtifacts 'my_runs/**'
2021-05-13 19:18:15 +02:00
}
}
}
post {
success {
2021-05-23 18:34:12 +02:00
build job: 's434788-evaluation/master'
2021-05-13 19:18:15 +02:00
mail body: 'SUCCESS',
2021-05-14 20:14:31 +02:00
subject: 's434788 training',
2021-05-13 19:18:15 +02:00
to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
}
unstable {
2021-05-14 20:25:24 +02:00
mail body: 'UNSTABLE', subject: 's434788 training', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
2021-05-13 19:18:15 +02:00
}
failure {
2021-05-14 20:25:24 +02:00
mail body: 'FAILURE', subject: 's434788 training', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
2021-05-13 19:18:15 +02:00
}
changed {
2021-05-14 20:25:24 +02:00
mail body: 'CHANGED', subject: 's434788 training', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
2021-05-13 19:18:15 +02:00
}
}
}