Skip to content

Commit

Permalink
Merge pull request #6 from sebbrandt87/feature/gitlab
Browse files Browse the repository at this point in the history
added allowed branches feature of gitlab_push
  • Loading branch information
sebbrandt87 committed Mar 1, 2015
2 parents 866c148 + ea4326f commit 0e67e5b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions jenkins_jobs/modules/triggers.py
Original file line number Diff line number Diff line change
Expand Up @@ -942,6 +942,10 @@ def gitlab_push(parser, xml_parent, data):
allowAllBranches.text = str(data.get('allowAllBranches', False)).lower()

allowedBranches = XML.SubElement(glt, 'allowedBranches')
branches = data.get('allowedBranches', ['master'])
for branch in branches:
XML.SubElement(allowedBranches, 'string').text = branch


class Triggers(jenkins_jobs.modules.base.Base):
sequence = 50
Expand Down

0 comments on commit 0e67e5b

Please sign in to comment.