From b2eda3252aab6b4231799633763ace5a428583c4 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 3 Mar 2018 08:53:41 +0000 Subject: [PATCH] jenkins: fix syntax --- Jenkinsfile.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile.groovy b/Jenkinsfile.groovy index d66f124..d272c7c 100644 --- a/Jenkinsfile.groovy +++ b/Jenkinsfile.groovy @@ -1,5 +1,6 @@ final String gitRepoUrl = 'git@github.com:kemitix/mon.git' final String mvn = "mvn --batch-mode --update-snapshots" +def pom = readMavenPom file: 'pom.xml' pipeline { agent any @@ -11,9 +12,8 @@ pipeline { } stage('no SNAPSHOT in master') { // checks that the pom version is not a snapshot when the current branch is master - when { expression (env.GIT_BRANCH == 'master') } + when { expression { (env.GIT_BRANCH == 'master') } } steps { - def pom = readMavenPom file: 'pom.xml' if ((pom.version).contains("SNAPSHOT")) { error("Build failed because SNAPSHOT version: ${pom.groupId}:${pom.artifactId}:${pom.version}") }