summaryrefslogtreecommitdiff
path: root/Jenkinsfile
blob: 697015abad7f9ae495228d9762502de09c146f3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!groovy
pipeline {
    agent any

    environment {
        GOPATH = "${pwd()}/gocode"
    }

    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'"
                sh "go get -u github.com/golang/dep/cmd/dep"
                sh "cd '${GOPATH}/src/git.cacert.org/cacert-boardvoting' ; dep ensure -v"
            }
        }
        stage('Build') {
            steps {
                sh 'make clean'
                sh 'make'
            }
        }
        stage('Create build output') {
            steps {
                archiveArtifacts artifacts: 'cacert-boardvoting,templates/**,db/**,config.yaml.example,static/**'
            }
        }
    }
}