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

Please add support for Pipelines to the Powershell plugin

    XMLWordPrintable

Details

    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

            bradleywehmeier Brad Wehmeier added a comment -

            gabloe, 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.

            bradleywehmeier Brad Wehmeier added a comment - gabloe , 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.
            xs2bharat Bharat Bhatia added a comment -

            gabloparm 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.

            xs2bharat Bharat Bhatia added a comment - gabloparm 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.

            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.

            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.
            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

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

            sebastian_sl sebastian slutzky added a comment - gabloe 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

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

              Dates

                Created:
                Updated:
                Resolved: