2017-05-14 13:22:45 +00:00
|
|
|
#!groovy
|
|
|
|
pipeline {
|
|
|
|
agent any
|
|
|
|
|
|
|
|
environment {
|
|
|
|
GOPATH = "${pwd()}/gocode"
|
2017-08-27 14:06:03 +00:00
|
|
|
PATH = "${pwd()}/gocode/bin:${env.PATH}"
|
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 13:56:23 +00:00
|
|
|
sh "go get -u github.com/golang/dep/cmd/dep"
|
|
|
|
sh "cd '${GOPATH}/src/git.cacert.org/cacert-boardvoting' ; dep ensure -v"
|
2017-05-14 13:22:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Build') {
|
|
|
|
steps {
|
|
|
|
sh 'make clean'
|
|
|
|
sh 'make'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Create build output') {
|
|
|
|
steps {
|
|
|
|
archiveArtifacts artifacts: 'cacert-boardvoting,templates/**,db/**,config.yaml.example,static/**'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|