Adding support for the Powershell plugin.

See https://wiki.jenkins-ci.org/display/JENKINS/PowerShell+Plugin

Change-Id: I337ea896e358fe456e556a95e22e724fe20cd722
This commit is contained in:
aidan.mcginley 2014-09-12 15:53:38 +01:00 committed by aidan.mcginley
parent 2d74b16620
commit baf6670148
4 changed files with 27 additions and 0 deletions

View File

@ -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

View File

@ -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

View 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>

View File

@ -0,0 +1,2 @@
builders:
- powershell: "foo/foo.ps1"