ium_464979/Jenkinsfile

32 lines
1.0 KiB
Groovy

pipeline {
agent any
parameters {
string(name: 'KAGGLE_DATASET_ID', defaultValue: '', description: 'Kaggle dataset')
string(name: 'REPO_URL', defaultValue: '', description: 'Git Url')
string(name: 'CUTOFF', defaultValue: '10000', description: 'Liczba wierszy do obcięcia ze zbioru danych')
string(name: 'KAGGLE_USERNAME', defaultValue: '', description: 'Kaggle username')
password(name: 'KAGGLE_KEY', defaultValue: '', description: 'Kaggle API key')
}
stages {
stage('Clone Repository') {
steps {
git url: "${params.REPO_URL}"
}
}
stage('Download, Process, and Split Dataset') {
steps {
withEnv([
"KAGGLE_USERNAME=${env.KAGGLE_USERNAME}",
"KAGGLE_KEY=${env.KAGGLE_KEY}"
]) {
sh "bash ./kuggle_download.sh ${params.KAGGLE_DATASET_ID} ${params.CUTOFF}"
sh './kuggle_download.sh'
}
}
}
}
}