Power Shell Step
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
Types
Properties
Optional collection of build step execution conditions
PowerShell edition to use
Build step execution mode
Specifies how the error output is handled. If set to true any output to stderr is handled as an error. By default any output to stderr is handled as a warning.
A minimum required PowerShell version installed on a build agent
A required platform bitness
Build parameters to be passed as arguments into the PowerShell script
PowerShell execution mode
PowerShell script execution mode
Build working directory for ant script, specify it if it is different from the checkout directory.
Functions
Deletes all configured build step conditions
Configures build step conditions
Copies parameters of this object to the specified target
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