36 lines
910 B
Plaintext
36 lines
910 B
Plaintext
pipeline {
|
|
agent {
|
|
docker {
|
|
image 'sebastianwalesa/ium:1.0'
|
|
}
|
|
}
|
|
parameters {
|
|
buildSelector(
|
|
defaultSelector: lastSuccessful(),
|
|
description: 'Which build to use for copying artifacts for predict',
|
|
name: 'BUILD_SELECTOR')
|
|
string(
|
|
defaultValue: '{\\"inputs\\": [900.0]}',
|
|
description: 'Input file',
|
|
name: 'INPUT',
|
|
trim: true
|
|
)
|
|
}
|
|
|
|
stages {
|
|
stage('Copy Artifacts') {
|
|
steps {
|
|
copyArtifacts projectName: 's444409-training/main', selector: buildParameter('BUILD_SELECTOR')
|
|
sh "echo ${params.INPUT} > input_example.json"
|
|
sh "python predict.py"
|
|
}
|
|
}
|
|
|
|
stage('Prediction') {
|
|
steps {
|
|
sh "echo ${params.INPUT} > input_example.json"
|
|
sh "python prediction-s444409.py"
|
|
}
|
|
}
|
|
}
|
|
} |