From 9874ca868800ba74dd533140fa83274f0a5cffe0 Mon Sep 17 00:00:00 2001 From: s444417 Date: Thu, 24 Mar 2022 22:50:12 +0100 Subject: [PATCH] env variable --- Jenkinsfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2145836..d8a4724 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -26,7 +26,11 @@ pipeline { stage("Shell Scripts") { steps { sh "chmod u+x ./startscript1.sh" - sh "KAGGLE_USERNAME=${KAGGLE_USERNAME} KAGGLE_KEY=${KAGGLE_KEY} CUTOFF=${CUTOFF} ./startscript1.sh" + withEnv([ + "KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", + "KAGGLE_KEY=${params.KAGGLE_KEY}" ]) { + sh "KAGGLE_USERNAME=${KAGGLE_USERNAME} KAGGLE_KEY=${KAGGLE_KEY} CUTOFF=${CUTOFF} ./startscript1.sh" + } archiveArtifacts 'data.txt' } }