You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by de...@apache.org on 2020/08/16 19:08:58 UTC

[myfaces-tobago] branch master updated: add a Jenkinsfile

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

deki pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git


The following commit(s) were added to refs/heads/master by this push:
     new fd0f531  add a Jenkinsfile
fd0f531 is described below

commit fd0f531741a1e9cc4d5a1e3980d892fefe0420d0
Author: Dennis Kieselhorst <ma...@dekies.de>
AuthorDate: Sun Aug 16 21:08:44 2020 +0200

    add a Jenkinsfile
---
 Jenkinsfile | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 72 insertions(+)

diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644
index 0000000..b02bef2
--- /dev/null
+++ b/Jenkinsfile
@@ -0,0 +1,72 @@
+/*
+ * 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.
+ */
+
+pipeline {
+    agent {
+        label 'ubuntu'
+    }
+
+    options {
+        disableConcurrentBuilds()
+        buildDiscarder(logRotator(numToKeepStr: '5'))
+        timeout(time: 2, unit: 'HOURS')
+        timestamps()
+        quietPeriod(30)
+    }
+
+    triggers {
+        cron('@daily')
+        pollSCM('@hourly')
+    }
+
+    stages {
+        stage('Prepare') {
+            matrix {
+                agent {
+                  label 'ubuntu'
+                }
+                axes {
+                    axis {
+                        name 'JAVA_VERSION'
+                        values 'JDK 1.8 (latest)', 'JDK 11 (latest)'
+                    }
+                }
+
+                tools {
+                    maven "Maven (latest)"
+                    jdk "${JAVA_VERSION}"
+                }
+
+                stages {
+                    stage('BuildAndTest') {
+                        steps {
+                            sh "mvn clean deploy checkstyle:check apache-rat:check animal-sniffer:check dependency-check:check  -Pgenerate-assembly -Ptomcat"
+                        }
+                        post {
+                            always {
+                               junit(testResults: '**/surefire-reports/*.xml', allowEmptyResults: true)
+                               junit(testResults: '**/failsafe-reports/*.xml', allowEmptyResults: true)
+                               archiveArtifacts '**/target/*.jar'
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+}
\ No newline at end of file