-
Bug
-
Resolution: Fixed
-
Minor
-
None
If the PowerShell plugin is used in a build job and the plugin calls a PS1 PowerShell script the job status is always success regardless of whether the script executed correctly as the reported status is just whether it was possible to execute the script or not.
It should be possible to call out to a PowerShell script and have the status reported correctly, even if this needs to be a configuration option to the plugin (or a variant to the plugin that will only execute scripts).
There is a workaround which involves using the Windows batch plugin and doing something like
powershell.exe "&
{build_script.ps1; exit $lastexitcode }"
but this is a bit unwieldy.