-
Type:
Bug
-
Resolution: Cannot Reproduce
-
Priority:
Major
-
Component/s: timestamper-plugin
When using timestamper with either PowerShell or Windows Batch pipeline steps the timestamps do not get added to the console output. I suspect this is because in these steps the console log has Windows style line endings of CRLF instead of unix style.
Example repro:
node("Windows") {    timestamps {        bat """        @echo off        echo These        echo lines        echo should        echo have        echo timestamps        """        powershell """        Write-Host "These"        Write-Host "lines"        Write-Host "should"        Write-Host "have"        Write-Host "timestamps"        """    } }
Â
Result:
[Pipeline] { (hide)
[Pipeline] timestamps (hide)
[Pipeline] { (hide)
[Pipeline] bat (hide)
2018-11-13 10:08:00 [TestTimestamper] Running batch script
These
lines
should
have
timestamps
[Pipeline] powershell (hide)
2018-11-13 10:08:00 [TestTimestamper] Running PowerShell script
These
lines
should
have
timestamps
[Pipeline] }
[Pipeline] // timestamps
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
Â