47 lines
1.2 KiB
Groovy
47 lines
1.2 KiB
Groovy
pipeline {
|
|
agent any
|
|
parameters {
|
|
string (
|
|
name: 'KAGGLE_USERNAME',
|
|
defaultValue: 'ardenw',
|
|
description: 'Kaggle username'
|
|
)
|
|
password (
|
|
name: 'API_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('Prepare dataset') {
|
|
agent {
|
|
dockerfile {
|
|
filename 'Dockerfile'
|
|
reuseNode true
|
|
}
|
|
}
|
|
|
|
steps {
|
|
sh "chmod +x ./get_dataset.py"
|
|
sh "python ./get_dataset.py ${params.KAGGLE_USERNAME} ${params.API_KEY}"
|
|
archiveArtifacts artifacts: 'dataset.csv,df_train.csv,df_test.csv', onlyIfSuccessful: true
|
|
}
|
|
}
|
|
}
|
|
}
|