ium_444507/Jenkinsfile_predict

38 lines
1.2 KiB
Plaintext
Raw Normal View History

2022-05-16 03:02:18 +02:00
pipeline {
agent {
2022-05-16 10:52:32 +02:00
docker { image 's444507_create_dataset_image' }
2022-05-16 03:02:18 +02:00
}
parameters {
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts for predict',
name: 'BUILD_SELECTOR')
string(
defaultValue: '{\\"inputs\\": [[0.51, 0.86], [0.79, 0.79], [0.74, 0.77], [0.66, 0.73]]}',
description: 'Input file',
name: 'INPUT',
trim: true
)
}
stages {
stage('Copy arifacts') {
steps {
copyArtifacts projectName: 's444356-training/master', selector: buildParameter('BUILD_SELECTOR')
sh "echo ${params.INPUT} > input_example.json"
}
}
stage('Run prediction on model') {
steps {
2022-05-16 03:25:54 +02:00
sh "python3 lab08_predict.py"
2022-05-16 03:02:18 +02:00
}
}
}
post {
success {
archiveArtifacts artifacts: 'CarPrices_pytorch_model.pkl, mlruns/**, my_model/**', followSymlinks: false
}
always {
emailext body: "${currentBuild.currentResult}", subject: 's444507-training', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
}
}