jenkinsci / jenkinsci/durable-task-plugin

[JENKINS-53502] PowerShell $ProgressPreference = 'SilentlyContinue'

Open
#440 0 comments 0 reactions 0 assignees View on GitHub
component:durable-task-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
30
Forks
101
PR merge metrics
No merged PRs in 30d

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
"""
}

---
Originally reported by tlynchpin, imported from: PowerShell $ProgressPreference = 'SilentlyContinue'


  • status: Open
  • priority: Minor
  • component(s): durable-task-plugin
  • resolution: Unresolved
  • votes: 1
  • watchers: 1
  • imported: 2025-12-09

Raw content of original issue

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
"""
}

environment

```
jenkins 2.136

durable-task-step 2.19
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.