ium_426206/Jenkinsfile_predict

39 lines
1.3 KiB
Plaintext

pipeline {
agent any
parameters {
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts for predict',
name: 'BUILD_SELECTOR_PREDICT')
string(
defaultValue: 'input_example.json',
description: 'Input name',
name: 'INPUT',
trim: false
)
}
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 {
copyArtifacts filter: 'movies_on_streaming_platforms_model/**/*', fingerprintArtifacts: false, projectName: 's434704-training/master', selector: buildParameter('BUILD_SELECTOR_PREDICT')
}
}
stage('docker') {
steps {
script {
def img = docker.build('rokoch/ium:01')
img.inside {
sh 'chmod +x mlflow_predict.py'
sh 'python3 ./mlflow_predict.py $INPUT'
}
}
}
}
}
}