summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-05-16 09:24:48 +0000
committerGerrit Code Review <review@openstack.org>2018-05-16 09:24:48 +0000
commit2c79678ae74950380315b0fdc4781c40d05ad599 (patch)
tree27bbdf965c13930b39fea708bd9f92c256a4d45a
parentafd7cc8475cf497e593d581b89fa56e667566d61 (diff)
parent89b531613c88735d52c4280f31110c1ae53da714 (diff)
Merge "fixed config format for nodejs plugin"
-rw-r--r--jenkins_jobs/modules/wrappers.py7
-rw-r--r--tests/wrappers/fixtures/nodejs-installator001.xml4
2 files changed, 7 insertions, 4 deletions
diff --git a/jenkins_jobs/modules/wrappers.py b/jenkins_jobs/modules/wrappers.py
index 4421f98..d46b54a 100644
--- a/jenkins_jobs/modules/wrappers.py
+++ b/jenkins_jobs/modules/wrappers.py
@@ -1814,8 +1814,11 @@ def nodejs_installator(registry, xml_parent, data):
1814 /../../tests/wrappers/fixtures/nodejs-installator001.yaml 1814 /../../tests/wrappers/fixtures/nodejs-installator001.yaml
1815 """ 1815 """
1816 npm_node = XML.SubElement(xml_parent, 1816 npm_node = XML.SubElement(xml_parent,
1817 'jenkins.plugins.nodejs.tools.' 1817 'jenkins.plugins.nodejs.'
1818 'NpmPackagesBuildWrapper') 1818 'NodeJSBuildWrapper')
1819
1820 version = registry.get_plugin_info('nodejs').get('version', '0')
1821 npm_node.set("plugin", "nodejs@" + version)
1819 mapping = [('name', 'nodeJSInstallationName', None)] 1822 mapping = [('name', 'nodeJSInstallationName', None)]
1820 convert_mapping_to_xml(npm_node, data, mapping, fail_required=True) 1823 convert_mapping_to_xml(npm_node, data, mapping, fail_required=True)
1821 1824
diff --git a/tests/wrappers/fixtures/nodejs-installator001.xml b/tests/wrappers/fixtures/nodejs-installator001.xml
index a52ae52..ff95fa2 100644
--- a/tests/wrappers/fixtures/nodejs-installator001.xml
+++ b/tests/wrappers/fixtures/nodejs-installator001.xml
@@ -1,8 +1,8 @@
1<?xml version="1.0" encoding="utf-8"?> 1<?xml version="1.0" encoding="utf-8"?>
2<project> 2<project>
3 <buildWrappers> 3 <buildWrappers>
4 <jenkins.plugins.nodejs.tools.NpmPackagesBuildWrapper> 4 <jenkins.plugins.nodejs.NodeJSBuildWrapper plugin="nodejs@0">
5 <nodeJSInstallationName>latest node</nodeJSInstallationName> 5 <nodeJSInstallationName>latest node</nodeJSInstallationName>
6 </jenkins.plugins.nodejs.tools.NpmPackagesBuildWrapper> 6 </jenkins.plugins.nodejs.NodeJSBuildWrapper>
7 </buildWrappers> 7 </buildWrappers>
8</project> 8</project>