Ignore count of applied migrations from migrate.Exec
[cacert-boardvoting.git] / Jenkinsfile
1 #!groovy
2 pipeline {
3 agent any
4
5 environment {
6 GOPATH = "${pwd(tmp: true)}/gocode"
7 PATH = "${GOPATH}/bin:${PATH}"
8 }
9
10 stages {
11 stage('Fetch go dependencies') {
12 environment {
13 BUILDDIR = "${GOPATH}/src/git.cacert.org/cacert-boardvoting"
14 }
15 steps {
16 sh "rm -rf '${GOPATH}/src/git.cacert.org' ; mkdir -p '${GOPATH}/src/git.cacert.org'"
17 sh "ln -s '${pwd()}' '${BUILDDIR}'"
18 sh "cd '${BUILDDIR}' ; go get -u github.com/golang/dep/cmd/dep && dep ensure -v"
19 sh "go get -u github.com/shuLhan/go-bindata/go-bindata"
20 }
21 }
22 stage('Build') {
23 environment {
24 BUILDDIR = "${GOPATH}/src/git.cacert.org/cacert-boardvoting"
25 }
26 steps {
27 sh "cd '${BUILDDIR}' ; make clean && make BUILD='${env.BUILD_TAG}'"
28 }
29 }
30 stage('Create build output') {
31 steps {
32 archiveArtifacts artifacts: 'cacert-boardvoting,config.yaml.example'
33 }
34 }
35 }
36 }