pipeline { agent {dockerfile true} options { copyArtifactPermission('s434684-evaluation/master'); } parameters { buildSelector( defaultSelector: lastSuccessful(), description: 'Which build to use for copying artifacts', name: 'BUILD_SELECTOR') string(name: 'LEARNING_RATE', defaultValue: '0.0001', description: 'What should be the learning rate?') } stages { stage('copyArtifacts') { steps { copyArtifacts fingerprintArtifacts: true, projectName: 's434684-create-dataset', selector: buildParameter('BUILD_SELECTOR') } } stage('Sh script') { steps { sh 'chmod +x run_training.sh' withEnv(["LEARNING_RATE=${params.LEARNING_RATE}"]) { sh './run_training.sh $LEARNING_RATE' } } } stage('Archive artifacts') { steps{ archiveArtifacts artifacts: 'model_movies.h5,my_runs/**' } } } }