Zaktualizuj 'Jenkinsfile_evaluation'

This commit is contained in:
Kornelia Girejko 2022-05-06 22:45:59 +02:00
parent 3351af1628
commit 34e3442552

View File

@ -18,11 +18,12 @@ pipeline {
name: 'KAGGLE_KEY'
)
string(
defaultValue: '1000',
description: 'Number of epochs',
name: 'EPOCHS',
trim: false
gitParameter branchFilter: 'origin/(.*)', defaultValue: 'master', name: 'BRANCH', type: 'PT_BRANCH'
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts',
name: 'BUILD_SELECTOR'
)
)
}
@ -30,30 +31,37 @@ pipeline {
stage('Main'){
steps {
copyArtifacts filter: '*', projectName: 's478815-create-dataset
copyArtifacts filter: '*', projectName: 's478815/master'
copyArtifacts filter: '*', projectName: 's478815-evaluation/master'
copyArtifacts filter: '*', projectName: 's478815-create-dataset, selector: buildParameter('BUILD_SELECTOR')
copyArtifacts filter: '*', projectName: 's478815-training/${BRANCH}', selector: buildParameter('BUILD_SELECTOR')
copyArtifacts filter: '*', projectName: 's478815-evaluation/master', selector: buildParameter('BUILD_SELECTOR'), optional: true
sh 'python3 ./evaluation.py'
archiveArtifacts artifacts: 'metrics.txt, metrics.png', followSymlinks: false
build job: 's478815-evaluation/master/'
script {
ACC = sh (
script: 'tail -1 metrics.txt',
returnStdout: true
).trim()
}
}
}
}
post {
success {
emailext body: 'SUCCESS', subject: 's478815-training', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
emailext body: "SUCCESS, ACC = ${ACC}", subject: 's478815-evaluation', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
failure {
emailext body: 'FAILURE', subject: 's478815-training', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
emailext body: 'FAILURE', ACC = ${ACC}", subject: 's478815-evaluation', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
unstable {
emailext body: 'UNSTABLE', subject: 's478815-training', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
emailext body: 'UNSTABLE', ACC = ${ACC}", subject: 's478815-evaluation', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
changed {
emailext body: 'CHANGED', subject: 's478815-training', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
emailext body: 'CHANGED', ACC = ${ACC}", subject: 's478815-evaluation', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
}
}