Skip to content

Commit

Permalink
jenkins file added
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Pravda committed Sep 22, 2021
1 parent 4cbc6ef commit f94458f
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
pipeline {
agent any
options {
ansiColor('xterm')
}
stages {
stage('Docker build & publish') {
steps {
script {
dockerImage = docker.build "docker.fg/flowguard/fluent"

bn = env.BUILD_NUMBER
gitVersion = sh(script: 'git describe --tags --always', returnStdout: true).toString().trim()
currentBuild.displayName = "#${bn}:${gitVersion}"

if (env.BRANCH_NAME == "master") {
dockerImage.push("latest")
} else {
dockerImage.push(gitVersion)
}
}
}
}
}
}

0 comments on commit f94458f

Please sign in to comment.