jenkins: fix syntax
This commit is contained in:
parent
4a1311b214
commit
b2eda3252a
1 changed files with 2 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
||||||
final String gitRepoUrl = 'git@github.com:kemitix/mon.git'
|
final String gitRepoUrl = 'git@github.com:kemitix/mon.git'
|
||||||
final String mvn = "mvn --batch-mode --update-snapshots"
|
final String mvn = "mvn --batch-mode --update-snapshots"
|
||||||
|
def pom = readMavenPom file: 'pom.xml'
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
|
@ -11,9 +12,8 @@ pipeline {
|
||||||
}
|
}
|
||||||
stage('no SNAPSHOT in master') {
|
stage('no SNAPSHOT in master') {
|
||||||
// checks that the pom version is not a snapshot when the current branch is 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 {
|
steps {
|
||||||
def pom = readMavenPom file: 'pom.xml'
|
|
||||||
if ((pom.version).contains("SNAPSHOT")) {
|
if ((pom.version).contains("SNAPSHOT")) {
|
||||||
error("Build failed because SNAPSHOT version: ${pom.groupId}:${pom.artifactId}:${pom.version}")
|
error("Build failed because SNAPSHOT version: ${pom.groupId}:${pom.artifactId}:${pom.version}")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue