ium_s449288/lab8/Jenkinsfile_predict_artifact

33 lines
928 B
Plaintext
Raw Normal View History

2022-05-14 13:03:16 +02:00
pipeline {
agent {
docker {
image 's449288/ium:lab8.1'
}
}
parameters {
string(
defaultValue: '{\\"inputs\\": [[]]}',
description: 'Input example in json format',
name: 'INPUT'
)
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts',
name: 'BUILD_SELECTOR'
)
}
stages {
stage('Stage 1') {
steps {
echo 'Copying model from s444417-training...'
copyArtifacts projectName: 's444417-training/master', selector: buildParameter('BUILD_SELECTOR')
echo 'Model copied'
echo 'Making a prediction...'
sh 'echo ${params.INPUT} > input_example.json'
sh 'python3 predict_s444356.py'
echo 'Prediction made'
}
}
}
}