From 34cc98107df9ccf782eb7a3d023ad458af5657ff Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Thu, 8 Mar 2018 22:22:50 +0000 Subject: [PATCH] Only deploy when remote repo url is https --- Jenkinsfile.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile.groovy b/Jenkinsfile.groovy index 0e9f8ea..02c109f 100644 --- a/Jenkinsfile.groovy +++ b/Jenkinsfile.groovy @@ -64,7 +64,7 @@ pipeline { } } stage('Deploy') { - when { expression { (env.GIT_BRANCH == 'master') } } + when { expression { (env.GIT_BRANCH == 'master' && env.GIT_URL.startsWith('https://')) } } steps { withMaven(maven: 'maven 3.5.2', jdk: 'JDK 1.8') { sh "${mvn} deploy --activate-profiles release -DskipTests=true"