Commit e3d7d358 authored by Morten Knutsen's avatar Morten Knutsen
Browse files

Initial attemt at Jenkinsfile.

parent ecc23e39
node {
checkout scm
env.VERSION_STRING = "0.01-devel-${env.BUILD_ID}"
GIT_TAG = sh(returnStdout: true, script: "git tag --sort version:refname | tail -1").trim()
if(GIT_TAG) {
docker.image('golang:1.8').inside {
stage "test"
sh "curl | sh"
sh "mv $GOPATH/src/ $GOPATH/src/"
sh "cd $GOPATH/src/"
sh "glide install"
sh "make test"
stage "build"
sh "make build"
stash includes: 'dist/linux-amd64/jwt-tokenissuer', name: 'binary'
docker.image('cdrx/fpm-debian:8').inside {
stage "package"
unstash 'binary'
sh "mv jwt-tokenissuer /src/"
sh "fpm -s dir /src=/opt/jwt-tokenissuer -t deb -n jwt-tokenissuer -v ${env.VERSION_STRING}"
archive includes: '*.deb'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment