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 2022/07/05 07:00:58 UTC

[jackrabbit-filevault-jenkins-lib] branch feature/add-sanity-check updated (b3ab6de -> 81c8da7)

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

kwin pushed a change to branch feature/add-sanity-check
in repository https://gitbox.apache.org/repos/asf/jackrabbit-filevault-jenkins-lib.git


 discard b3ab6de  add sanity check step
     new 81c8da7  add sanity check step

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (b3ab6de)
            \
             N -- N -- N   refs/heads/feature/add-sanity-check (81c8da7)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

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.


Summary of changes:
 src/org/apache/jackrabbit/vault/PipelineSupport.groovy | 2 +-
 vars/vaultStageBuild.groovy                            | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


[jackrabbit-filevault-jenkins-lib] 01/01: add sanity check step

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

kwin pushed a commit to branch feature/add-sanity-check
in repository https://gitbox.apache.org/repos/asf/jackrabbit-filevault-jenkins-lib.git

commit 81c8da799ddf9ef2c21bf92e41e82aa7daf021ad
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Tue Jul 5 08:41:15 2022 +0200

    add sanity check step
    
    enable fail-fast option for parallel builds
---
 .../apache/jackrabbit/vault/PipelineSupport.groovy | 12 ++++---
 vars/vaultStageBuild.groovy                        |  2 +-
 vars/vaultStageSanityCheck.groovy                  | 38 ++++++++++++++++++++++
 3 files changed, 47 insertions(+), 5 deletions(-)

diff --git a/src/org/apache/jackrabbit/vault/PipelineSupport.groovy b/src/org/apache/jackrabbit/vault/PipelineSupport.groovy
index cd31353..7af4102 100644
--- a/src/org/apache/jackrabbit/vault/PipelineSupport.groovy
+++ b/src/org/apache/jackrabbit/vault/PipelineSupport.groovy
@@ -34,7 +34,7 @@ class PipelineSupport implements Serializable {
         if (INSTANCE == null) {
             throw new IllegalStateException("createInstance has not been called before, not wrapped in vaultPipeline step?")
         }
-        return INSTANCE;
+        return INSTANCE
     }
 
     private final String mainNodeLabel;
@@ -44,7 +44,7 @@ class PipelineSupport implements Serializable {
 
     PipelineSupport(String mainNodeLabel, int mainJdkVersion, String mainMavenVersion, boolean isOnMainBranch) {
         this.mainNodeLabel = mainNodeLabel
-        this.mainJdkVersion = mainJdkVersion;
+        this.mainJdkVersion = mainJdkVersion
         this.mainMavenVersion = mainMavenVersion
         this.isOnMainBranch = isOnMainBranch
     }
@@ -73,13 +73,13 @@ class PipelineSupport implements Serializable {
     }
 
     def stepsFor(String stepsLabel, Set<String> nodeLabels, Set<Integer> jdkVersions, Set<String> mavenVersions, Closure closure, boolean excludeMain = false) {
-        def stepsMap = [:]
+        def stepsMap = [failFast: true]
         for (nodeLabel in nodeLabels) {
             for (jdkVersion in jdkVersions) {
                 for (mavenVersion in mavenVersions) {
                     boolean isMainBuild = (nodeLabel.equals(mainNodeLabel) && jdkVersion.equals(mainJdkVersion) && mavenVersion.equals(mainMavenVersion))
                     if (excludeMain && isMainBuild) {
-                        continue; // skip main environment
+                        continue // skip main environment
                     }
                     stepsMap["${stepsLabel} (JDK ${jdkVersion}, ${nodeLabel}, Maven ${mavenVersion}${isMainBuild ? ' (Main)' : ''})"] = closure(nodeLabel, jdkVersion, mavenVersion, isMainBuild)
                 }
@@ -87,4 +87,8 @@ class PipelineSupport implements Serializable {
         }
         return stepsMap
     }
+
+    String getMainNodeLabel() {
+        return mainNodeLabel
+    }
 }
\ No newline at end of file
diff --git a/vars/vaultStageBuild.groovy b/vars/vaultStageBuild.groovy
index a0f5667..d0f2d42 100644
--- a/vars/vaultStageBuild.groovy
+++ b/vars/vaultStageBuild.groovy
@@ -77,5 +77,5 @@ def call(List<String> additionalNodeLabels, List<Integer> additionalJdkVersions,
                     }
                 }
             }
-        } )
+        })
 }
diff --git a/vars/vaultStageSanityCheck.groovy b/vars/vaultStageSanityCheck.groovy
new file mode 100644
index 0000000..e2cbb5c
--- /dev/null
+++ b/vars/vaultStageSanityCheck.groovy
@@ -0,0 +1,38 @@
+/**
+ * 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.
+ */
+
+import org.apache.jackrabbit.vault.PipelineSupport
+
+/**
+ * Quick sanity check before triggering expensive parallel builds with vaultStageBuild
+ */
+def call() {
+    PipelineSupport pipelineSupport = PipelineSupport.getInstance()
+    stage("Sanity Check") {
+        node(pipelineSupport.getMainNodeLabel()) {
+            timeout(30) {
+                echo "Running on node ${env.NODE_NAME}"
+                deleteDir()
+                checkout scm
+                String mavenArguments = 'clean compile'
+                pipelineSupport.executeMaven(this, mavenArguments, false)
+            }
+        }
+    }
+}
\ No newline at end of file