ium_444380/Jenkinsfile.eval

49 lines
1.9 KiB
Plaintext
Raw Normal View History

2022-05-03 19:47:36 +02:00
pipeline {
agent {
docker { image 'kamilguttmann/ium:eval' }
}
parameters {
gitParameter branchFilter: 'origin/(.*)', defaultValue: 'master', name: 'BRANCH', type: 'PT_BRANCH'
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying dataset artifacts',
name: 'DATASET_BUILD_SELECTOR'
)
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying train artifacts',
name: 'TRAIN_BUILD_SELECTOR'
)
}
stages {
stage('Copy artifacts') {
steps {
copyArtifacts fingerprintArtifacts: true, projectName: 's444380-create-dataset', selector: buildParameter('DATASET_BUILD_SELECTOR')
copyArtifacts fingerprintArtifacts: true, projectName: 's444380-training/${BRANCH}', selector: buildParameter('TRAIN_BUILD_SELECTOR')
copyArtifacts filter: "eval_results.csv", projectName: 's444380-evaluation/${BRANCH}', optional: true
}
}
stage("Checkout git") {
steps {
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 's444380', url: 'https://git.wmi.amu.edu.pl/s444380/ium_444380.git']]])
}
}
stage("Evaluation") {
steps {
sh "chmod u+x ./evaluate.py"
sh "python3 ./evaluate.py"
archiveArtifacts artifacts: "eval_results.csv, plot.png", onlyIfSuccessful: true
}
}
}
post {
success {
emailext body: "SUCCESS", subject: "s444380-evaluation", to: "e19191c5.uam.onmicrosoft.com@emea.teams.ms"
}
failure {
emailext body: "FAILURE", subject: "s444380-evaluation", to: "e19191c5.uam.onmicrosoft.com@emea.teams.ms"
}
}
}