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') {
|
|
|
|
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'"
|
2017-08-27 19:37:26 +00:00
|
|
|
dir("${GOPATH}/src/git.cacert.org/cacert-boardvoting") {
|
|
|
|
sh "go get -u github.com/golang/dep/cmd/dep && '${GOPATH}/bin/dep' ensure -v"
|
2017-08-27 19:25:47 +00:00
|
|
|
}
|
2017-05-14 13:22:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Build') {
|
|
|
|
steps {
|
2017-08-27 19:37:26 +00:00
|
|
|
dir("${GOPATH}/src/git.cacert.org/cacert-boardvoting") {
|
|
|
|
sh 'make clean && make'
|
2017-08-27 19:25:47 +00:00
|
|
|
}
|
2017-05-14 13:22:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Create build output') {
|
|
|
|
steps {
|
|
|
|
archiveArtifacts artifacts: 'cacert-boardvoting,templates/**,db/**,config.yaml.example,static/**'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|