2022-05-06 21:09:02 +02:00
|
|
|
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'
|
|
|
|
)
|
|
|
|
|
2022-05-06 22:50:44 +02:00
|
|
|
gitParameter branchFilter: 'origin/(.*)', defaultValue: 'master', name: 'BRANCH', type: 'PT_BRANCH'
|
2022-05-06 22:48:52 +02:00
|
|
|
buildSelector(
|
|
|
|
defaultSelector: lastSuccessful(),
|
|
|
|
description: 'Which build to use for copying artifacts',
|
|
|
|
name: 'BUILD_SELECTOR'
|
|
|
|
)
|
|
|
|
|
2022-05-06 21:09:02 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
stages {
|
2022-05-06 21:16:32 +02:00
|
|
|
stage('Main'){
|
2022-05-06 21:09:02 +02:00
|
|
|
steps {
|
2022-05-06 21:11:25 +02:00
|
|
|
|
2022-05-06 22:55:25 +02:00
|
|
|
copyArtifacts filter: '*', projectName: 's478815-create-dataset', selector: buildParameter('BUILD_SELECTOR')
|
2022-05-06 22:45:59 +02:00
|
|
|
copyArtifacts filter: '*', projectName: 's478815-training/${BRANCH}', selector: buildParameter('BUILD_SELECTOR')
|
|
|
|
copyArtifacts filter: '*', projectName: 's478815-evaluation/master', selector: buildParameter('BUILD_SELECTOR'), optional: true
|
2022-05-06 21:16:32 +02:00
|
|
|
|
2022-05-06 21:17:34 +02:00
|
|
|
sh 'python3 ./evaluation.py'
|
2022-05-06 21:16:32 +02:00
|
|
|
archiveArtifacts artifacts: 'metrics.txt, metrics.png', followSymlinks: false
|
2022-05-06 22:45:59 +02:00
|
|
|
|
|
|
|
script {
|
|
|
|
ACC = sh (
|
|
|
|
script: 'tail -1 metrics.txt',
|
|
|
|
returnStdout: true
|
|
|
|
).trim()
|
|
|
|
}
|
2022-05-06 21:09:02 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-05-06 23:04:12 +02:00
|
|
|
|
|
|
|
post {
|
|
|
|
success {
|
|
|
|
emailext body: "SUCCESS, ACC = ${ACC}", subject: 's478815 Evaluation', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
|
|
|
|
}
|
|
|
|
failure {
|
|
|
|
emailext body: 'FAILURE', ACC = ${ACC}", subject: 's478815 Evaluation', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
|
|
|
|
}
|
|
|
|
unstable {
|
|
|
|
emailext body: 'UNSTABLE', ACC = ${ACC}", subject: 's478815 Evaluation', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
|
|
|
|
}
|
|
|
|
changed {
|
|
|
|
emailext body: 'CHANGED', ACC = ${ACC}", subject: 's478815 Evaluation', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-05-06 22:47:10 +02:00
|
|
|
|
2022-05-06 21:09:02 +02:00
|
|
|
}
|