52 lines
2.1 KiB
Plaintext
52 lines
2.1 KiB
Plaintext
pipeline {
|
|
agent {
|
|
docker { image 's478841-image:latest' }
|
|
}
|
|
parameters {
|
|
gitParameter branchFilter: '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 {
|
|
git branch: "${params.BRANCH_NAME}", url: 'https://git.wmi.amu.edu.pl/s478841/ium_478841.git'
|
|
|
|
copyArtifacts filter: 'data/*test*', fingerprintArtifacts: true, projectName: 's478841-create-dataset', selector: buildParameter('BUILD_SELECTOR')
|
|
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
|
|
}
|
|
}
|
|
stage('Evaluate model') {
|
|
steps {
|
|
// sh 'chmod +x -R ${env.WORKSPACE}'
|
|
sh 'python3 scripts/evaluate.py'
|
|
}
|
|
}
|
|
stage('Archive artifacts') {
|
|
steps {
|
|
archiveArtifacts artifacts: '*data/evaluation_results.csv', onlyIfSuccessful: true
|
|
archiveArtifacts artifacts: '*data/plots.png', onlyIfSuccessful: true
|
|
}
|
|
}
|
|
}
|
|
|
|
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'
|
|
}
|
|
}
|
|
}
|