42 lines
1.2 KiB
Groovy
42 lines
1.2 KiB
Groovy
pipeline {
|
|
agent any
|
|
parameters {
|
|
string (
|
|
name: 'KAGGLE_USERNAME',
|
|
defaultValue: 'ardenw',
|
|
description: 'Kaggle username'
|
|
)
|
|
password (
|
|
name: 'KAGGLE_KEY',
|
|
defaultValue: '',
|
|
description: 'Kaggle API key'
|
|
)
|
|
string (
|
|
name: 'DATA_TRAIN_RATIO',
|
|
defaultValue: '80',
|
|
description: 'Train data ratio percentage'
|
|
)
|
|
string (
|
|
name: 'CUTOFF',
|
|
defaultValue: '500',
|
|
description: 'Cutoff value'
|
|
)
|
|
}
|
|
stages {
|
|
stage('Checkout repository') {
|
|
steps {
|
|
checkout scm
|
|
}
|
|
}
|
|
stage('Download dataset') {
|
|
steps {
|
|
withEnv(["USERNAME=${params.USERNAME}", "API_KEY=${params.API_KEY}", "DATA_TRAIN_RATIO=${params.DATA_TRAIN_RATIO}", "CUTOFF=${params.CUTOFF}"]) {
|
|
sh "chmod +x download_dataset.sh"
|
|
sh "./download_dataset.sh $DATA_TRAIN_RATIO" $CUTOFF
|
|
archiveArtifacts artifacts: 'data.csv,train.csv,test.csv', onlyIfSuccessful: true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|