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:29:37 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 14402a4  SLING-7245 - Validate pull requests using Jenkins
14402a4 is described below

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

    SLING-7245 - Validate pull requests using Jenkins
    
    Read rebuildFrequency from job configuration.
---
 vars/slingOsgiBundleBuild.groovy | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/vars/slingOsgiBundleBuild.groovy b/vars/slingOsgiBundleBuild.groovy
index 2b6e20a..786d6bd 100644
--- a/vars/slingOsgiBundleBuild.groovy
+++ b/vars/slingOsgiBundleBuild.groovy
@@ -19,18 +19,6 @@ def call(Map params = [:]) {
 
     node('ubuntu') {
 
-        def jobTriggers = [
-            pollSCM('* * * * *')
-        ]
-        if ( env.BRANCH_NAME == 'master' )
-            jobTriggers.add(cron('@weekly'))
-        if ( upstreamProjectsCsv )
-            jobTriggers.add(upstream(upstreamProjects: upstreamProjectsCsv, threshold: hudson.model.Result.SUCCESS))
-
-        properties([
-            pipelineTriggers(jobTriggers)
-        ])
-
         checkout scm
 
         stage('Init') {
@@ -44,6 +32,18 @@ def call(Map params = [:]) {
             echo "Final job config: ${jobConfig}"
         }
 
+        def jobTriggers = [
+            pollSCM('* * * * *')
+        ]
+        if ( env.BRANCH_NAME == 'master' )
+            jobTriggers.add(cron(jobConfig.rebuildFrequency))
+        if ( upstreamProjectsCsv )
+            jobTriggers.add(upstream(upstreamProjects: upstreamProjectsCsv, threshold: hudson.model.Result.SUCCESS))
+
+        properties([
+            pipelineTriggers(jobTriggers)
+        ])
+
         if ( jobConfig.enabled ) {
             // the reference build is always the first one, and the only one to deploy, archive
artifacts, etc
             // usually this is the build done with the oldest JDK version, to ensure maximum
compatibility


Mime
View raw message