cacert-boardvoting/Jenkinsfile

37 lines
1.1 KiB
Text
Raw Normal View History

#!groovy
pipeline {
agent any
environment {
2017-08-27 19:25:47 +00:00
GOPATH = "${pwd(tmp: true)}/gocode"
2018-03-29 20:12:09 +00:00
PATH = "${GOPATH}/bin:${PATH}"
}
stages {
stage('Fetch go dependencies') {
environment {
BUILDDIR = "${GOPATH}/src/git.cacert.org/cacert-boardvoting"
}
steps {
sh "rm -rf '${GOPATH}/src/git.cacert.org' ; mkdir -p '${GOPATH}/src/git.cacert.org'"
sh "ln -s '${pwd()}' '${BUILDDIR}'"
2018-03-29 20:12:09 +00:00
sh "cd '${BUILDDIR}' ; go get -u github.com/golang/dep/cmd/dep && dep ensure -v"
sh "go get -u github.com/shuLhan/go-bindata/go-bindata"
}
}
stage('Build') {
environment {
BUILDDIR = "${GOPATH}/src/git.cacert.org/cacert-boardvoting"
}
steps {
sh "cd '${BUILDDIR}' ; make clean && make BUILD='${env.BUILD_TAG}'"
}
}
stage('Create build output') {
steps {
archiveArtifacts artifacts: 'cacert-boardvoting,config.yaml.example'
}
}
}
}