Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-23203

PowerShell plugin doesn't report status properly if a script is called

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • powershell-plugin
    • 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.

            Unassigned Unassigned
            marksyms Mark Syms
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: