download kaggle dataset by bash script in Jenkinsfile

This commit is contained in:
Mateusz 2022-03-26 13:05:15 +01:00
parent b5288eefec
commit b38a9b9333
2 changed files with 19 additions and 2 deletions

20
Jenkinsfile vendored
View File

@ -1,5 +1,18 @@
pipeline {
agent any
parameters {
string (
defaultValue: 'wirus006',
description: 'Kaggle username',
name: 'KAGGLE_USERNAME',
trim: false
)
password (
defaultValue: 'c3323e37d3f91a0914d0172ef3c7c30c',
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
name: 'KAGGLE_KEY'
)
}
stages {
stage('Hello') {
steps {
@ -13,8 +26,11 @@ pipeline {
}
stage('Shell Script') {
steps {
sh "chmod +x -R ${env.WORKSPACE}"
sh './simple_init.sh'
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
sh "chmod +x -R ${env.WORKSPACE}"
sh './simple_init.sh'
}
}
}
}

View File

@ -1 +1,2 @@
echo 'test'
kaggle datasets download -d hakeem/atp-and-wta-tennis-data