Add support for "Nexus Repository Manager Publisher"

Change-Id: Icf72b436048bc0364690da2f956ed8b564fa5aa5
Signed-off-by: Tan Heng Yeow <E0032242@u.nus.edu>
This commit is contained in:
tanhengyeow 2018-08-04 13:17:15 +08:00
parent b23394b47b
commit 3cedc7fb63
3 changed files with 40 additions and 0 deletions

View File

@ -4172,6 +4172,33 @@ def nexus_iq_policy_evaluator(registry, xml_parent, data):
XML.SubElement(scan_pattern_tag, 'scanPattern').text = scan_pattern
def nexus_repo_manager(registry, xml_parent, data):
"""yaml: nexus-repo-manager
Allows for artifacts selected in Jenkins packages to be
available in Nexus Repository Manager.
Requires the Jenkins :jenkins-wiki:`Nexus
Platform Plugin <Nexus+Platform+Plugin>`.
:arg str instance-id: The ID of the Nexus Instance (required)
:arg str repo-id: The ID of the Nexus Repository (required)
Minimal Example:
.. literalinclude::
/../../tests/builders/fixtures/nexus-repo-manager-minimal.yaml
:language: yaml
"""
nexus_repo_manager = XML.SubElement(xml_parent,
'org.sonatype.nexus.ci.'
'nxrm.NexusPublisherBuildStep')
mapping = [
('instance-id', 'nexusInstanceId', None),
('repo-id', 'nexusRepositoryId', None),
]
helpers.convert_mapping_to_xml(nexus_repo_manager,
data, mapping, fail_required=True)
def ansible_playbook(parser, xml_parent, data):
"""yaml: ansible-playbook
This plugin allows you to execute Ansible tasks as a job build step.

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<project>
<builders>
<org.sonatype.nexus.ci.nxrm.NexusPublisherBuildStep>
<nexusInstanceId>Nexus-Repo-Instance</nexusInstanceId>
<nexusRepositoryId>Releases</nexusRepositoryId>
</org.sonatype.nexus.ci.nxrm.NexusPublisherBuildStep>
</builders>
</project>

View File

@ -0,0 +1,4 @@
builders:
- nexus-repo-manager:
instance-id: Nexus-Repo-Instance
repo-id: Releases