2021-05-23 19:01:11 +02:00
|
|
|
pipeline {
|
|
|
|
agent any
|
2021-05-23 19:02:45 +02:00
|
|
|
parameters {
|
|
|
|
buildSelector(
|
|
|
|
defaultSelector: lastSuccessful(),
|
|
|
|
description: 'Which build to use for copying artifacts for predict',
|
|
|
|
name: 'BUILD_SELECTOR_PREDICT')
|
|
|
|
}
|
2021-05-23 19:01:11 +02:00
|
|
|
stages {
|
|
|
|
stage('checkout') {
|
|
|
|
steps {
|
|
|
|
checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s426206/ium_426206.git']]])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Copy artifact') {
|
|
|
|
steps {
|
2021-05-23 19:53:53 +02:00
|
|
|
copyArtifacts filter: 'movies_on_streaming_platforms_model/input_example.json', fingerprintArtifacts: false, projectName: 's434704-training/master', selector: buildParameter('BUILD_SELECTOR_PREDICT')
|
2021-05-23 19:01:11 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('docker') {
|
|
|
|
steps {
|
|
|
|
script {
|
|
|
|
def img = docker.build('rokoch/ium:01')
|
2021-05-23 19:09:08 +02:00
|
|
|
img.inside('-v /tmp/mlruns:/tmp/mlruns') {
|
2021-05-23 19:01:11 +02:00
|
|
|
sh 'chmod +x mlflow_predict_registry.py'
|
|
|
|
sh 'python3 ./mlflow_predict_registry.py'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|