add support for NodeJS Plugin
Change-Id: I583b6e8cac8b7bfe086e7f16e2989db3d50a6054
This commit is contained in:
parent
46bc9ecab5
commit
383d4250f0
@ -1461,6 +1461,28 @@ def custom_tools(parser, xml_parent, data):
|
|||||||
'convertHomesToUppercase').text = convert_home
|
'convertHomesToUppercase').text = convert_home
|
||||||
|
|
||||||
|
|
||||||
|
def nodejs_installator(parser, xml_parent, data):
|
||||||
|
"""yaml: nodejs-installator
|
||||||
|
Requires the Jenkins :jenkins-wiki:`NodeJS Plugin
|
||||||
|
<NodeJS+Plugin>`.
|
||||||
|
|
||||||
|
:arg str name: nodejs installation name
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
.. literalinclude::
|
||||||
|
/../../tests/wrappers/fixtures/nodejs-installator001.yaml
|
||||||
|
"""
|
||||||
|
npm_node = XML.SubElement(xml_parent,
|
||||||
|
'jenkins.plugins.nodejs.tools.'
|
||||||
|
'NpmPackagesBuildWrapper')
|
||||||
|
|
||||||
|
try:
|
||||||
|
XML.SubElement(npm_node, 'nodeJSInstallationName').text = data['name']
|
||||||
|
except KeyError as e:
|
||||||
|
raise MissingAttributeError(e.args[0])
|
||||||
|
|
||||||
|
|
||||||
def xvnc(parser, xml_parent, data):
|
def xvnc(parser, xml_parent, data):
|
||||||
"""yaml: xvnc
|
"""yaml: xvnc
|
||||||
Enable xvnc during the build.
|
Enable xvnc during the build.
|
||||||
|
@ -289,6 +289,7 @@ jenkins_jobs.wrappers =
|
|||||||
mask-passwords=jenkins_jobs.modules.wrappers:mask_passwords
|
mask-passwords=jenkins_jobs.modules.wrappers:mask_passwords
|
||||||
matrix-tie-parent=jenkins_jobs.modules.wrappers:matrix_tie_parent
|
matrix-tie-parent=jenkins_jobs.modules.wrappers:matrix_tie_parent
|
||||||
mongo-db=jenkins_jobs.modules.wrappers:mongo_db
|
mongo-db=jenkins_jobs.modules.wrappers:mongo_db
|
||||||
|
nodejs-installator=jenkins_jobs.modules.wrappers:nodejs_installator
|
||||||
pathignore=jenkins_jobs.modules.wrappers:pathignore
|
pathignore=jenkins_jobs.modules.wrappers:pathignore
|
||||||
port-allocator=jenkins_jobs.modules.wrappers:port_allocator
|
port-allocator=jenkins_jobs.modules.wrappers:port_allocator
|
||||||
pre-scm-buildstep=jenkins_jobs.modules.wrappers:pre_scm_buildstep
|
pre-scm-buildstep=jenkins_jobs.modules.wrappers:pre_scm_buildstep
|
||||||
|
8
tests/wrappers/fixtures/nodejs-installator001.xml
Normal file
8
tests/wrappers/fixtures/nodejs-installator001.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<project>
|
||||||
|
<buildWrappers>
|
||||||
|
<jenkins.plugins.nodejs.tools.NpmPackagesBuildWrapper>
|
||||||
|
<nodeJSInstallationName>latest node</nodeJSInstallationName>
|
||||||
|
</jenkins.plugins.nodejs.tools.NpmPackagesBuildWrapper>
|
||||||
|
</buildWrappers>
|
||||||
|
</project>
|
3
tests/wrappers/fixtures/nodejs-installator001.yaml
Normal file
3
tests/wrappers/fixtures/nodejs-installator001.yaml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
wrappers:
|
||||||
|
- nodejs-installator:
|
||||||
|
name: "latest node"
|
Loading…
x
Reference in New Issue
Block a user