Fix pollscm backwards compatiblity

This change https://review.openstack.org/#/c/211993/ made '' an
invalid attribute value for pollscm, but that is a valid value.  We use
'' for pollscm with the option to build when a changed is pushed to
github.  This might have changed since we set it up, but you had to
specify a blank poll schedule for jenkins to build on pushes to github.
This changes allows '' as a valid value.

Change-Id: I35c45b4619584b3358562131399fc5ef16c4c5ec
This commit is contained in:
Will Soula 2015-12-01 15:09:20 -06:00
parent 440cc0d12f
commit c72cf731ef
3 changed files with 13 additions and 1 deletions

View File

@ -632,7 +632,7 @@ def pollscm(parser, xml_parent, data):
cron = data
ipch = 'false'
if not cron:
if not cron and cron != '':
raise InvalidAttributeError('cron', cron)
scmtrig = XML.SubElement(xml_parent, 'hudson.triggers.SCMTrigger')

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<project>
<triggers class="vector">
<hudson.triggers.SCMTrigger>
<spec/>
<ignorePostCommitHooks>false</ignorePostCommitHooks>
</hudson.triggers.SCMTrigger>
</triggers>
</project>

View File

@ -0,0 +1,3 @@
triggers:
- pollscm:
cron: ""