ium_464863/Jenkinsfile
2024-03-20 17:54:27 +01:00

39 lines
1.0 KiB
Groovy

pipeline {
agent any
parameters {
password (
name: 'KAGGLE_USERNAME',
defaultValue: '',
description: 'Kaggle username'
)
password (
name: 'KAGGLE_KEY',
defaultValue: '',
description: 'Kaggle API key'
)
string (
name: 'CUTOFF',
defaultValue: '10',
description: 'Get only the first CUTOFF rows of the dataset'
)
}
stages {
stage('Clone repository') {
steps {
checkout scm
}
}
stage('Download dataset') {
steps {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}", "CUTOFF=${params.CUTOFF}"]) {
sh "chmod +x download_dataset.sh"
sh "./download_dataset.sh $CUTOFF"
archiveArtifacts artifacts: 'data.csv', onlyIfSuccessful: true
}
}
}
}
}