-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
32 lines (27 loc) · 912 Bytes
/
Jenkinsfile
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
31
32
node {
checkout scm
try {
stage 'Run unit/integration tests'
sh 'make test'
stage 'Build application artefacts'
sh 'make build'
stage 'Create release environment and run acceptance tests'
sh 'make release'
stage 'Tag and publish release image'
sh "make tag latest \$(git rev-parse --short HEAD) \$(git tag --points-at HEAD)"
sh "make buildtag master \$(git tag --points-at HEAD)"
withEnv(["DOCKER_USER=${DOCKER_USER}",
"DOCKER_PASSWORD=${DOCKER_PASSWORD}",
"DOCKER_EMAIL=${DOCKER_EMAIL}"]) {
sh "make login"
}
sh "make publish"
}
finally {
stage 'Collect test reports'
step([$class: 'JUnitResultArchiver', testResults: '**/reports/*.xml'])
stage 'Clean up'
sh 'make clean'
sh 'make logout'
}
}