Use dep in Jenkinsfile
[cacert-boardvoting.git] / Jenkinsfile
1 #!groovy
2 pipeline {
3 agent any
4
5 environment {
6 GOPATH = "${pwd()}/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 sh "go get -u github.com/golang/dep/cmd/dep"
15 sh "cd '${GOPATH}/src/git.cacert.org/cacert-boardvoting' ; dep ensure -v"
16 }
17 }
18 stage('Build') {
19 steps {
20 sh 'make clean'
21 sh 'make'
22 }
23 }
24 stage('Create build output') {
25 steps {
26 archiveArtifacts artifacts: 'cacert-boardvoting,templates/**,db/**,config.yaml.example,static/**'
27 }
28 }
29 }
30 }