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

9
Jenkinsfile vendored
View file

@ -7,10 +7,10 @@ pipeline {
} }
stages { stages {
environment {
BUILDDIR = "${GOPATH}/src/git.cacert.org/cacert-boardvoting"
}
stage('Fetch go dependencies') { stage('Fetch go dependencies') {
environment {
BUILDDIR = "${GOPATH}/src/git.cacert.org/cacert-boardvoting"
}
steps { steps {
sh "rm -rf '${GOPATH}/src/git.cacert.org' ; mkdir -p '${GOPATH}/src/git.cacert.org'" sh "rm -rf '${GOPATH}/src/git.cacert.org' ; mkdir -p '${GOPATH}/src/git.cacert.org'"
sh "ln -s '${pwd()}' '${BUILDDIR}'" sh "ln -s '${pwd()}' '${BUILDDIR}'"
@ -20,6 +20,9 @@ pipeline {
} }
} }
stage('Build') { stage('Build') {
environment {
BUILDDIR = "${GOPATH}/src/git.cacert.org/cacert-boardvoting"
}
steps { steps {
dir("${BUILDDIR}") { dir("${BUILDDIR}") {
sh 'make clean && make' sh 'make clean && make'