pipeline { agent any parameters { buildSelector(defaultSelector: lastSuccessful(), description: 'Which build to use for copying artifacts', name: 'BUILD_SELECTOR') } stages { stage('checkout') { steps { git 'https://git.wmi.amu.edu.pl/s440058/ium_440058.git' copyArtifacts fingerprintArtifacts: true, projectName: 's440058-create-dataset', selector: buildParameter('BUILD_SELECTOR') } } stage('sh: Shell Script') { steps { sh 'chmod +x ./bash2.sh' sh './bash2.sh' } } stage('archiveArtifacts') { steps { archiveArtifacts 'courses.txt' } } } }