pipeline { agent { docker { image 'mateusz887/ium:latest' } } parameters { buildSelector( defaultSelector: lastSuccessful(), description: 'Which build to use for copying artifacts', name: 'BUILD_SELECTOR' ) } stages { stage('Clone Repository') { steps { git branch: 'main', url: 'https://git.wmi.amu.edu.pl/s464913/ium_464913.git' } } stage('Copy Artifacts') { steps { copyArtifacts filter: 'data/*', projectName: 'z-s464913-create-dataset-1', selector: buildParameter('BUILD_SELECTOR') } } stage('Generate Report') { steps { sh 'chmod +x dataset_stats.py' sh './dataset_stats.py' } } stage('Archive Artifacts') { steps { archiveArtifacts artifacts: 'stats_data/*', onlyIfSuccessful: true } } } }