ium_444421/training.Jenkinsfile

54 lines
1.9 KiB
Plaintext
Raw Normal View History

2022-04-29 19:17:50 +02:00
pipeline {
agent {
dockerfile true
}
2022-04-29 21:08:42 +02:00
options {
copyArtifactPermission('s444421-evaluation');
}
2022-04-29 19:17:50 +02:00
parameters {
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts',
name: 'BUILD_SELECTOR'
)
string(
defaultValue: '1000',
description: 'Number of epochs',
name: 'EPOCHS'
)
}
stages {
stage('Check out from version control') {
steps {
2022-04-29 19:56:35 +02:00
checkout([$class: 'GitSCM', branches: [[name: '*/training_and_evaluation']], extensions: [], userRemoteConfigs: [[credentialsId: 's444421', url: 'https://git.wmi.amu.edu.pl/s444421/ium_444421.git']]])
2022-04-29 19:17:50 +02:00
}
}
stage('Script') {
steps {
2022-04-29 19:33:27 +02:00
copyArtifacts filter: '*', projectName:'s444421-create-dataset', selector: buildParameter('BUILD_SELECTOR')
2022-05-06 09:53:37 +02:00
sh 'ipython ./training_sacred.py with "epochs=$EPOCHS"'
2022-05-08 16:10:55 +02:00
sh 'mv my_runs/1/config.json config.json'
sh 'mv my_runs/1/model.pth model.pth'
sh 'mv my_runs/_sources/training* training_sacred.py'
sh 'mv my_runs/1/info.json info.json'
2022-05-06 09:53:37 +02:00
archiveArtifacts artifacts: 'config.json, model.pth, training_sacred.py, info.json'
2022-04-29 19:17:50 +02:00
}
}
}
2022-05-01 09:25:07 +02:00
post {
success {
2022-05-01 10:07:25 +02:00
emailext body: 'SUCCESS', subject: 's444421-training status', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
2022-05-01 09:25:07 +02:00
build job: 's444421-evaluation/training_and_evaluation'
2022-05-01 09:28:05 +02:00
}
2022-05-01 10:07:25 +02:00
failure {
emailext body: 'FAILURE', subject: 's444421-training status', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
aborted {
emailext body: 'ABORTED', subject: 's444421-training status', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
changed {
emailext body: 'CHANGED', subject: 's444421-training status', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
2022-05-06 09:57:32 +02:00
}
2022-04-29 19:17:50 +02:00
}