2022-03-26 15:36:44 +01:00
|
|
|
pipeline {
|
|
|
|
agent any
|
|
|
|
parameters {
|
|
|
|
string(
|
|
|
|
defaultValue:'mateuszogrodowczyk',
|
|
|
|
description: 'Kaggle username',
|
2022-03-26 15:48:09 +01:00
|
|
|
name: 'KAGGLE_USERNAME',
|
2022-03-26 15:49:45 +01:00
|
|
|
trim: false
|
|
|
|
)
|
2022-03-26 15:36:44 +01:00
|
|
|
password(
|
|
|
|
defaultValue: '',
|
|
|
|
description: 'Kaggle access token retrieved from kaggle.json file - https://github.com/Kaggle/kaggle-api#api-credentials',
|
|
|
|
name: 'KAGGLE_KEY'
|
|
|
|
)
|
|
|
|
}
|
|
|
|
environment {
|
|
|
|
KAGGLE_USERNAME="$params.KAGGLE_USERNAME"
|
|
|
|
KAGGLE_KEY="$params.KAGGLE_KEY"
|
|
|
|
}
|
|
|
|
stages {
|
|
|
|
stage('Install depends.') {
|
|
|
|
steps {
|
|
|
|
sh "pip install --user -r requirements.txt"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Prepare dataset') {
|
|
|
|
steps {
|
|
|
|
script {
|
|
|
|
withEnv([
|
|
|
|
"KAGGLE_USERNAME={$params.KAGGLE_USERNAME}",
|
|
|
|
"KAGGLE_KEY={$params.KAGGLE_KEY}"
|
|
|
|
])
|
|
|
|
sh 'echo Welcome: $KAGGLE_USERNAME'
|
|
|
|
sh 'kaggle datasets list'
|
|
|
|
}
|
2022-03-26 15:54:14 +01:00
|
|
|
sh "chmod u+x ./load_data.sh"
|
|
|
|
sh "./load_data.sh"
|
2022-03-26 15:36:44 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|