You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by zr...@apache.org on 2018/07/17 10:02:57 UTC
[camel] 06/06: Test website Jenkinsfile
This is an automated email from the ASF dual-hosted git repository.
zregvart pushed a commit to branch website
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 058ed0d043741acea65aee46c3b0956a2ef9796a
Author: Zoran Regvart <zr...@apache.org>
AuthorDate: Tue Jul 17 12:01:34 2018 +0200
Test website Jenkinsfile
---
Jenkinsfile | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 71 insertions(+)
diff --git a/Jenkinsfile b/Jenkinsfile
index a34301d..95fe049 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -17,6 +17,7 @@
* under the License.
*/
+def BUILD_WEBSITE = !'false'.equalsIgnoreCase(env.BUILD_WEBSITE)
def LOCAL_REPOSITORY = env.LOCAL_REPOSITORY ?: '/home/jenkins/jenkins-slave/maven-repositories/0'
def AGENT_LABEL = env.AGENT_LABEL ?: 'ubuntu'
def JDK_NAME = env.JDK_NAME ?: 'JDK 1.8 (latest)'
@@ -42,10 +43,51 @@ pipeline {
stages {
+ stage('Website') {
+ when {
+ expression { BUILD_WEBSITE }
+ anyOf {
+ changeset "**/*.adoc"
+ changeset "**/*.html"
+ changeset "**/*.md"
+ changeset "**/*.js"
+ }
+ }
+
+ agent 'git-websites'
+
+ options {
+ skipDefaultCheckout()
+ }
+
+ steps {
+ dir('camel') {
+ checkout scm
+
+ sh "./mvnw -U -B -V -f camel-website"
+ }
+
+ dir('site') {
+ checkout [ branches: [name: 'asf-site'] ]
+ sh "cp -R ../camel/camel-website/public/* ."
+ sh "git add ."
+ }
+ }
+ }
+
stage('Build & Deploy') {
when {
branch 'master'
+ not {
+ anyOf {
+ changeset "**/*.adoc"
+ changeset "**/*.html"
+ changeset "**/*.md"
+ changeset "**/*.js"
+ }
+ }
}
+
steps {
sh "./mvnw $MAVEN_PARAMS -Dmaven.test.skip.exec=true clean deploy"
}
@@ -55,14 +97,32 @@ pipeline {
when {
not {
branch 'master'
+ anyOf {
+ changeset "**/*.adoc"
+ changeset "**/*.html"
+ changeset "**/*.md"
+ changeset "**/*.js"
+ }
}
}
+
steps {
sh "./mvnw $MAVEN_PARAMS -Dmaven.test.skip.exec=true clean install"
}
}
stage('Checks') {
+ when {
+ not {
+ anyOf {
+ changeset "**/*.adoc"
+ changeset "**/*.html"
+ changeset "**/*.md"
+ changeset "**/*.js"
+ }
+ }
+ }
+
steps {
sh "./mvnw $MAVEN_PARAMS -Psourcecheck -Dcheckstyle.failOnViolation=false checkstyle:check"
}
@@ -74,6 +134,17 @@ pipeline {
}
stage('Test') {
+ when {
+ not {
+ anyOf {
+ changeset "**/*.adoc"
+ changeset "**/*.html"
+ changeset "**/*.md"
+ changeset "**/*.js"
+ }
+ }
+ }
+
steps {
sh "./mvnw $MAVEN_PARAMS -Dmaven.test.failure.ignore=true test"
}