ium_434760/Jenkinsfile-evaluation
2021-04-29 23:45:22 +02:00

54 lines
1.9 KiB
Plaintext

pipeline {
agent {
docker { image 'adnovac/ium_s434760:1.1' }
}
parameters{
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying data artifacts',
name: 'WHICH_BUILD_DATA'
)
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying train artifacts',
name: 'WHICH_BUILD_TRAIN'
)
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying current project artifacts',
name: 'WHICH_BUILD_THIS'
)
}
stages {
stage('copy artifacts')
{
steps
{
copyArtifacts(fingerprintArtifacts: true, projectName: 's434760-create-dataset', selector: buildParameter('WHICH_BUILD_DATA'))
copyArtifacts(fingerprintArtifacts: true, projectName: 's434760-training', selector: buildParameter('WHICH_BUILD_TRAIN'))
copyArtifacts(fingerprintArtifacts: true, projectName: 's434760-evaluation', selector: buildParameter('WHICH_BUILD_THIS'))
}
}
stage('train')
{
steps
{
catchError {
sh 'python3.8 evaluate.py ${BATCH_SIZE} ${EPOCHS}'
}
}
}
stage('archive artifacts') {
steps {
archiveArtifacts 'results.txt,evaluation.png'
}
}
stage('send email') {
steps {
emailext body: currentBuild.result ?: 'SUCCESS',
subject: 's434760 - validation',
to: 'annnow19@st.amu.edu.pl'
}
}
}
}