Add timed parameter to lf-maven-release anchor 08/6608/4
authorJeremy Phelps <jphelps@linuxfoundation.org>
Thu, 28 Sep 2017 19:22:43 +0000 (14:22 -0500)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Fri, 29 Sep 2017 03:46:13 +0000 (23:46 -0400)
Timed parameter is to specify a cron schedule
for the job to run.

Change-Id: Ic08983b4ceed2f05896471fa50797e0351e191f8
Signed-off-by: Jeremy Phelps <jphelps@linuxfoundation.org>
.jjb-test/expected-xml/gerrit-maven-maven-release-master
.jjb-test/expected-xml/github-maven-maven-release-master
jjb/lf-maven-jobs.yaml

index 191c781..20d417a 100644 (file)
@@ -144,6 +144,9 @@ For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
     </extensions>
   </scm>
   <triggers class="vector">
+    <hudson.triggers.TimerTrigger>
+      <spec/>
+    </hudson.triggers.TimerTrigger>
     <com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
       <spec/>
       <gerritProjects>
index d41076e..401a1bf 100644 (file)
@@ -139,6 +139,9 @@ For example '&lt;1.0.0' or '&gt;=1.0.0,&lt;2.0.0'.
     </extensions>
   </scm>
   <triggers class="vector">
+    <hudson.triggers.TimerTrigger>
+      <spec/>
+    </hudson.triggers.TimerTrigger>
     <org.jenkinsci.plugins.ghprb.GhprbTrigger>
       <spec/>
       <adminlist/>
index 1a689b3..fc203e7 100644 (file)
     #     :gerrit_verify_triggers: Override Gerrit Triggers.
     #     :mvn-global-settings: The name of the Maven global settings to use for
     #                           Maven configuration. (default: global-settings)
+    #     :cron: Cron schedule when to trigger the job. This parameter also
+    #         supports multiline input via YAML pipe | character in cases where
+    #         one may want to provide more than 1 cron timer. (default: '')
 
     ######################
     # Default parameters #
     mvn-version: mvn33
     stream: master
     submodule-recursive: true
+    cron: ''
 
     gerrit_release_triggers:
       - comment-added-contains-event:
           choosing-strategy: default
 
     triggers:
+      - timed: '{obj:cron}'
       - gerrit:
           server-name: '{gerrit-server-name}'
           trigger-on: '{obj:gerrit_release_triggers}'
           jenkins-ssh-credential: '{jenkins-ssh-credential}'
 
     triggers:
+      - timed: '{obj:cron}'
       - lf-infra-github-pr-trigger:
           trigger-phrase: '^build release$'
           only-trigger-phrase: true