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' name: 'KAGGLE_KEY'
) )
string( gitParameter branchFilter: 'origin/(.*)', defaultValue: 'master', name: 'BRANCH', type: 'PT_BRANCH'
defaultValue: '1000', buildSelector(
description: 'Number of epochs', defaultSelector: lastSuccessful(),
name: 'EPOCHS', description: 'Which build to use for copying artifacts',
trim: false name: 'BUILD_SELECTOR'
)
) )
} }
@ -30,30 +31,37 @@ pipeline {
stage('Main'){ stage('Main'){
steps { steps {
copyArtifacts filter: '*', projectName: 's478815-create-dataset copyArtifacts filter: '*', projectName: 's478815-create-dataset, selector: buildParameter('BUILD_SELECTOR')
copyArtifacts filter: '*', projectName: 's478815/master' copyArtifacts filter: '*', projectName: 's478815-training/${BRANCH}', selector: buildParameter('BUILD_SELECTOR')
copyArtifacts filter: '*', projectName: 's478815-evaluation/master' copyArtifacts filter: '*', projectName: 's478815-evaluation/master', selector: buildParameter('BUILD_SELECTOR'), optional: true
sh 'python3 ./evaluation.py' sh 'python3 ./evaluation.py'
archiveArtifacts artifacts: 'metrics.txt, metrics.png', followSymlinks: false archiveArtifacts artifacts: 'metrics.txt, metrics.png', followSymlinks: false
build job: 's478815-evaluation/master/' build job: 's478815-evaluation/master/'
script {
ACC = sh (
script: 'tail -1 metrics.txt',
returnStdout: true
).trim()
}
} }
} }
} }
post { post {
success { 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 { 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 { 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 { 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'
} }
} }
} }