From 4c80cc0902aea017721d6bd52028ce4dd03adb5b Mon Sep 17 00:00:00 2001 From: patrycjalazna Date: Sun, 28 Mar 2021 14:48:28 +0200 Subject: [PATCH] kaggle token added --- Jenkinsfile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 1a0f9e9..1c0e660 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,6 +1,26 @@ pipeline { agent any + parameters {[ + string ( + defaultValue: '500', + description: 'Liczba wierszy do odcięcia od datasetu', + name: 'CUTOFF', + trim: false + ), + string( + defaultValue: 'yerbamate', + description: 'Kaggle username', + name: 'KAGGLE_USERNAME', + trim: false + ), + password( + defaultValue: '', + description: 'Kaggle token', + name: 'KAGGLE_KEY' + )] + } + stages { stage('checkout: Check out from version control') { steps { @@ -10,9 +30,13 @@ pipeline { } stage('sh: Shell Script') { steps { + withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", + "KAGGLE_KEY=${params.KAGGLE_KEY}" ]) { + sh 'echo KAGGLE_USERNAME: $KAGGLE_USERNAME' sh 'chmod +x avocado-preprocessing.sh' sh 'chmod +x ./avocado-preprocessing.sh' sh './avocado-preprocessing.sh ${CUTOFF}' + } } } stage('archiveArtifacts') {