48 lines
1.7 KiB
Plaintext
48 lines
1.7 KiB
Plaintext
def ACC = ''
|
|
|
|
pipeline {
|
|
agent {
|
|
dockerfile true
|
|
}
|
|
parameters {
|
|
gitParameter branchFilter: 'origin/(.*)', defaultValue: 'training_and_evaluation', name: 'BRANCH', type: 'PT_BRANCH'
|
|
buildSelector(
|
|
defaultSelector: lastSuccessful(),
|
|
description: 'Which build to use for copying artifacts',
|
|
name: 'BUILD_SELECTOR'
|
|
)
|
|
}
|
|
stages {
|
|
stage('Stage 1') {
|
|
steps {
|
|
git branch: "${params.BRANCH}", url: 'https://git.wmi.amu.edu.pl/s444421/ium_444421.git'
|
|
copyArtifacts filter: '*', projectName:'s444421-create-dataset', selector: buildParameter('BUILD_SELECTOR')
|
|
copyArtifacts filter: '*', projectName:'s444421-training/${BRANCH}/', selector: buildParameter('BUILD_SELECTOR')
|
|
copyArtifacts filter: '*', projectName:'s444421-evaluation/training_and_evaluation', optional: true
|
|
sh 'ipython ./evaluation.py'
|
|
archiveArtifacts artifacts: 'build_accuracy.txt, bilds_accuracy.jpg'
|
|
script {
|
|
ACC=$(tail -n 1 build_accuracy.txt)
|
|
}
|
|
}
|
|
}
|
|
stage('test') {
|
|
sh 'echo $ACC'
|
|
}
|
|
}
|
|
post {
|
|
success {
|
|
emailext body: 'SUCCESS', subject: 's444421-evaluation status', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
|
|
}
|
|
failure {
|
|
emailext body: 'FAILURE', subject: 's444421-evaluation status', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
|
|
}
|
|
aborted {
|
|
emailext body: 'ABORTED', subject: 's444421-evaluation status', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
|
|
}
|
|
changed {
|
|
emailext body: 'CHANGED', subject: 's444421-evaluation status', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
|
|
}
|
|
}
|
|
}
|