You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by ma...@apache.org on 2020/07/19 18:44:14 UTC

[logging-log4j2] branch master updated: Ensure latest builds are only ones running

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

mattsicker pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git


The following commit(s) were added to refs/heads/master by this push:
     new 891ef05  Ensure latest builds are only ones running
891ef05 is described below

commit 891ef053f893e1f577462586bb3327020e41f0cc
Author: Matt Sicker <bo...@gmail.com>
AuthorDate: Sun Jul 19 13:43:21 2020 -0500

    Ensure latest builds are only ones running
    
    And a config workaround.
---
 Jenkinsfile | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/Jenkinsfile b/Jenkinsfile
index ae22aef..204bd4a 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -33,6 +33,11 @@ pipeline {
         // fail parallel stages as soon as any of them fail
         parallelsAlwaysFailFast()
     }
+    triggers {
+        // TODO: this can be removed once gitbox webhooks are re-enabled
+        pollSCM 'H/5 * * * *'
+    }
+
     // https://jenkins.io/doc/book/pipeline/syntax/#agent
     // start with no Jenkins agent allocated as they will only be needed for the individual stages
     // therefore, anything in the top level post section can only contain steps that don't require a Jenkins agent
@@ -59,6 +64,12 @@ pipeline {
                         LANG = 'C.UTF-8'
                     }
                     steps {
+                        // https://issues.jenkins-ci.org/browse/JENKINS-43353
+                        script {
+                            def buildNumber = BUILD_NUMBER as int
+                            if (buildNumber > 1) milestone(buildNumber - 1)
+                            milestone(buildNumber)
+                        }
                         // build, test, and deploy snapshots
                         // note that the jenkins system property is set here to activate certain pom properties in
                         // some log4j modules that compile against system jars (e.g., log4j-jmx-gui)