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:
parent
440cc0d12f
commit
c72cf731ef
@ -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')
|
||||
|
9
tests/triggers/fixtures/pollscm004.xml
Normal file
9
tests/triggers/fixtures/pollscm004.xml
Normal 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>
|
3
tests/triggers/fixtures/pollscm004.yaml
Normal file
3
tests/triggers/fixtures/pollscm004.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
triggers:
|
||||
- pollscm:
|
||||
cron: ""
|
Loading…
Reference in New Issue
Block a user