33 lines
928 B
Plaintext
33 lines
928 B
Plaintext
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'
|
|
}
|
|
}
|
|
}
|
|
}
|