a99c722fe16523c14e4523cfe837de92f4d40555
[cacert-boardvoting.git] / Jenkinsfile
1 #!groovy
2 pipeline {
3 agent any
4
5 environment {
6 GOPATH = "${pwd(tmp: true)}/gocode"
7 }
8
9 stages {
10 stage('Fetch go dependencies') {
11 steps {
12 sh "rm -rf '${GOPATH}/src/git.cacert.org' ; mkdir -p '${GOPATH}/src/git.cacert.org'"
13 sh "ln -s '${pwd()}' '${GOPATH}/src/git.cacert.org/cacert-boardvoting'"
14 dir("${GOPATH}/src/git.cacert.org/cacert-boardvoting") {
15 sh "go get -u github.com/golang/dep/cmd/dep && '${GOPATH}/bin/dep' ensure -v"
16 }
17 }
18 }
19 stage('Build') {
20 steps {
21 dir("${GOPATH}/src/git.cacert.org/cacert-boardvoting") {
22 sh 'make clean && make'
23 }
24 }
25 }
26 stage('Create build output') {
27 steps {
28 archiveArtifacts artifacts: 'cacert-boardvoting,templates/**,db/**,config.yaml.example,static/**'
29 }
30 }
31 }
32 }