-
Notifications
You must be signed in to change notification settings - Fork 2
/
Jenkinsfile
28 lines (26 loc) · 1.02 KB
/
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
pipeline {
agent any
options {
ansiColor('xterm')
}
stages {
stage('Docker build & publish') {
steps {
script {
dockerAuthoritativeImage = docker.build("docker.fg/flowguard/powerdns-authoritative", "./authoritative")
dockerRecursorImage = docker.build("docker.fg/flowguard/powerdns-recursor", "./recursor")
bn = env.BUILD_NUMBER
gitVersion = sh(script: 'git describe --tags --always', returnStdout: true).toString().trim()
currentBuild.displayName = "#${bn}:${gitVersion}"
if (env.BRANCH_NAME == "master") {
dockerAuthoritativeImage.push("latest")
dockerRecursorImage.push("latest")
} else {
dockerAuthoritativeImage.push(gitVersion)
dockerRecursorImage.push(gitVersion)
}
}
}
}
}
}