pipeline { agent { docker { image 'patlaz/ium:1.0' } } parameters { buildSelector( defaultSelector: lastSuccessful(), description: 'Which build to use for copying artifacts', name: 'BUILD_SELECTOR' ) string( defaultValue: '16', description: 'batch size', name: 'BATCH_SIZE' ) string( defaultValue: '15', description: 'epochs', name: 'EPOCHS' ) } stages { stage('copyArtifacts') { steps { copyArtifacts fingerprintArtifacts: true, projectName: 's434742-create-dataset', selector: buildParameter('BUILD_SELECTOR') } } stage('Sh script') { steps { sh 'chmod +x run_training-script.sh' sh './run_training-script.sh ${EPOCHS} ${BATCH_SIZE}' } } stage('Archive artifacts') { steps{ archiveArtifacts artifacts: 'model_movies' } } } }