Move environment declaration to stage blocks

This commit is contained in:
Jan Dittberner 2017-08-27 21:43:40 +02:00
parent 3fb815f6f1
commit 06e0a52737

5
Jenkinsfile vendored
View file

@ -7,10 +7,10 @@ pipeline {
}
stages {
stage('Fetch go dependencies') {
environment {
BUILDDIR = "${GOPATH}/src/git.cacert.org/cacert-boardvoting"
}
stage('Fetch go dependencies') {
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'