55 lines
1.6 KiB
Groovy
55 lines
1.6 KiB
Groovy
pipeline {
|
|
agent any
|
|
parameters {
|
|
string(
|
|
defaultValue: 'wojciechbatruszewicz',
|
|
description: 'Kaggle username',
|
|
name: 'KAGGLE_USERNAME',
|
|
trim: false
|
|
)
|
|
password(
|
|
defaultValue: '',
|
|
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
|
|
name: 'KAGGLE_KEY'
|
|
)
|
|
string(
|
|
defaultValue: '50',
|
|
description: 'dataset cutoff',
|
|
name: 'CUTOFF',
|
|
trim: false
|
|
)
|
|
}
|
|
stages {
|
|
stage('Download dataset') {
|
|
steps {
|
|
checkout scm
|
|
dir ('./createDataset') {
|
|
sh 'ls -l'
|
|
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
|
|
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
|
|
// sh 'chmod +x ./datasetScript.sh'
|
|
// sh './datasetScript.sh'
|
|
sh 'kaggle datasets download -d rishikeshkonapure/home-loan-approval'
|
|
sh 'unzip -o home-loan-approval.zip'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
stage('Docker') {
|
|
steps {
|
|
def dockerImage = docker.build("docker-iamge", "./docker")
|
|
dockerImage.inside {
|
|
sh 'ls -l'
|
|
}
|
|
}
|
|
}
|
|
// stage('Archive file') {
|
|
// steps {
|
|
// dir ('./createDataset') {
|
|
// archiveArtifacts artifacts: 'loan_sanction_shuffled.csv', fingerprint: true\
|
|
// }
|
|
// }
|
|
// }
|
|
}
|
|
}
|