32 lines
989 B
Groovy
32 lines
989 B
Groovy
#!groovy
|
|
pipeline {
|
|
agent any
|
|
|
|
environment {
|
|
GOPATH = "${pwd(tmp: true)}/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'"
|
|
dir("${GOPATH}/src/git.cacert.org/cacert-boardvoting") {
|
|
sh "go get -u github.com/golang/dep/cmd/dep && '${GOPATH}/bin/dep' ensure -v"
|
|
}
|
|
}
|
|
}
|
|
stage('Build') {
|
|
steps {
|
|
dir("${GOPATH}/src/git.cacert.org/cacert-boardvoting") {
|
|
sh 'make clean && make'
|
|
}
|
|
}
|
|
}
|
|
stage('Create build output') {
|
|
steps {
|
|
archiveArtifacts artifacts: 'cacert-boardvoting,templates/**,db/**,config.yaml.example,static/**'
|
|
}
|
|
}
|
|
}
|
|
}
|