Add GitBucket plugin support
Change-Id: I2a9fda9a91e382a65119a719655edd4ca340aa8c Signed-off-by: Kien Ha <kienha9922@gmail.com>
This commit is contained in:
parent
a90a26fece
commit
00f7a3f3b7
jenkins_jobs/modules
tests/properties/fixtures
@ -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.
|
||||
|
9
tests/properties/fixtures/gitbucket-full.xml
Normal file
9
tests/properties/fixtures/gitbucket-full.xml
Normal 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>
|
4
tests/properties/fixtures/gitbucket-full.yaml
Normal file
4
tests/properties/fixtures/gitbucket-full.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
properties:
|
||||
- gitbucket:
|
||||
url: https://foo.com
|
||||
link-enabled: true
|
9
tests/properties/fixtures/gitbucket-minimal.xml
Normal file
9
tests/properties/fixtures/gitbucket-minimal.xml
Normal 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>
|
3
tests/properties/fixtures/gitbucket-minimal.yaml
Normal file
3
tests/properties/fixtures/gitbucket-minimal.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
properties:
|
||||
- gitbucket:
|
||||
url: https://foo.com
|
Loading…
x
Reference in New Issue
Block a user