Browse Source

Merge "[pipeline] Update helpers import to common style"

tags/2.2.0
Zuul 10 months ago
parent
commit
5546870ef2
1 changed files with 6 additions and 6 deletions
  1. 6
    6
      jenkins_jobs/modules/view_pipeline.py

+ 6
- 6
jenkins_jobs/modules/view_pipeline.py View File

@@ -62,8 +62,7 @@ Example:
62 62
 
63 63
 import xml.etree.ElementTree as XML
64 64
 import jenkins_jobs.modules.base
65
-
66
-from jenkins_jobs.modules.helpers import convert_mapping_to_xml
65
+import jenkins_jobs.modules.helpers as helpers
67 66
 
68 67
 
69 68
 class Pipeline(jenkins_jobs.modules.base.Base):
@@ -78,8 +77,9 @@ class Pipeline(jenkins_jobs.modules.base.Base):
78 77
         mapping_optional = [
79 78
             ('description', 'description', None),
80 79
             ('filter-executors', 'filterExecutors', False),
81
-            ('filter-queue', 'filterQueue', False)]
82
-        convert_mapping_to_xml(root, data,
80
+            ('filter-queue', 'filterQueue', False),
81
+        ]
82
+        helpers.convert_mapping_to_xml(root, data,
83 83
             mapping_optional, fail_required=False)
84 84
 
85 85
         XML.SubElement(root, 'properties',
@@ -105,8 +105,8 @@ class Pipeline(jenkins_jobs.modules.base.Base):
105 105
                 'showPipelineParametersInHeaders', False),
106 106
             ('start-with-parameters', 'startsWithParameters', False),
107 107
             ('refresh-frequency', 'refreshFrequency', 3),
108
-            ('definition-header', 'showPipelineDefinitionHeader', False)
108
+            ('definition-header', 'showPipelineDefinitionHeader', False),
109 109
         ]
110
-        convert_mapping_to_xml(root, data, mapping, fail_required=True)
110
+        helpers.convert_mapping_to_xml(root, data, mapping, fail_required=True)
111 111
 
112 112
         return root

Loading…
Cancel
Save