add jenkinsfile

This commit is contained in:
Jakub Sokołowski 2018-06-28 14:56:54 +02:00
parent da11b8a3a9
commit df2480a589
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020

23
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,23 @@
node('linux') {
def image_name = 'statusteam/universal-links-handler'
def commit
def image
stage('Git Prep') {
checkout scm
commit = sh(returnStdout: true, script: 'git rev-parse --short HEAD').trim()
}
stage('Build') {
image = docker.build(image_name + ':' + commit)
}
stage('Publish') {
withDockerRegistry([
credentialsId: "dockerhub-statusteam-auto", url: ""
]) {
image.push()
image.push('latest')
}
}
}