Define target build directory environment variable
This commit is contained in:
parent
ebb15fc538
commit
3fb815f6f1
1 changed files with 7 additions and 4 deletions
11
Jenkinsfile
vendored
11
Jenkinsfile
vendored
|
@ -7,18 +7,21 @@ pipeline {
|
|||
}
|
||||
|
||||
stages {
|
||||
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()}' '${GOPATH}/src/git.cacert.org/cacert-boardvoting'"
|
||||
dir("${GOPATH}/src/git.cacert.org/cacert-boardvoting") {
|
||||
sh "go get -u github.com/golang/dep/cmd/dep && '${GOPATH}/bin/dep' ensure -v"
|
||||
sh "ln -s '${pwd()}' '${BUILDDIR}'"
|
||||
dir("${BUILDDIR}") {
|
||||
sh "pwd ; go get -u github.com/golang/dep/cmd/dep && '${GOPATH}/bin/dep' ensure -v"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Build') {
|
||||
steps {
|
||||
dir("${GOPATH}/src/git.cacert.org/cacert-boardvoting") {
|
||||
dir("${BUILDDIR}") {
|
||||
sh 'make clean && make'
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue