From 1d993154e408bd3ddf023cddf490e3c43acda221 Mon Sep 17 00:00:00 2001 From: Daniel Porzucek <dporzucek@man.poznan.pl> Date: Wed, 20 Mar 2024 15:04:37 +0100 Subject: [PATCH] added properties --- Jenkinsfile | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5ba00ff..88f75c8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,10 +1,25 @@ pipeline { agent any + properties { + string( + defaultValue: 'worldwidepaniel', + 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' + ) + } stages { - stage('Checkout') { + stage('Download data') { steps { - checkout scm - sh 'ls -las' + withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", + "KAGGLE_KEY=${params.KAGGLE_KEY}" ]) { + sh './data_download.sh' + } } } }