-
Bug
-
Resolution: Cannot Reproduce
-
Blocker
-
Jenkins 2.89.3 and 2.89.4 running on Window 2008 R2
Jenkins 2.141 on Windows 2012 R2
I have been using Jenkins GIT Multibranch for a few weeks now. Today I upgraded to 2.89.4 and consequently my existing job started failing on the powershell execution:
Started by user
Mike Henderson
> C:\Program Files\Git\bin\git.exe rev-parse --is-inside-work-tree # timeout=10
Setting origin to
https://pbsorters.visualstudio.com/Sorter%20Projects/Sorter%20Projects%20Team/_git/Software_C_Sharp
> C:\Program Files\Git\bin\git.exe config remote.origin.url
https://pbsorters.visualstudio.com/Sorter%20Projects/Sorter%20Projects%20Team/_git/Software_C_Sharp
- timeout=10
Fetching origin...
Fetching upstream changes from origin
> C:\Program Files\Git\bin\git.exe --version # timeout=10
using GIT_ASKPASS to set credentials Jenkins Feb-2018
> C:\Program Files\Git\bin\git.exe fetch --tags --progress origin +refs/heads/:refs/remotes/origin/
Seen branch in repository origin/Release1.5
Seen branch in repository origin/Task11982
Seen branch in repository origin/TestJenkinsFile
Seen branch in repository origin/sqa1.5
Seen 4 remote branches
Obtained Jenkinsfile from 55e5fb519d6276a4b566d6dfdf5de88e395cc125
Running in Durability level: MAX_SURVIVABILITY
[Pipeline] node
Running on
Node 1
in D:\Jenkins\workspace\rp_-_CS_GIT_TestJenkinsFile-CYLWMI6AWK3EFHJP3GSCB3TL4W5QCOFFI2SCUTRUEZAATYAY2G3Q
[Pipeline] {
[Pipeline] echo
Sanity Check 1
[Pipeline] powershell
[rp_-_CS_GIT_TestJenkinsFile-CYLWMI6AWK3EFHJP3GSCB3TL4W5QCOFFI2SCUTRUEZAATYAY2G3Q] Running PowerShell script
D:\Jenkins\workspace\rp_-_CS_GIT_TestJenkinsFile-CYLWMI6AWK3EFHJP3GSCB3TL4W5QCOFFI2SCUTRUEZAATYAY2G3Q@tmp\durable-311bd602\powershellWrapper.ps1 : The term 'powershell' is not recognized as
the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At D:\Jenkins\workspace\rp_-_CS_GIT_TestJenkinsFile-CYLWMI6AWK3EFHJP3GSCB3TL4W5QCOFFI2SCUTRUEZAATYAY2G3Q@tmp\durable-311bd602\powershellHelper.ps1:53 char:9
+ & { & $MainScript | Out-FileNoBom -Writer $OutputWriter } *>&1 | ...
+ ~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (powershell:String) [powershellW rapper.ps1], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException,powershellWrapper.ps1
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: script returned exit code 1
Finished: FAILURE
I downgraded back to 2.89.3 but the problem persists.
I logged into the node where this is executing and opened powershell and ran an example of this powershellWrapper.ps1 and it executed fine. In the folder that is called about above though, there is no folders or scripts. Not sure if it cleans it out or not automatically. The powershell plugin hasn't changed in some time, so I think it is how the wrapper is generated could be the issue, but since the file is gone I can't even verify what was in it. I found an existing script in another job folder that was run yesterday successful.
Here is the contents of the jenkinsfile that produced the above output:
node('("Node 1")||("Node 2")') {
echo 'Sanity Check 1'
powershell 'Write-Output "Sanity Check 2"'
echo 'Sanity Check 3'
}