You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2018/02/22 12:34:32 UTC
[incubator-plc4x] branch master updated: split maven command into
several stages
This is an automated email from the ASF dual-hosted git repository.
sruehl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git
The following commit(s) were added to refs/heads/master by this push:
new 2fb3dcd split maven command into several stages
2fb3dcd is described below
commit 2fb3dcdd2fe41ebb45a810099f1eff5dc88f368c
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Thu Feb 22 13:34:29 2018 +0100
split maven command into several stages
---
Jenkinsfile | 39 ++++++++++++++++++++++++++++++++++++---
1 file changed, 36 insertions(+), 3 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index 758c53e..8e45d8f 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -27,6 +27,9 @@ pipeline {
environment {
PLC4X_BUILD = true
+ JENKINS_PROFILE = 'jenkins-build'
+ MVN_LOCAL_REPO_OPT = '-Dmaven.repo.local=.repository'
+ MVN_TEST_FAIL_IGNORE = '-Dmaven.test.failure.ignore=true'
}
tools {
@@ -68,7 +71,7 @@ pipeline {
}
steps {
echo 'Building'
- sh "mvn -Pjenkins-build -Dmaven.test.failure.ignore=true -Dmaven.repo.local=.repository clean install"
+ sh 'mvn -P${JENKINS_PROFILE} ${MVN_TEST_FAIL_IGNORE} ${MVN_LOCAL_REPO_OPT} clean install'
}
post {
always {
@@ -84,7 +87,7 @@ pipeline {
}
steps {
echo 'Building'
- sh "mvn -Pjenkins-build -Dmaven.test.failure.ignore=true clean deploy sonar:sonar site:site"
+ sh 'mvn -P${JENKINS_PROFILE} ${MVN_TEST_FAIL_IGNORE} clean install'
}
post {
always {
@@ -94,13 +97,43 @@ pipeline {
}
}
+ stage('Code Quality') {
+ when {
+ branch 'master'
+ }
+ steps {
+ echo 'Building'
+ sh 'mvn -P${JENKINS_PROFILE} sonar:sonar'
+ }
+ }
+
+ stage('Deploy') {
+ when {
+ branch 'master'
+ }
+ steps {
+ echo 'Building'
+ sh 'mvn -P${JENKINS_PROFILE} deploy'
+ }
+ }
+
+ stage('Build site') {
+ when {
+ branch 'master'
+ }
+ steps {
+ echo 'Building'
+ sh 'mvn -P${JENKINS_PROFILE} site:site'
+ }
+ }
+
stage('Stage Site') {
when {
branch 'master'
}
steps {
echo 'Staging Site'
- sh "mvn -Pjenkins-build -Dmaven.repo.local=.repository site:stage"
+ sh 'mvn -P${JENKINS_PROFILE} ${MVN_LOCAL_REPO_OPT} site:stage'
}
}
--
To stop receiving notification emails like this one, please contact
sruehl@apache.org.