pipeline { agent any parameters { buildSelector( name: 'BUILD_SELECTOR', defaultSelector: lastSuccessful(), description: 'A build to take the artifacts from' ) } stages { stage('Copy artifacts') { steps { script { copyArtifacts( projectName: 'z-s487179-create-dataset', selector: buildParameter('BUILD_SELECTOR'), target: './ML' ) } } } stage('Run training') { steps { script { sh 'ls -l' docker.image('docker-image').inside { dir('./ML') { sh 'ls -l' sh 'python3 ./model_train.py' } } } } } } }