pipeline { agent { docker {image 'zadanie'} } parameters { buildSelector( defaultSelector: lastSuccessful(), description: 'Which build to use for copying artifacts', name: 'BUILD_SELECTOR' ) string( defaultValue: '10', description: 'some training parameter', name: 'TPARAM' ) } stages { stage('Copy artifacts') { steps { copyArtifacts fingerprintArtifacts: true, projectName: 's444501-create-dataset', selector: buildParameter('BUILD_SELECTOR') } } stage('Train model') { steps { sh 'python biblioteki_ml.py' } } stage('Archive model') { steps { archiveArtifacts artifacts: 'model.pkl, neural_network_prediction_results.csv' } } } post { always { emailext body: "${currentBuild.currentResult}", subject: 's444501-training', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms' } } }