Move environment declaration to stage blocks
This commit is contained in:
parent
3fb815f6f1
commit
06e0a52737
1 changed files with 6 additions and 3 deletions
5
Jenkinsfile
vendored
5
Jenkinsfile
vendored
|
@ -7,10 +7,10 @@ pipeline {
|
||||||
}
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
|
stage('Fetch go dependencies') {
|
||||||
environment {
|
environment {
|
||||||
BUILDDIR = "${GOPATH}/src/git.cacert.org/cacert-boardvoting"
|
BUILDDIR = "${GOPATH}/src/git.cacert.org/cacert-boardvoting"
|
||||||
}
|
}
|
||||||
stage('Fetch go dependencies') {
|
|
||||||
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'
|
||||||
|
|
Loading…
Reference in a new issue