Add Trigger that supports the Jenkins "BitBucket plugin"
Change-Id: I6dbbe045c459dd1e165b2c9f5a540f24805a6609 Resolves: #2000345
This commit is contained in:
parent
dc28559b05
commit
341afc10db
@ -771,6 +771,21 @@ def timed(parser, xml_parent, data):
|
||||
XML.SubElement(scmtrig, 'spec').text = data
|
||||
|
||||
|
||||
def bitbucket(parser, xml_parent, data):
|
||||
"""yaml: bitbucket
|
||||
Trigger a job when bitbucket repository is pushed to.
|
||||
Requires the Jenkins :jenkins-wiki:`BitBucket Plugin
|
||||
<BitBucket+Plugin>`.
|
||||
|
||||
Example:
|
||||
|
||||
.. literalinclude:: /../../tests/triggers/fixtures/bitbucket.yaml
|
||||
"""
|
||||
bbtrig = XML.SubElement(xml_parent, 'com.cloudbees.jenkins.'
|
||||
'plugins.BitBucketTrigger')
|
||||
XML.SubElement(bbtrig, 'spec').text = ''
|
||||
|
||||
|
||||
def github(parser, xml_parent, data):
|
||||
"""yaml: github
|
||||
Trigger a job when github repository is pushed to.
|
||||
|
@ -227,6 +227,7 @@ jenkins_jobs.scm =
|
||||
tfs=jenkins_jobs.modules.scm:tfs
|
||||
workspace=jenkins_jobs.modules.scm:workspace
|
||||
jenkins_jobs.triggers =
|
||||
bitbucket=jenkins_jobs.modules.triggers:bitbucket
|
||||
build-result=jenkins_jobs.modules.triggers:build_result
|
||||
gerrit=jenkins_jobs.modules.triggers:gerrit
|
||||
github=jenkins_jobs.modules.triggers:github
|
||||
|
8
tests/triggers/fixtures/bitbucket.xml
Normal file
8
tests/triggers/fixtures/bitbucket.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project>
|
||||
<triggers class="vector">
|
||||
<com.cloudbees.jenkins.plugins.BitBucketTrigger>
|
||||
<spec/>
|
||||
</com.cloudbees.jenkins.plugins.BitBucketTrigger>
|
||||
</triggers>
|
||||
</project>
|
2
tests/triggers/fixtures/bitbucket.yaml
Normal file
2
tests/triggers/fixtures/bitbucket.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
triggers:
|
||||
- bitbucket
|
Loading…
Reference in New Issue
Block a user