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

Please add support for Pipelines to the Powershell plugin

    Details

    • Similar Issues:

      Description

      I would like to use the powershell plugin from within pipelines, please add support for the pipelines to the powershell plugin.

      This is especially important as we approach Jenkins 2.0 and its move towards pipelines.

        Attachments

          Issue Links

            Activity

            Hide
            bradleywehmeier Brad Wehmeier added a comment -

            Gabriel Loewen, I determined the difference was because it was loading the PowerShell Profile for the user the build agent was executing as. I'll spin this off to another issue at this point (following Jesse's guidance). It will probably be an improvement to optionally set the -NoProfile flag when calling the PowerShell executable.

            Show
            bradleywehmeier Brad Wehmeier added a comment - Gabriel Loewen , I determined the difference was because it was loading the PowerShell Profile for the user the build agent was executing as. I'll spin this off to another issue at this point (following Jesse's guidance). It will probably be an improvement to optionally set the -NoProfile  flag when calling the PowerShell executable.
            Hide
            xs2bharat Bharat Bhatia added a comment -

            Gabriel Lopez I am using Write-Host in my powershell script but dont see any output in console. Do you know if there is any other way to produce console output.

            Show
            xs2bharat Bharat Bhatia added a comment - Gabriel Lopez I am using Write-Host in my powershell script but dont see any output in console. Do you know if there is any other way to produce console output.
            Hide
            gabloe Gabriel Loewen added a comment -

            Write-Host does not produce any output that can be consumed (e.g. written to the log). You can simply replace all of your calls to Write-Host with calls to Write-Output.

            Show
            gabloe Gabriel Loewen added a comment - Write-Host does not produce any output that can be consumed (e.g. written to the log). You can simply replace all of your calls to Write-Host with calls to Write-Output.
            Hide
            gabloe Gabriel Loewen added a comment -
            Show
            gabloe Gabriel Loewen added a comment - Here's a few things to read to understand why this is the behavior of Write-Host: http://www.jsnover.com/blog/2013/12/07/write-host-considered-harmful/ http://m.windowsitpro.com/windows/write-output-or-write-host-powershell
            Hide
            sebastian_sl sebastian slutzky added a comment -

            Gabriel Loewen Running powershell in the Jenkins Pipeline is hardcoded to use no profile. The powershell plugin defaults to the opposite. Can this be made configurable?

            Show
            sebastian_sl sebastian slutzky added a comment - Gabriel Loewen Running powershell in the Jenkins Pipeline is hardcoded to use no profile . The powershell plugin defaults to the opposite. Can this be made configurable?

              People

              • Assignee:
                gabloe Gabriel Loewen
                Reporter:
                stuartwhelan Stuart Whelan
              • Votes:
                40 Vote for this issue
                Watchers:
                52 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: