ium_444356/Jenkinsfile_eval
Maciej Czajka 6266d4c126
All checks were successful
s444356-evaluation/pipeline/head This commit looks good
s444356-training/pipeline/head This commit looks good
update Dockerfile, jenkinsfile_train and add jenkinsfile_eval, evaluate.py
2022-05-02 17:43:12 +02:00

46 lines
1.7 KiB
Plaintext

pipeline {
agent {
docker {
image 'maciejczajka'
}
}
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('Script'){
steps {
copyArtifacts filter: '*', projectName: 's444356-create-dataset', selector: buildParameter('BUILD_SELECTOR')
copyArtifacts filter: '*', projectName: 's444356-training/${BRANCH}', selector: buildParameter('BUILD_SELECTOR')
copyArtifacts filter: '*', projectName: 's444356-evaluation/master', selector: buildParameter('BUILD_SELECTOR'), optional: true
sh 'python3 ./Biblioteka_DL/evaluate.py'
archiveArtifacts artifacts: 'metrics.txt, metrics.png', followSymlinks: false
script {
ACC = sh (
script: 'tail -1 metrics.txt',
returnStdout: true
).trim()
}
}
}
}
post {
success {
emailext body: 'SUCCESS, ACC = ${ACC}', subject: 's444356-evaluation', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
failure {
emailext body: 'FAILURE, ACC = ${ACC}', subject: 's444356-evaluation', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
unstable {
emailext body: 'UNSTABLE, ACC = ${ACC}', subject: 's444356-evaluation', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
changed {
emailext body: 'CHANGED, ACC = ${ACC}', subject: 's444356-evaluation', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
}
}