Move version check to deploy stage
This should hopefully guarantee availability of maven and jdk tools by
this point. Otherwise, we'll need full paths as a workaround.
diff --git a/chainsaw/Jenkinsfile b/chainsaw/Jenkinsfile
index ca6c205..6778251 100644
--- a/chainsaw/Jenkinsfile
+++ b/chainsaw/Jenkinsfile
@@ -34,9 +34,6 @@
jdk 'jdk_1.8_latest'
maven 'maven_3_latest'
}
- environment {
- PROJECT_VERSION = "${sh(returnStdout: true, script: 'mvn help:evaluate -Dexpression=project.version -q -DforceStdout')}"
- }
stages {
stage('Build') {
steps {
@@ -56,7 +53,7 @@
when {
allOf {
branch 'master'
- expression { env.PROJECT_VERSION.endsWith('-SNAPSHOT') }
+ expression { sh(returnStdout: true, script: 'mvn help:evaluate -Dexpression=project.version -q -DforceStdout').endsWith('-SNAPSHOT') }
}
}
steps {