2021-05-10 21:11:07 +02:00
|
|
|
pipeline {
|
|
|
|
agent {dockerfile true}
|
|
|
|
parameters {
|
|
|
|
buildSelector(
|
|
|
|
defaultSelector: lastSuccessful(),
|
|
|
|
description: 'Which build to use for copying artifacts',
|
|
|
|
name: 'BUILD_SELECTOR'
|
|
|
|
)
|
|
|
|
buildSelector(
|
|
|
|
defaultSelector: lastSuccessful(),
|
|
|
|
description: 'Which build to use for copying artifacts',
|
|
|
|
name: 'WHICH_BUILD_TRAIN'
|
|
|
|
)
|
2021-05-13 22:27:41 +02:00
|
|
|
buildSelector(
|
|
|
|
defaultSelector: lastSuccessful(),
|
|
|
|
description: 'Which build to use for copying artifacts',
|
|
|
|
name: 'WHICH_BUILD_EVAL'
|
|
|
|
)
|
|
|
|
gitParameter branchFilter: 'origin/(.*)', defaultValue: 'master', name: 'BRANCH', type: 'PT_BRANCH'
|
2021-05-10 21:11:07 +02:00
|
|
|
}
|
|
|
|
stages {
|
|
|
|
stage('copyArtifacts') {
|
|
|
|
steps {
|
|
|
|
copyArtifacts fingerprintArtifacts: true, projectName: 's434804-create-dataset', selector: buildParameter('BUILD_SELECTOR')
|
|
|
|
copyArtifacts fingerprintArtifacts: true, projectName: 's434804-training/master', selector: buildParameter('WHICH_BUILD_TRAIN')
|
2021-05-13 22:27:41 +02:00
|
|
|
copyArtifacts optional: true, fingerprintArtifacts: true, projectName: 's434804-evaluation/master', selector: buildParameter('WHICH_BUILD_EVAL')
|
2021-05-10 21:11:07 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('evaluation') {
|
|
|
|
steps {
|
2021-05-13 22:27:41 +02:00
|
|
|
sh 'buildNumber=$(echo $BUILD_NUMBER)'
|
|
|
|
sh 'python3 ./lab06-eval.py $BUILD_NUMBER'
|
2021-05-10 21:11:07 +02:00
|
|
|
sh 'chmod +x tensor-eval.py'
|
|
|
|
sh 'python3 "tensor-eval.py" >> evaluation.txt'
|
2021-05-13 22:27:41 +02:00
|
|
|
sh 'python3 tensor-plot.py'
|
2021-05-10 21:11:07 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('archiveArtifacts') {
|
|
|
|
steps{
|
|
|
|
archiveArtifacts 'evaluation.txt'
|
2021-05-13 22:27:41 +02:00
|
|
|
archiveArtifacts 'evaluation_plot.png'
|
2021-05-10 21:11:07 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-05-13 22:27:41 +02:00
|
|
|
post {
|
|
|
|
success {
|
|
|
|
mail body: 'SUCCESS', subject: 's434804', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
|
|
|
|
}
|
|
|
|
failure {
|
|
|
|
mail body: 'FAILURE', subject: 's434804', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
|
|
|
|
}
|
|
|
|
changed {
|
|
|
|
mail body: 'CHANGED', subject: 's434804', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
|
|
|
|
}
|
|
|
|
}
|
2021-05-10 21:11:07 +02:00
|
|
|
}
|