Merge "Add GitBucket plugin support"

This commit is contained in:
Jenkins 2016-10-21 11:20:47 +00:00 committed by Gerrit Code Review
commit 88ca8479f9
5 changed files with 55 additions and 0 deletions

View File

@ -121,6 +121,36 @@ def promoted_build(registry, xml_parent, data):
XML.SubElement(active_processes, 'string').text = str(n)
def gitbucket(parser, xml_parent, data):
"""yaml: gitbucket
Integrate GitBucket to Jenkins.
Requires the Jenkins :jenkins-wiki:`GitBucket Plugin <GitBucket+Plugin>`.
:arg str url: GitBucket URL to issue (required)
:arg bool link-enabled: Enable hyperlink to issue (default false)
Minimal Example:
.. literalinclude:: /../../tests/properties/fixtures/gitbucket-minimal.yaml
:language: yaml
Full Example:
.. literalinclude:: /../../tests/properties/fixtures/gitbucket-full.yaml
:language: yaml
"""
gitbucket = XML.SubElement(
xml_parent, 'org.jenkinsci.plugins.gitbucket.GitBucketProjectProperty')
gitbucket.set('plugin', 'gitbucket')
mapping = [
('url', 'url', None),
('link-enabled', 'linkEnabled', False),
]
helpers.convert_mapping_to_xml(
gitbucket, data, mapping, fail_required=True)
def github(registry, xml_parent, data):
"""yaml: github
Sets the GitHub URL for the project.

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<project>
<properties>
<org.jenkinsci.plugins.gitbucket.GitBucketProjectProperty plugin="gitbucket">
<url>https://foo.com</url>
<linkEnabled>true</linkEnabled>
</org.jenkinsci.plugins.gitbucket.GitBucketProjectProperty>
</properties>
</project>

View File

@ -0,0 +1,4 @@
properties:
- gitbucket:
url: https://foo.com
link-enabled: true

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<project>
<properties>
<org.jenkinsci.plugins.gitbucket.GitBucketProjectProperty plugin="gitbucket">
<url>https://foo.com</url>
<linkEnabled>false</linkEnabled>
</org.jenkinsci.plugins.gitbucket.GitBucketProjectProperty>
</properties>
</project>

View File

@ -0,0 +1,3 @@
properties:
- gitbucket:
url: https://foo.com