From 3b4e88f9ca1b5559995f187de5c72c75c66dc392 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Miko=C5=82ajski?= Date: Fri, 14 Apr 2023 03:22:58 +0200 Subject: [PATCH] Update 'Jenkinsfile' --- Jenkinsfile | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9863595..ebd6b19 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -2,12 +2,17 @@ pipeline { agent any //Definijuemy parametry, które będzie można podać podczas wywoływania zadania parameters { - string ( - defaultValue: 'Hellllo World!', - description: 'Tekst, którym chcesz przywitać świat', - name: 'INPUT_TEXT', - trim: false - ) + string( + defaultValue: 'login', + 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: Check out from version control') { @@ -18,7 +23,9 @@ pipeline { } stage('sh: Shell Script') { steps { - sh 'python3 create_dataset.py' + withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", + "KAGGLE_KEY=${params.KAGGLE_KEY}" ]) { + sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME' } } }