sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From romb...@apache.org
Subject [sling-tooling-jenkins] branch feature/SLING-7245 updated: SLING-7245 - Validate pull requests using Jenkins
Date Tue, 18 Dec 2018 22:10:36 GMT
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch feature/SLING-7245
in repository https://gitbox.apache.org/repos/asf/sling-tooling-jenkins.git


The following commit(s) were added to refs/heads/feature/SLING-7245 by this push:
     new 1e39934  SLING-7245 - Validate pull requests using Jenkins
1e39934 is described below

commit 1e39934bcb12ef974b7f34a076914aa8153b8b78
Author: Robert Munteanu <rombert@apache.org>
AuthorDate: Tue Dec 18 00:06:06 2018 +0100

    SLING-7245 - Validate pull requests using Jenkins
    
    Avoid empty triggers
---
 vars/slingOsgiBundleBuild.groovy | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/vars/slingOsgiBundleBuild.groovy b/vars/slingOsgiBundleBuild.groovy
index 5ef2194..da2a505 100644
--- a/vars/slingOsgiBundleBuild.groovy
+++ b/vars/slingOsgiBundleBuild.groovy
@@ -18,11 +18,18 @@ def call(Map params = [:]) {
         jobConfig.upstreamProjects.join(',') : ''
 
     node('ubuntu') {
+
+        def triggers = [
+            pollSCM('* * * * *')
+        ]
+        if ( env.BRANCH_NAME == 'master' )
+            triggers.add(cron('@weekly'))
+        if ( upstreamProjectsCsv )
+            triggers.add(upstream(upstreamProjects: upstreamProjectsCsv, threshold: hudson.model.Result.SUCCESS))
+
         properties([
             pipelineTriggers([
-                cron(env.BRANCH_NAME == 'master' ? '@weekly' : ''),
-                pollSCM('* * * * *'),
-                upstream(upstreamProjects: upstreamProjectsCsv, threshold: hudson.model.Result.SUCCESS)
+                triggers
             ])
         ])
 


Mime
View raw message