node { checkout scm def dockerimage = docker.build("train-image", "./train-eval") dockerimage.inside { stage('Preparation') { properties([ parameters([ string( defaultValue: 'default', description: 'Number of head lines to be taken from test file', name: 'LEARNING_PARAMETERS', trim: false) ]) ]) copyArtifacts projectName: 's470618-create-dataset', filter: '*.csv', fingerprintArtifacts: true, selector: lastSuccessful(), target: '.' } stage('Build') { withEnv(["LEARNING_PARAMETERS=${params.LEARNING_PARAMETERS}"]) { sh "./learning.py ${LEARNING_PARAMETERS}" } } stage('artifacts') { echo 'saving artifacts' archiveArtifacts 'model.pt' } } }