pipeline { agent any parameters{ choice( choices: ['lastSuccessful()', 'lastCompleted()', 'latestSavedBuild()'], description: 'Which build to use for copying artifacts', name: 'BUILD_SELECTOR' )} stages { stage('Clear directory before') { steps { sh 'rm -rf *' } } stage('Clone project from repo') { steps { sh 'git clone https://git.wmi.amu.edu.pl/s486867/ium_z486867' } } stage('Copy artifacts from previous build') { steps { copyArtifacts filter: 'X_test.csv,X_dev.csv,X_train.csv', fingerprintArtifacts: true, projectName: 'z-s486867-create-dataset', selector: workspace() } } stage('Docker') { agent { dockerfile { filename 'Dockerfile' dir 'ium_z486867' reuseNode true } } steps { sh 'python ./ium_z486867/dataset-stats.py' archiveArtifacts 'X_test.csv' archiveArtifacts 'X_dev.csv' archiveArtifacts 'X_train.csv' } } stage('Clear directory after') { steps { sh 'rm -rf *' } } } }