Merge "Add GitBucket plugin support"
This commit is contained in:
commit
88ca8479f9
|
@ -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.
|
||||
|
|
|
@ -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>
|
|
@ -0,0 +1,4 @@
|
|||
properties:
|
||||
- gitbucket:
|
||||
url: https://foo.com
|
||||
link-enabled: true
|
|
@ -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>
|
|
@ -0,0 +1,3 @@
|
|||
properties:
|
||||
- gitbucket:
|
||||
url: https://foo.com
|
Loading…
Reference in New Issue