ium_434760/Jenkinsfile-evaluation
2021-04-30 00:07:34 +02:00

54 lines
1.9 KiB
Plaintext

pipeline {
agent {
docker { image 'adnovac/ium_s434760:1.2' }
}
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, optional: true, projectName: 's434760-evaluation', selector: buildParameter('WHICH_BUILD_THIS'))
}
}
stage('evaluate')
{
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 - evaluation',
to: 'annnow19@st.amu.edu.pl'
}
}
}
}