ium_444452/Jenkins/Jenkinsfile.training

47 lines
1.9 KiB
Plaintext
Raw Normal View History

2022-05-02 17:37:51 +02:00
node {
checkout scm
docker.image('s444452/ium:1.3').inside {
stage('Preparation') {
properties([
2022-05-02 18:25:14 +02:00
pipelineTriggers([upstream(threshold: hudson.model.Result.SUCCESS, upstreamProjects: "s444452-create-dataset")]),
2022-05-02 17:37:51 +02:00
parameters([
string(
defaultValue: ".",
description: 'Arguments for model training: arg1,arg2,arg3',
name: 'TRAIN_ARGS'
)
])
])
}
2022-05-02 18:25:14 +02:00
stage('Copy artifacts') {
2022-05-02 18:49:07 +02:00
copyArtifacts filter: 'train_data.csv', fingerprintArtifacts: true, projectName: 's444452-create-dataset'
copyArtifacts filter: 'test_data.csv', fingerprintArtifacts: true, projectName: 's444452-create-dataset'
copyArtifacts filter: 'dev_data.csv', fingerprintArtifacts: true, projectName: 's444452-create-dataset'
2022-05-02 18:25:14 +02:00
}
2022-05-02 17:37:51 +02:00
stage('Run script') {
withEnv(["TRAIN_ARGS=${params.TRAIN_ARGS}"]) {
sh "python3 Scripts/train_neural_network.py $TRAIN_ARGS"
}
}
2022-05-02 18:49:07 +02:00
stage('Archive artifacts') {
2022-05-02 19:21:28 +02:00
archiveArtifacts "neural_network_evaluation.txt, model/**"
2022-05-02 18:49:07 +02:00
}
2022-05-02 17:37:51 +02:00
}
2022-05-02 19:33:02 +02:00
post {
success {
emailext body: 'SUCCESS', subject: 's444452-training', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
unstable {
emailext body: 'UNSTABLE', subject: 's444452-training', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
failure {
emailext body: 'FAILURE', subject: 's444452-training', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
not_built {
emailext body: 'NOT_BUILT', subject: 's444452-training', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
aborted {
emailext body: 'ABORTED', subject: 's444452-training', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
}
2022-05-02 17:37:51 +02:00
}