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/02/18 18:06:32 UTC

[camel] branch master updated: CAMEL-11930: create initial Jenkinsfile

This is an automated email from the ASF dual-hosted git repository.

zregvart pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 7a778eb  CAMEL-11930: create initial Jenkinsfile
7a778eb is described below

commit 7a778ebd991cc8c6560fff795aea9a9680f3ba38
Author: Zoran Regvart <zr...@apache.org>
AuthorDate: Sun Feb 18 19:06:31 2018 +0100

    CAMEL-11930: create initial Jenkinsfile
    
    This adds initial `Jenkinsfile` using declarative pipeline syntax.
---
 Jenkinsfile | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 76 insertions(+)

diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644
index 0000000..d595718
--- /dev/null
+++ b/Jenkinsfile
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+def MAVEN_PARAMS = '-B -e -fae -V -Dmaven.repo.local=/home/jenkins/jenkins-slave/maven-repositories/0'
+
+pipeline {
+
+    agent {
+        label 'ubuntu'
+    }
+
+    tools {
+        jdk 'JDK 1.8 (latest)'
+    }
+
+    options {
+        buildDiscarder(
+            logRotator(artifactNumToKeepStr: '5', numToKeepStr: '10')
+        )
+    }
+
+    stages {
+
+        stage('Checks') {
+            steps {
+                sh "./mvnw $MAVEN_PARAMS -Psourcecheck checkstyle:check"
+            }
+            post {
+                always {
+                    checkstyle pattern: '**/checkstyle-result.xml', canRunOnFailed: true
+                }
+            }
+        }
+
+        stage('Build') {
+            steps {
+                sh "./mvnw $MAVEN_PARAMS -Dnoassembly -Dmaven.test.skip.exec=true -Dmaven.install.skip=true clean install"
+            }
+        }
+
+        stage('Test') {
+            steps {
+                sh "./mvnw $MAVEN_PARAMS -Pintegration -Dnoassembly test"
+            }
+            post {
+                always {
+                    junit '**/target/surefire-reports/*.xml'
+                    junit '**/target/failsafe-reports/*.xml'
+                }
+            }
+        }
+
+        stage('Deploy') {
+            steps {
+                sh "./mvnw $MAVEN_PARAMS -Pdeploy -Dnoassembly -Dmaven.test.skip.exec=true install"
+            }
+        }
+    }
+}
+

-- 
To stop receiving notification emails like this one, please contact
zregvart@apache.org.