Use temporary path for gopath

This commit is contained in:
Jan Dittberner 2017-08-27 21:25:47 +02:00
parent 9b07f3e538
commit 9398d90a38

14
Jenkinsfile vendored
View file

@ -3,7 +3,7 @@ pipeline {
agent any agent any
environment { environment {
GOPATH = "${pwd()}/gocode" GOPATH = "${pwd(tmp: true)}/gocode"
} }
stages { stages {
@ -11,14 +11,18 @@ pipeline {
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()}' '${GOPATH}/src/git.cacert.org/cacert-boardvoting'" sh "ln -s '${pwd()}' '${GOPATH}/src/git.cacert.org/cacert-boardvoting'"
sh "go get -u github.com/golang/dep/cmd/dep" dir(path: "${GOPATH}/src/git.cacert.org/cacert-boardvoting") {
sh "cd '${GOPATH}/src/git.cacert.org/cacert-boardvoting' ; ${GOPATH}/bin/dep ensure -v" sh "go get -u github.com/golang/dep/cmd/dep"
sh "${GOPATH}/bin/dep ensure -v"
}
} }
} }
stage('Build') { stage('Build') {
steps { steps {
sh 'make clean' dir(path: "${GOPATH}/src/git.cacert.org/cacert-boardvoting") {
sh 'make' sh 'make clean'
sh 'make'
}
} }
} }
stage('Create build output') { stage('Create build output') {