You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by kw...@apache.org on 2021/10/05 15:45:34 UTC

[jackrabbit-filevault] branch feature/asf-jenkinsfile created (now 5830fa8)

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

kwin pushed a change to branch feature/asf-jenkinsfile
in repository https://gitbox.apache.org/repos/asf/jackrabbit-filevault.git.


      at 5830fa8  JCRVLT-530 add Jenkinsfile

This branch includes the following new commits:

     new 5830fa8  JCRVLT-530 add Jenkinsfile

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[jackrabbit-filevault] 01/01: JCRVLT-530 add Jenkinsfile

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch feature/asf-jenkinsfile
in repository https://gitbox.apache.org/repos/asf/jackrabbit-filevault.git

commit 5830fa8bec5801c14f400b3f3a88ba08abbd6a9c
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Tue Oct 5 17:45:22 2021 +0200

    JCRVLT-530 add Jenkinsfile
---
 Jenkinsfile | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644
index 0000000..592098f
--- /dev/null
+++ b/Jenkinsfile
@@ -0,0 +1,54 @@
+#!/usr/bin/env groovy
+/**
+ * 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.
+ */
+
+properties([buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10'))])
+
+def build(String jdkLabel, String nodeLabel, b) {
+    stage("Build with JDK ${jdkLabel} on node with label '${nodeLabel}'") {
+        node(label: nodeLabel) {
+            timeout(60) {
+                checkout scm
+                // TODO: sonarqube
+                // always build with Java 11 (that is the minimum version supported: https://sonarcloud.io/documentation/appendices/end-of-support/)
+                withMaven(maven: 'maven_3_latest', 
+                          jdk: jdkLabel,
+                          publisherStrategy: 'EXPLICIT') {
+                          sh  "mvn -U clean verify"
+                }
+            }
+        }
+    }
+}
+
+def stagesFor(int[] jdkVersion, int mainJdkVersion, String[] nodeLabels, String mainNodeLabel) {
+    // https://cwiki.apache.org/confluence/display/INFRA/JDK+Installation+Matrix
+    def availableJDKs = [ 8: 'jdk_1.8_latest', 9: 'jdk_1.9_latest', 10: 'jdk_10_latest', 11: 'jdk_11_latest', 12: 'jdk_12_latest', 13: 'jdk_13_latest', 14: 'jdk_14_latest', 15: 'jdk_15_latest', 16: 'jdk_16_latest', 17: 'jdk_17_latest', 18: 'jdk_18_latest'];
+    def stageMap = [:]
+    for (nodeLabel in nodeLabels) {
+        for (jdkVersion in JdkVersions) {
+            boolean isMainBuild = jdkVersion == mainJdkVersion && nodeLabel == mainNodeLabel
+            stageMap[jdkVersion + nodeLabel] = { build(availableJDKs[jdkVersion], nodeLabel, isMainBuild) }
+        }
+    }
+    return stageMap
+}
+
+// https://cwiki.apache.org/confluence/display/INFRA/ci-builds.apache.org
+parallel stagesFor([8, 11, 17], 11, [ "ubuntu", "Windows"], "ubuntu")
\ No newline at end of file