pipeline { agent { docker { image 's444507_create_dataset_image:latest' } } parameters { buildSelector( defaultSelector: lastSuccessful(), description: 'Which build to use for copying artifacts for predict', name: 'BUILD_SELECTOR') string( defaultValue: '{\\"inputs\\": [[0.51, 0.86], [0.79, 0.79], [0.74, 0.77], [0.66, 0.73]]}', description: 'Input file', name: 'INPUT', trim: true ) } stages { stage('Copy arifacts') { steps { copyArtifacts projectName: 's444356-training/master', selector: buildParameter('BUILD_SELECTOR') sh "echo ${params.INPUT} > input_example.json" } } stage('Run prediction on model') { steps { sh "python3 lab08_predict.py" } } } post { success { archiveArtifacts artifacts: 'CarPrices_pytorch_model.pkl, mlruns/**, my_model/**', followSymlinks: false } always { emailext body: "${currentBuild.currentResult}", subject: 's444507-training', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms' } } }