2017-05-14 13:22:45 +00:00
|
|
|
#!groovy
|
|
|
|
pipeline {
|
|
|
|
agent any
|
|
|
|
|
|
|
|
environment {
|
2017-08-27 19:25:47 +00:00
|
|
|
GOPATH = "${pwd(tmp: true)}/gocode"
|
2017-05-14 13:22:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
stages {
|
|
|
|
stage('Fetch go dependencies') {
|
2017-08-27 19:43:40 +00:00
|
|
|
environment {
|
|
|
|
BUILDDIR = "${GOPATH}/src/git.cacert.org/cacert-boardvoting"
|
|
|
|
}
|
2017-05-14 13:22:45 +00:00
|
|
|
steps {
|
|
|
|
sh "rm -rf '${GOPATH}/src/git.cacert.org' ; mkdir -p '${GOPATH}/src/git.cacert.org'"
|
2017-08-27 19:42:25 +00:00
|
|
|
sh "ln -s '${pwd()}' '${BUILDDIR}'"
|
2017-08-27 19:48:10 +00:00
|
|
|
sh "cd '${BUILDDIR}' ; go get -u github.com/golang/dep/cmd/dep && '${GOPATH}/bin/dep' ensure -v"
|
2017-05-14 13:22:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Build') {
|
2017-08-27 19:43:40 +00:00
|
|
|
environment {
|
|
|
|
BUILDDIR = "${GOPATH}/src/git.cacert.org/cacert-boardvoting"
|
|
|
|
}
|
2017-05-14 13:22:45 +00:00
|
|
|
steps {
|
2017-08-27 20:43:13 +00:00
|
|
|
sh "cd '${BUILDDIR}' ; make clean && make BUILD='${env.BUILD_TAG}'"
|
2017-05-14 13:22:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Create build output') {
|
|
|
|
steps {
|
2018-03-29 20:04:03 +00:00
|
|
|
archiveArtifacts artifacts: 'cacert-boardvoting,config.yaml.example'
|
2017-05-14 13:22:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|