2021-04-29 23:45:22 +02:00
|
|
|
pipeline {
|
|
|
|
agent {
|
2021-04-30 00:07:34 +02:00
|
|
|
docker { image 'adnovac/ium_s434760:1.2' }
|
2021-04-29 23:45:22 +02:00
|
|
|
}
|
|
|
|
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'))
|
2021-04-29 23:54:01 +02:00
|
|
|
copyArtifacts(fingerprintArtifacts: true, optional: true, projectName: 's434760-evaluation', selector: buildParameter('WHICH_BUILD_THIS'))
|
2021-04-29 23:45:22 +02:00
|
|
|
}
|
|
|
|
}
|
2021-04-30 00:07:34 +02:00
|
|
|
stage('evaluate')
|
2021-04-29 23:45:22 +02:00
|
|
|
{
|
|
|
|
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',
|
2021-04-30 00:07:34 +02:00
|
|
|
subject: 's434760 - evaluation',
|
2021-04-29 23:45:22 +02:00
|
|
|
to: 'annnow19@st.amu.edu.pl'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|