From e43d6ca0edef850532f55697d724ec794b906594 Mon Sep 17 00:00:00 2001 From: jakubknczny Date: Sat, 15 May 2021 14:11:08 +0200 Subject: [PATCH] fix params2 --- lab5/create/Jenkinsfile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lab5/create/Jenkinsfile b/lab5/create/Jenkinsfile index f6a795b..099cb46 100644 --- a/lab5/create/Jenkinsfile +++ b/lab5/create/Jenkinsfile @@ -14,17 +14,17 @@ pipeline { } stage('docker') { agent { - dockerfile { - filename 'Dockerfile' - args '-e KAGGLE_USERNAME=${params.KAGGLE_USERNAME} -e KAGGLE_KEY=${params.KAGGLE_KEY}' - } + dockerfile true } stages { stage('script') { steps { - sh ''' - chmod +x script.sh - ./script.sh''' + withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", + "KAGGLE_KEY=${params.KAGGLE_KEY}" ]) { + sh ''' + chmod +x script.sh + ./script.sh''' + } } } stage('archive artifact') {