add support for job timer
I'd like to run some jobs on daily basis and this PR add this
functionality.
Change-Id: I5ec5b736bda201c7f788b0c57d9ff4776c7ba631
diff --git a/README.rst b/README.rst
index b24514d..3438cb2 100644
--- a/README.rst
+++ b/README.rst
@@ -172,6 +172,8 @@
url: https://github.com/jenkinsci/docker
name: "Jenkins Docker Image"
trigger:
+ timer:
+ spec: "H H * * *"
github:
pollscm:
spec: "H/15 * * * *"
diff --git a/jenkins/files/jobs/_common.xml b/jenkins/files/jobs/_common.xml
index 975affe..725ec00 100644
--- a/jenkins/files/jobs/_common.xml
+++ b/jenkins/files/jobs/_common.xml
@@ -118,6 +118,10 @@
<triggerConfigURL></triggerConfigURL>
<triggerInformationAction/>
</com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger>
+ {%- elif type == 'timer' %}
+ <hudson.triggers.TimerTrigger>
+ <spec>{{ trigger.spec }}</spec>
+ </hudson.triggers.TimerTrigger>
{%- endif %}
{%- endif %}
{%- endfor %}