pipeline { agent any parameters { buildSelector( name: 'BUILD_SELECTOR', description: 'Which build to use for copying artifacts', defaultSelector: lastSuccessful() ) } stages { stage('Git Checkout') { steps { git 'https://git.wmi.amu.edu.pl/s487174/ium_z487174.git' } } stage('Copy Artifacts') { steps { copyArtifacts( fingerprintArtifacts: true, projectName: 'z-s487174-create-dataset', selector: buildParameter('BUILD_SELECTOR') ) } } stage('PullDockerImage') { steps { sh 'docker pull jnachyla/stats:3.0 ' } } stage('RunDockerImage') { steps { echo "${pwd()}" sh "docker run -v ${pwd()}/results:/app/results jnachyla/stats:3.0 " } } stage('Archive Artifacts') { steps { archiveArtifacts artifacts: 'results/results.txt', onlyIfSuccessful: true } } } }