summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Dittberner <jan@dittberner.info>2017-08-27 21:42:25 +0200
committerJan Dittberner <jan@dittberner.info>2017-08-27 21:42:25 +0200
commit3fb815f6f100bb8ce940e7c333401fcaf43bc7a8 (patch)
treeb3b70dc804839507b559ef72a7dfe9201aa49f21
parentebb15fc53888035580af51e0fb3ce46dbc6205db (diff)
downloadcacert-boardvoting-3fb815f6f100bb8ce940e7c333401fcaf43bc7a8.tar.gz
cacert-boardvoting-3fb815f6f100bb8ce940e7c333401fcaf43bc7a8.tar.xz
cacert-boardvoting-3fb815f6f100bb8ce940e7c333401fcaf43bc7a8.zip
Define target build directory environment variable
-rw-r--r--Jenkinsfile11
1 files changed, 7 insertions, 4 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
index a99c722..6e97b0e 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -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'
}
}