ium_444498/Jenkinsfile-evaluation
Wirus006 475a76e552
All checks were successful
s444498-evaluation/pipeline/head This commit looks good
print eval result in mail
2022-05-09 12:00:23 +02:00

52 lines
1.8 KiB
Plaintext

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"
script {
LOSS = sh(script: 'tail -1 eval_result.txt', returnStdout: true).trim()
}
archiveArtifacts artifacts: "eval_result.txt", onlyIfSuccessful: true
}
}
}
post {
success {
emailext body: "SUCCESS results: RMSE:${LOSS}", subject: "s444498-evaluation", to: "e19191c5.uam.onmicrosoft.com@emea.teams.ms"
}
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"
}
}
}