pipeline { agent any parameters { choice( name: 'BUILD_SELECTOR', choices: ['lastSuccessfulBuild()', 'lastStableBuild()', 'specificBuild(123)', 'tags(\'release-*\')'], description: 'Which build to use for copying artifacts', defaultValue: 'lastSuccessfulBuild()' ) } stages { stage('Copy artifacts') { steps { script { copyArtifacts( projectName: 'z-s487179-create-dataset', selector: "${params.BUILD_SELECTOR}" ) } } } } }