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 <[email protected]>
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
])
])