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

PowerShell $ProgressPreference = 'SilentlyContinue'

    Details

    • Type: Improvement
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: durable-task-plugin
    • Labels:
      None
    • Environment:
      jenkins 2.136
      durable-task-step 2.19
    • Similar Issues:

      Description

      Some powershell commands or cmdlets display progress. I am using Invoke-WebRequest in scripted pipeline. Prepending $ProgressPreference = 'SilentlyContinue' to my script block allows Invoke-WebRequest to perform downloads and uploads at expected speeds. Without it I was getting ~100x worse performance.

       

      I don't understand this in detail. Please consider managing this ProgressPreference in the durable task powershell step.

       

      node('windows'){
        powershell """
          \$start = Get-Date
          Invoke-WebRequest -OutFile 'jenkins.war' -Uri 'http://mirrors.jenkins.io/war-stable/latest/jenkins.war'
          \$end = get-date
          (\$end - \$start).TotalSeconds
          """
        powershell """
          \$ProgressPreference = 'SilentlyContinue'
          \$start = Get-Date
          Invoke-WebRequest -OutFile 'jenkins.war' -Uri 'http://mirrors.jenkins.io/war-stable/latest/jenkins.war'
          \$end = get-date
          (\$end - \$start).TotalSeconds
          """
      }
      

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              tlynchpin Tim Lynch
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: