2022-05-13 02:39:21 +02:00
|
|
|
pipeline {
|
|
|
|
agent {
|
|
|
|
docker {
|
|
|
|
image 'zadanie'
|
|
|
|
args '-v /mlruns:/mlruns'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
parameters {
|
|
|
|
string(
|
2022-05-13 03:00:16 +02:00
|
|
|
defaultValue: '{"inputs": [[0.51, 0.86]]}',
|
2022-05-13 02:39:21 +02:00
|
|
|
description: 'Input example',
|
|
|
|
name: 'INPUT'
|
|
|
|
)
|
|
|
|
buildSelector(
|
|
|
|
defaultSelector: lastSuccessful(),
|
|
|
|
description: 'Which build to use for copying artifacts',
|
|
|
|
name: 'BUILD_SELECTOR'
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
stages {
|
|
|
|
stage('Copy artifacts') {
|
|
|
|
steps {
|
|
|
|
copyArtifacts fingerprintArtifacts: true, projectName: 's444356-training/master', selector: buildParameter('BUILD_SELECTOR')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Prediction') {
|
|
|
|
steps {
|
2022-05-13 02:45:31 +02:00
|
|
|
withEnv(["INPUT=${params.INPUT}"]) {
|
|
|
|
sh 'echo $INPUT > input_example.json'
|
2022-05-13 02:54:55 +02:00
|
|
|
}
|
2022-05-13 02:39:21 +02:00
|
|
|
sh 'python s444356.py'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|