Add support for the "Gitlab Logo Plugin"
This adds support for the "Gitlab Logo" plugin to the properties module. Change-Id: I7bcffbcb31e478da3e4dd43dedb47e13d6364802
This commit is contained in:
parent
a4141eed84
commit
91a3624c45
@ -206,6 +206,28 @@ def gitlab(registry, xml_parent, data):
|
||||
helpers.convert_mapping_to_xml(gitlab, data, mapping, fail_required=True)
|
||||
|
||||
|
||||
def gitlab_logo(registry, xml_parent, data):
|
||||
"""yaml: gitlab-logo
|
||||
Configures the GitLab-Logo Plugin.
|
||||
Requires the Jenkins :jenkins-wiki:`GitLab Logo Plugin
|
||||
<GitLab+Logo+Plugin>`.
|
||||
|
||||
:arg str repository-name: the GitLab repository name (required)
|
||||
|
||||
Example:
|
||||
|
||||
.. literalinclude:: /../../tests/properties/fixtures/gitlab-logo.yaml
|
||||
:language: yaml
|
||||
"""
|
||||
logo = XML.SubElement(xml_parent,
|
||||
'org.jenkinsci.plugins.gitlablogo.'
|
||||
'GitlabLogoProperty')
|
||||
mapping = [
|
||||
('repository-name', 'repositoryName', None)
|
||||
]
|
||||
helpers.convert_mapping_to_xml(logo, data, mapping, fail_required=True)
|
||||
|
||||
|
||||
def disk_usage(registry, xml_parent, data):
|
||||
"""yaml: disk-usage
|
||||
Enables the Disk Usage Plugin.
|
||||
|
8
tests/properties/fixtures/gitlab-logo.xml
Normal file
8
tests/properties/fixtures/gitlab-logo.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project>
|
||||
<properties>
|
||||
<org.jenkinsci.plugins.gitlablogo.GitlabLogoProperty>
|
||||
<repositoryName>gitlab-repository-name</repositoryName>
|
||||
</org.jenkinsci.plugins.gitlablogo.GitlabLogoProperty>
|
||||
</properties>
|
||||
</project>
|
3
tests/properties/fixtures/gitlab-logo.yaml
Normal file
3
tests/properties/fixtures/gitlab-logo.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
properties:
|
||||
- gitlab-logo:
|
||||
repository-name: gitlab-repository-name
|
Loading…
Reference in New Issue
Block a user