2024-03-20 14:29:57 +01:00
|
|
|
pipeline {
|
|
|
|
agent any
|
2024-03-26 18:29:52 +01:00
|
|
|
parameters {
|
|
|
|
string (
|
|
|
|
name: 'KAGGLE_USERNAME',
|
|
|
|
defaultValue: 'ardenw',
|
|
|
|
description: 'Kaggle username'
|
|
|
|
)
|
|
|
|
password (
|
|
|
|
name: 'KAGGLE_KEY',
|
|
|
|
defaultValue: '',
|
|
|
|
description: 'Kaggle API key'
|
|
|
|
)
|
|
|
|
string (
|
|
|
|
name: 'DATA_TRAIN_RATIO',
|
2024-03-26 18:45:26 +01:00
|
|
|
defaultValue: '80',
|
|
|
|
description: 'Train data ratio percentage'
|
2024-03-26 18:29:52 +01:00
|
|
|
)
|
|
|
|
string (
|
|
|
|
name: 'CUTOFF',
|
|
|
|
defaultValue: '500',
|
|
|
|
description: 'Cutoff value'
|
|
|
|
)
|
|
|
|
}
|
2024-03-20 14:29:57 +01:00
|
|
|
stages {
|
2024-03-20 14:58:46 +01:00
|
|
|
stage('Checkout repository') {
|
2024-03-20 14:29:57 +01:00
|
|
|
steps {
|
2024-03-26 18:29:52 +01:00
|
|
|
checkout scm
|
2024-03-20 14:58:46 +01:00
|
|
|
}
|
|
|
|
}
|
2024-03-26 18:29:52 +01:00
|
|
|
stage('Download dataset') {
|
2024-03-20 14:58:46 +01:00
|
|
|
steps {
|
2024-03-26 18:48:24 +01:00
|
|
|
withEnv(["USERNAME=${params.USERNAME}", "API_KEY=${params.API_KEY}", "DATA_TRAIN_RATIO=${params.DATA_TRAIN_RATIO}", "CUTOFF=${params.CUTOFF}"]) {
|
2024-03-26 18:29:52 +01:00
|
|
|
sh "chmod +x download_dataset.sh"
|
2024-03-26 18:48:24 +01:00
|
|
|
sh "./download_dataset.sh $DATA_TRAIN_RATIO" $CUTOFF
|
2024-03-26 18:29:52 +01:00
|
|
|
archiveArtifacts artifacts: 'data.csv,train.csv,test.csv', onlyIfSuccessful: true
|
2024-03-26 18:34:28 +01:00
|
|
|
}
|
2024-03-20 14:29:57 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-03-26 18:34:28 +01:00
|
|
|
}
|