ium_464863/Jenkinsfile

39 lines
1.0 KiB
Plaintext
Raw Normal View History

2024-03-20 14:23:42 +01:00
pipeline {
agent any
parameters {
password (
name: 'KAGGLE_USERNAME',
defaultValue: '',
description: 'Kaggle username'
2024-03-20 17:30:31 +01:00
)
password (
name: 'KAGGLE_KEY',
defaultValue: '',
description: 'Kaggle API key'
2024-03-20 17:30:31 +01:00
)
2024-03-20 17:33:00 +01:00
string (
name: 'CUTOFF',
defaultValue: '500',
description: 'Get only the first CUTOFF rows of the dataset'
)
}
2024-03-20 14:23:42 +01:00
stages {
stage('Clone repository') {
steps {
checkout scm
}
}
stage('Download dataset') {
2024-03-20 14:23:42 +01:00
steps {
2024-03-20 17:49:03 +01:00
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}", "CUTOFF=${params.CUTOFF}"]) {
2024-03-20 17:54:27 +01:00
sh "chmod +x download_dataset.sh"
2024-03-20 17:52:06 +01:00
sh "./download_dataset.sh $CUTOFF"
archiveArtifacts artifacts: 'data.csv,train.csv,dev.csv,test.csv', onlyIfSuccessful: true
}
2024-03-20 14:23:42 +01:00
}
}
}
}