PowerShellStep
A build step running PowerShell script
Example. A simple powershell script producing "Hello, World!" output to the build log.
buildType {
// Other Build Type settings ...
steps {
// Other Build Steps ...
powerShell {
scriptMode = script {
content = "Write-Host 'Hello, World!'"
}
}
Content copied to clipboard }
}
Example. Run a Powershell script with name "my_script.ps1" in the checkout directory. Use cross-platform "Core" edition of the Powershell.
buildType {
// Other Build Type settings ...
steps {
// Other Build Steps ...
powerShell {
edition = PowerShellStep.Edition.Core
scriptMode = file {
path = "my_script.ps1"
}
}
Content copied to clipboard }
}
See also
Constructors
Types
A PowerShell edition
PowerShell script execution mode
A required platform bitness
Functions
Deletes all configured build step conditions
Configures build step conditions
Copies parameters of this object to the specified target
Creates an instance of this build step via reflection using a no argument constructor, used during copying. Throws an error if this class doesn't have a default constructor. Subclasses can override it to create an instance without using a default constructor.
Run a PowerShell script at the given path
Run a PowerShell script with the given content
Validates this object and reports found errors to the provided consumer
Properties
Build working directory for ant script, specify it if it is different from the checkout directory.