Use temporary path for gopath
This commit is contained in:
parent
9b07f3e538
commit
9398d90a38
1 changed files with 9 additions and 5 deletions
8
Jenkinsfile
vendored
8
Jenkinsfile
vendored
|
@ -3,7 +3,7 @@ pipeline {
|
|||
agent any
|
||||
|
||||
environment {
|
||||
GOPATH = "${pwd()}/gocode"
|
||||
GOPATH = "${pwd(tmp: true)}/gocode"
|
||||
}
|
||||
|
||||
stages {
|
||||
|
@ -11,16 +11,20 @@ pipeline {
|
|||
steps {
|
||||
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'"
|
||||
dir(path: "${GOPATH}/src/git.cacert.org/cacert-boardvoting") {
|
||||
sh "go get -u github.com/golang/dep/cmd/dep"
|
||||
sh "cd '${GOPATH}/src/git.cacert.org/cacert-boardvoting' ; ${GOPATH}/bin/dep ensure -v"
|
||||
sh "${GOPATH}/bin/dep ensure -v"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Build') {
|
||||
steps {
|
||||
dir(path: "${GOPATH}/src/git.cacert.org/cacert-boardvoting") {
|
||||
sh 'make clean'
|
||||
sh 'make'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Create build output') {
|
||||
steps {
|
||||
archiveArtifacts artifacts: 'cacert-boardvoting,templates/**,db/**,config.yaml.example,static/**'
|
||||
|
|
Loading…
Reference in a new issue