Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
daas
jwt-tokenissuer
Commits
e3d7d358
Commit
e3d7d358
authored
Apr 10, 2017
by
Morten Knutsen
Browse files
Initial attemt at Jenkinsfile.
parent
ecc23e39
Changes
1
Hide whitespace changes
Inline
Side-by-side
Jenkinsfile
0 → 100644
View file @
e3d7d358
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
)
{
env
.
VERSION_STRING
=
GIT_TAG
}
docker
.
image
(
'golang:1.8'
).
inside
{
stage
"test"
sh
"curl https://glide.sh/get | sh"
sh
"mv $GOPATH/src/github.com/UNINETT $GOPATH/src/github.com/uninett"
sh
"cd $GOPATH/src/github.com/uninett/jwt-tokenissuer"
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'
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment