You can use the XL Deploy PowerShell plugin to create extensions and plugins that require PowerShell scripts to be executed on the target platform. For example, the XL Deploy plugins for Windows, Internet Information Services (IIS), and BizTalk were built on top of this plugin.
The PowerShell plugin allows one to enable batching of multiple PowerShell steps into a single step. This will improve the throughput of large deployments at the cost of less granular steps.
By default batching is disabled, but it can be enabled to setting the hidden property
powershell.BaseExtensiblePowerShellDeployed.batchSteps (or the
batchSteps property on one its subtypes) to
The maximum number of steps that will be included in one batch can be controlled with the hidden property
powershell.BaseExtensiblePowerShellDeployed.maxBatchSize (or the
maxBatchSize property on one of its subtypes).
In addition to these configurable options, the following restrictions are applied when batching steps:
- Only PowerShell steps generated by the type
powershell.BaseExtensiblePowerShellDeployedor one of its subtypes are batched.
- Only steps that deploy to the same target container are batched.
- Only steps with identical orders are batched.
- Only steps that have identical ‘verbs’ are batched, e.g. ‘Create appPool1 on iis’ and ‘Deploy website1 on iis’ would not be batched, while ‘Create appPool1 on iis’ and ‘Create website1 on iis’ would be batched into ‘Create appPool1, website1 on iis’, provided they had the same order.
- Steps that have
classpathResourcesare never batched.
- Even though at most
maxBatchSizesteps are batched together, the step description will never be longer than roughly 50 characters plus the name of the container.
Some configuration items in the PowerShell plugin includes hidden properties such as
exposePreviousDeployed. Normally, you cannot access hidden properties in a PowerShell script.
When creating a custom CI type that is based on a PowerShell CI, you can use the
createOptions property to expose hidden properties. For example:
<property name="createOptions" kind="set_of_string" default="uploadArtifactData, uploadClasspathResources, exposeDeployedApplication" hidden="true"/>
For a list of hidden properties for each CI, refer to the PowerShell Plugin Manual.