2022-05-02 16:45:31 +02:00
|
|
|
pipeline {
|
|
|
|
agent {
|
2022-05-02 16:52:13 +02:00
|
|
|
docker { image 's478841-image:latest' }
|
2022-05-02 16:45:31 +02:00
|
|
|
}
|
|
|
|
parameters {
|
|
|
|
gitParameter branFilter: 'origin/(.*)', defaultValue: 'develop', name: 'BRANCH_NAME', type:'PT_BRANCH'
|
|
|
|
buildSelector(
|
|
|
|
defaultSelector: upstream(),
|
|
|
|
description: 'Build used for artifacts copying',
|
|
|
|
name:'BUILD_SELECTOR')
|
|
|
|
}
|
|
|
|
|
|
|
|
stages {
|
|
|
|
stage('Copy artifacts') {
|
|
|
|
steps {
|
2022-05-02 17:01:24 +02:00
|
|
|
git branch: '${params.BRANCH_NAME}', url: 'https://git.wmi.amu.edu,pl/s478841/ium_478841.git'
|
|
|
|
|
2022-05-02 16:45:31 +02:00
|
|
|
copyArtifacts filter: 'data/*test*', fingerprintArtifacts: true, projectName: 's478841-create-dataset', selector: buildParameter('BUILD_SELECTOR')
|
2022-05-02 17:01:24 +02:00
|
|
|
copyArtifacts filter: 'data/*model*', fingerprintArtifacts: true, projectName: 's478841-training/${BRANCH_NAME}', selector: buildParameter('BUILD_SELECTOR')
|
|
|
|
copyArtifacts filter: 'evaluation_results.csv', projectName: 's478841-evaluation/${BRANCH_NAME}/', optional: true
|
2022-05-02 16:45:31 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Evaluate model') {
|
|
|
|
steps {
|
|
|
|
sh 'chmod +x -R ${env.WORKSPACE}'
|
|
|
|
sh 'python3 scripts/evaluate.py'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Archive artifacts') {
|
|
|
|
steps {
|
2022-05-02 17:01:24 +02:00
|
|
|
archiveArtifacts '*data/evaluation_results.csv', onlyIfSuccessful: true
|
|
|
|
archiveArtifacts '*data/plots.png', onlyIfSuccessful: true
|
2022-05-02 16:45:31 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
post {
|
|
|
|
success {
|
|
|
|
emailext body: 'SUCCESS', subject: 's478841-evaluation', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
|
|
|
|
}
|
|
|
|
failure {
|
|
|
|
emailext body: 'FAILURE', subject: 's478841-evaluation', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
|
|
|
|
}
|
|
|
|
unstable {
|
|
|
|
emailext body: 'UNSTABLE', subject: 's478841-evaluation', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
|
|
|
|
}
|
|
|
|
changed {
|
|
|
|
emailext body: 'CHANGED', subject: 's478841-evaluation', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|