ium_434742/evaluation.Jenkinsfile

74 lines
2.2 KiB
Plaintext
Raw Permalink Normal View History

2021-05-14 19:29:48 +02:00
pipeline {
agent {
dockerfile true
}
parameters {
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying data artifacts',
name: 'BUILD_SELECTOR_DATASET'
)
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying training artifacts',
name: 'BUILD_SELECTOR_TRAINING'
)
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying evaluation artifacts',
name: 'BUILD_SELECTOR_EVALUATION'
)
gitParameter branchFilter: 'origin/(.*)', defaultValue: 'master', name: 'BRANCH', type: 'PT_BRANCH'
}
stages {
stage('copy artifacts')
{
steps
{
copyArtifacts(fingerprintArtifacts: true, projectName: 's434742-create-dataset', selector: buildParameter('BUILD_SELECTOR_DATASET'))
2021-05-14 19:34:56 +02:00
copyArtifacts(fingerprintArtifacts: true, projectName: 's434742-training/${BRANCH}', selector: buildParameter('BUILD_SELECTOR_TRAINING'))
copyArtifacts(fingerprintArtifacts: true, optional:true, projectName: 's434742-evaluation/${BRANCH}', selector: buildParameter('BUILD_SELECTOR_EVALUATION'))
2021-05-14 19:29:48 +02:00
}
}
stage('evaluation') {
steps {
script {
2021-05-14 21:06:49 +02:00
sh "echo 'halko'"
2021-05-14 19:29:48 +02:00
sh 'chmod +x avocado-evaluation.py'
2021-05-14 19:40:33 +02:00
sh "echo ${env.BUILD_ID}"
2021-05-14 19:42:09 +02:00
sh "python3 avocado-evaluation.py ${env.BUILD_ID}"
2021-05-15 12:02:10 +02:00
sh 'python3 sacred-fileobserver.py'
sh 'python3 sacred-mongoobserver.py'
2021-05-14 19:29:48 +02:00
}
}
}
stage('archiveArtifacts') {
steps{
archiveArtifacts 'eval_results.txt'
archiveArtifacts 'eval_plot.png'
2021-05-15 12:59:38 +02:00
archiveArtifacts 'sacred_runs/**'
2021-05-14 19:29:48 +02:00
}
}
stage('sendMail') {
steps{
2021-05-15 12:04:23 +02:00
emailext body: "${currentBuild.currentResult}",
2021-05-14 19:29:48 +02:00
subject: 's434742 evaluation',
to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
}
}
}
}