ium_z487179/createDataset/Jenkinsfile

55 lines
1.6 KiB
Plaintext
Raw Normal View History

2023-04-14 18:51:14 +02:00
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 {
2023-04-20 19:37:30 +02:00
stage('Download dataset') {
2023-04-14 18:51:14 +02:00
steps {
checkout scm
2023-04-14 19:24:34 +02:00
dir ('./createDataset') {
sh 'ls -l'
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
2023-04-20 19:37:30 +02:00
// sh 'chmod +x ./datasetScript.sh'
// sh './datasetScript.sh'
sh 'kaggle datasets download -d rishikeshkonapure/home-loan-approval'
sh 'unzip -o home-loan-approval.zip'
2023-04-14 19:24:34 +02:00
}
2023-04-14 18:51:14 +02:00
}
}
}
2023-04-20 19:37:30 +02:00
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\
// }
// }
// }
2023-04-14 18:51:14 +02:00
}
}