diff options
author | Waldemar Znoinski <wznoinsk@redhat.com> | 2019-07-31 21:08:00 +0100 |
---|---|---|
committer | Waldemar Znoinski <wznoinsk@redhat.com> | 2019-08-01 18:51:32 +0100 |
commit | 079900b4e7e9f0bf384b50b49bbf83c7daad7d80 (patch) | |
tree | c04ebf07540842e54c9a12ded3a9559a5f73ffbc | |
parent | 63c02a8092dcc77163aa542cce8a6105f5759cbc (diff) | |
download | python-jenkins-job-builder-079900b4e7e9f0bf384b50b49bbf83c7daad7d80.tar.gz python-jenkins-job-builder-079900b4e7e9f0bf384b50b49bbf83c7daad7d80.tar.xz python-jenkins-job-builder-079900b4e7e9f0bf384b50b49bbf83c7daad7d80.zip |
add support for 'override-topic' in jms-messaging trigger
overrides->topic is now supported in the jms messaging Jenkins
plugin hence we need support it in jjb.
see triggers section at:
https://wiki.jenkins.io/display/JENKINS/JMS+Messaging+Plugin
Change-Id: I389e59cca4f649379614f7f6247bf76cf4a0ba94
-rw-r--r-- | jenkins_jobs/modules/triggers.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/jenkins_jobs/modules/triggers.py b/jenkins_jobs/modules/triggers.py index f128a354..b37d9c64 100644 --- a/jenkins_jobs/modules/triggers.py +++ b/jenkins_jobs/modules/triggers.py @@ -846,6 +846,8 @@ def jms_messaging(registry, xml_parent, data): Requires the Jenkins :jenkins-wiki:`JMS Messaging Plugin <JMS+Messaging+Plugin>`. + :arg str override-topic: If you need to override the default topic. + (default '') :arg str selector: The JSON or YAML formatted text that conforms to the schema for defining the various OpenShift resources. (default '') note: topic needs to be in double quotes @@ -873,6 +875,11 @@ def jms_messaging(registry, xml_parent, data): jmsm = XML.SubElement(xml_parent, namespace + 'CIBuildTrigger') + if 'override-topic' in data: + overrides = XML.SubElement(jmsm, 'overrides') + XML.SubElement(overrides, + 'topic').text = str(data['override-topic']) + mapping = [ # option, xml name, default value ("spec", 'spec', ''), |