jenkinsci / jenkinsci/durable-task-plugin

[JENKINS-40811] output of batch step is truncated

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

Description

This is somewhat hard to reproduce.

Sometimes the output of a bat step is truncated. Given the following pipeline script :

node("Windows") {

def output = bat returnStdout: true, script: "some_program"
echo output
}

some_program outputs a file path, say C:\Jenkins\workspace\Project\file.zip

Instead, this prints something like C:\Jenk or C:\Jenkins\workspace\Project\fil for instance.

I use the following work around

node("Windows") {

bat script: "some_program > stdout"
def output = readFile("stdout")
echo output
}

Which always work.

---
Originally reported by cblegare, imported from: output of batch step is truncated


  • status: Open
  • priority: Major
  • component(s): durable-task-plugin
  • label(s): triaged-2018-11, windows
  • resolution: Unresolved
  • votes: 1
  • watchers: 4
  • imported: 2025-12-09

Raw content of original issue

This is somewhat hard to reproduce.

Sometimes the output of a bat step is truncated. Given the following pipeline script :


node("Windows") {

def output = bat returnStdout: true, script: "some_program"
echo output
}

some_program outputs a file path, say C:\Jenkins\workspace\Project\file.zip

Instead, this prints something like C:\Jenk or C:\Jenkins\workspace\Project\fil for instance.

I use the following work around


node("Windows") {

bat script: "some_program > stdout"
def output = readFile("stdout")
echo output
}

Which always work.

environment

```
Jenkins ver. 1.658

Durable Task Plugin 1.12

Windows Slaves (got the bug on Windows 7 and Windows 10)
```

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.