ium_478815/Jenkinsfile_evaluation

66 lines
2.2 KiB
Plaintext

pipeline {
agent {
dockerfile {
additionalBuildArgs "--build-arg KAGGLE_USERNAME=${params.KAGGLE_USERNAME} --build-arg KAGGLE_KEY=51854c15661583860a60db232a7026f0 --build-arg CUTOFF=${params.CUTOFF} -t kgirejko"
}
}
parameters {
string(
defaultValue: 'kgirejko',
description: 'Kaggle username',
name: 'KAGGLE_USERNAME',
trim: false
)
password(
defaultValue: '51854c15661583860a60db232a7026f0',
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
name: 'KAGGLE_KEY'
)
gitParameter branchFilter: 'origin/(.*)', defaultValue: 'master', name: 'BRANCH', type: 'PT_BRANCH'
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts',
name: 'BUILD_SELECTOR'
)
}
stages {
stage('Main'){
steps {
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, metric.txt, metrics.png', followSymlinks: false
script {
MAE = sh (
script: 'tail -1 metrics.txt',
returnStdout: true
).trim()
}
}
}
}
post {
success {
emailext body: "SUCCESS, ${MAE}", subject: 's478815 evaluation', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
failure {
emailext body: "FAILURE, ${MAE}", subject: 's478815 evaluation', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
unstable {
emailext body: "UNSTABLE, ${MAE}", subject: 's478815 evaluation', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
changed {
emailext body: "CHANGED, ${MAE}", subject: 's478815 evaluation', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
}
}