ium_444498/Jenkinsfile-evaluation

52 lines
1.8 KiB
Plaintext
Raw Permalink Normal View History

2022-05-08 20:13:10 +02:00
pipeline {
agent {
dockerfile true
}
parameters {
gitParameter branchFilter: 'origin/(.*)', defaultValue: 'master', name: 'BRANCH', type: 'PT_BRANCH'
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts',
name: 'BUILD_SELECTOR'
)
}
stages {
stage('Copy artifacts') {
steps {
copyArtifacts fingerprintArtifacts: true, projectName: 's444498-create-dataset', selector: buildParameter('BUILD_SELECTOR')
copyArtifacts fingerprintArtifacts: true, projectName: 's444498-training/${BRANCH}', selector: buildParameter('BUILD_SELECTOR')
copyArtifacts filter: "eval_result.txt", projectName: 's444498-evaluation/${BRANCH}', optional: true
}
}
stage("Evaluation") {
steps {
sh "chmod u+x ./evaluation.py"
sh "python3 ./evaluation.py"
2022-05-09 12:00:23 +02:00
script {
LOSS = sh(script: 'tail -1 eval_result.txt', returnStdout: true).trim()
}
2022-05-08 20:13:10 +02:00
archiveArtifacts artifacts: "eval_result.txt", onlyIfSuccessful: true
}
}
}
post {
success {
2022-05-09 12:00:23 +02:00
emailext body: "SUCCESS results: RMSE:${LOSS}", subject: "s444498-evaluation", to: "e19191c5.uam.onmicrosoft.com@emea.teams.ms"
2022-05-08 20:13:10 +02:00
}
failure {
emailext body: "FAILURE", subject: "s444498-evaluation", to: "e19191c5.uam.onmicrosoft.com@emea.teams.ms"
}
unstable {
emailext body: 'UNSTABLE', subject: "s444498-evaluation", to: "e19191c5.uam.onmicrosoft.com@emea.teams.ms"
}
changed {
emailext body: 'CHANGED', subject: "s444498-evaluation", to: "e19191c5.uam.onmicrosoft.com@emea.teams.ms"
}
}
}