From c4f1467ba51bddfe294e27fe7c77918db5e461c9 Mon Sep 17 00:00:00 2001 From: Viktor Date: Tue, 15 Aug 2017 19:36:32 +0200 Subject: [PATCH] Jenkinsfile --- Jenkinsfile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ebeae56..0a53d77 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -12,16 +12,11 @@ pipeline { stage("checkout") { steps { script { - echo "111" def props = readProperties file: "/run/secrets/cluster-info.properties" - echo "222" env.HOST_IP = props.hostIp - echo "333" env.DOCKER_HUB_USER = props.dockerHubUser - echo "444" } checkout scm - echo "555" } } stage("build") { @@ -35,11 +30,17 @@ pipeline { } } stage("release") { + when { + branch "master" + } steps { dockerRelease("go-demo-2", env.DOCKER_HUB_USER) } } stage("deploy") { + when { + branch "master" + } agent { label "prod" }