pipeline { agent { dockerfile { filename 'Dockerfile' reuseNode true args "-e KAGGLE_USERNAME=${KAGGLE_USERNAME} -e KAGGLE_KEY=${KAGGLE_KEY}" } } parameters { password ( name: 'KAGGLE_USERNAME', defaultValue: '', description: 'Kaggle username' ) password ( name: 'KAGGLE_KEY', defaultValue: '', description: 'Kaggle API key' ) string ( name: 'CUTOFF', defaultValue: '500', description: 'Get only the first CUTOFF rows of the dataset' ) } stages { stage('Clone repository') { steps { checkout scm } } stage('Download dataset and preprocess data') { steps { script { sh "echo ${params.KAGGLE_USERNAME}" sh "chmod +x ./download_dataset.py" sh "python3 ./download_dataset.py ${params.CUTOFF}" archiveArtifacts artifacts: 'datasets/*', onlyIfSuccessful: true } } } } }