2022-05-11 18:51:12 +02:00
|
|
|
pipeline {
|
|
|
|
agent {
|
2022-05-11 18:56:36 +02:00
|
|
|
docker {
|
|
|
|
image 'maciejczajka'
|
2022-05-11 18:51:12 +02:00
|
|
|
}
|
|
|
|
}
|
2022-05-11 19:33:00 +02:00
|
|
|
parameters {
|
2022-05-11 20:31:48 +02:00
|
|
|
buildSelector(
|
|
|
|
defaultSelector: lastSuccessful(),
|
|
|
|
description: 'Which build to use for copying artifacts for predict',
|
|
|
|
name: 'BUILD_SELECTOR')
|
2022-05-11 19:33:00 +02:00
|
|
|
string(
|
2022-05-11 21:33:38 +02:00
|
|
|
defaultValue: '{\\"inputs\\": [1000.0]}',
|
2022-05-11 21:16:05 +02:00
|
|
|
description: 'Input file',
|
2022-05-11 19:33:00 +02:00
|
|
|
name: 'INPUT',
|
2022-05-11 21:25:56 +02:00
|
|
|
trim: true
|
2022-05-11 19:33:00 +02:00
|
|
|
)
|
|
|
|
}
|
2022-05-11 18:51:12 +02:00
|
|
|
|
|
|
|
stages {
|
|
|
|
stage('Script') {
|
|
|
|
steps {
|
2022-05-11 20:31:48 +02:00
|
|
|
copyArtifacts projectName: 's444409-training/main', selector: buildParameter('BUILD_SELECTOR')
|
2022-05-11 21:17:12 +02:00
|
|
|
sh "echo ${params.INPUT} > input_example.json"
|
2022-05-11 21:29:14 +02:00
|
|
|
sh "python predict.py"
|
2022-05-11 18:51:12 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|