From df2480a589b9aebde5a5342215c0d95fdaff71d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Thu, 28 Jun 2018 14:56:54 +0200 Subject: [PATCH] add jenkinsfile --- Jenkinsfile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..05b8874 --- /dev/null +++ b/Jenkinsfile @@ -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') + } + } +}