ium_z487175/Jenkinsfile-evaluation

40 lines
1.1 KiB
Plaintext
Raw Normal View History

2023-06-08 08:12:42 +02:00
pipeline{
agent any
2023-06-08 09:01:31 +02:00
parameters {
gitParameter(
name: 'BRANCH',
type: 'branch',
defaultValue: 'master',
description: 'Select the branch of training'
)
}
2023-06-08 08:12:42 +02:00
stages{
stage('Copy model artifacts with test dataset') {
steps {
2023-06-08 10:51:51 +02:00
script {
2023-06-08 11:16:03 +02:00
def myProject = "z-s487175-training/master"
2023-06-08 10:51:51 +02:00
copyArtifacts(
projectName: myProject,
fingerprintArtifacts: true,
selector: [$class: 'SpecificBuildSelector', buildNumber: "lastSuccessfulBuild"]
)
}
2023-06-08 08:12:42 +02:00
}
}
2023-06-08 11:38:03 +02:00
stage('Prediction'){
2023-06-08 08:12:42 +02:00
steps{
2023-06-08 11:20:26 +02:00
sh "docker run -v ${env.WORKSPACE} ium python3 DL-prediction.py"
2023-06-08 08:12:42 +02:00
}
}
stage('Archive prediction results'){
steps{
sh "docker cp \$(docker ps -l -q):/app/results_prediction.csv ${env.WORKSPACE}"
archiveArtifacts artifacts: 'results_prediction.csv', fingerprint: true
}
}
}
}