Adding support for the Powershell plugin.
See https://wiki.jenkins-ci.org/display/JENKINS/PowerShell+Plugin Change-Id: I337ea896e358fe456e556a95e22e724fe20cd722
This commit is contained in:
parent
2d74b16620
commit
baf6670148
@ -631,6 +631,22 @@ def batch(parser, xml_parent, data):
|
||||
XML.SubElement(batch, 'command').text = data
|
||||
|
||||
|
||||
def powershell(parser, xml_parent, data):
|
||||
"""yaml: powershell
|
||||
Execute a powershell command. Requires the `Powershell Plugin
|
||||
<https://wiki.jenkins-ci.org/display/JENKINS/PowerShell+Plugin>`_.
|
||||
|
||||
:Parameter: the powershell command to execute
|
||||
|
||||
Example:
|
||||
|
||||
.. literalinclude:: ../../tests/builders/fixtures/powershell.yaml
|
||||
:language: yaml
|
||||
"""
|
||||
ps = XML.SubElement(xml_parent, 'hudson.plugins.powershell.PowerShell')
|
||||
XML.SubElement(ps, 'command').text = data
|
||||
|
||||
|
||||
def msbuild(parser, xml_parent, data):
|
||||
"""yaml: msbuild
|
||||
Build .NET project using msbuild. Requires the `Jenkins MSBuild Plugin
|
||||
|
@ -57,6 +57,7 @@ jenkins_jobs.builders =
|
||||
maven-target=jenkins_jobs.modules.builders:maven_target
|
||||
msbuild=jenkins_jobs.modules.builders:msbuild
|
||||
multijob=jenkins_jobs.modules.builders:multijob
|
||||
powershell=jenkins_jobs.modules.builders:powershell
|
||||
python=jenkins_jobs.modules.builders:python
|
||||
sbt=jenkins_jobs.modules.builders:sbt
|
||||
shell=jenkins_jobs.modules.builders:shell
|
||||
|
8
tests/builders/fixtures/powershell.xml
Normal file
8
tests/builders/fixtures/powershell.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project>
|
||||
<builders>
|
||||
<hudson.plugins.powershell.PowerShell>
|
||||
<command>foo/foo.ps1</command>
|
||||
</hudson.plugins.powershell.PowerShell>
|
||||
</builders>
|
||||
</project>
|
2
tests/builders/fixtures/powershell.yaml
Normal file
2
tests/builders/fixtures/powershell.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
builders:
|
||||
- powershell: "foo/foo.ps1"
|
Loading…
Reference in New Issue
Block a user