From 06e0a527379fea9887bfcab62384733e01b5b267 Mon Sep 17 00:00:00 2001 From: Jan Dittberner Date: Sun, 27 Aug 2017 21:43:40 +0200 Subject: [PATCH] Move environment declaration to stage blocks --- Jenkinsfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6e97b0e..ba5ea4d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -7,10 +7,10 @@ pipeline { } stages { - environment { - BUILDDIR = "${GOPATH}/src/git.cacert.org/cacert-boardvoting" - } stage('Fetch go dependencies') { + environment { + BUILDDIR = "${GOPATH}/src/git.cacert.org/cacert-boardvoting" + } steps { sh "rm -rf '${GOPATH}/src/git.cacert.org' ; mkdir -p '${GOPATH}/src/git.cacert.org'" sh "ln -s '${pwd()}' '${BUILDDIR}'" @@ -20,6 +20,9 @@ pipeline { } } stage('Build') { + environment { + BUILDDIR = "${GOPATH}/src/git.cacert.org/cacert-boardvoting" + } steps { dir("${BUILDDIR}") { sh 'make clean && make'