Bitbucket Build Erring after triggered from Commit

蹲街弑〆低调 提交于 2019-12-24 04:47:15

问题


I am trying to trigger builds automatically when a commit is made using the BitBucket plugin. I seem to have things setup correctly with the Web Hook and checking the box in the project to "Build when a change is pushed to BitBucket".

When I commit, I am seeing a message in the BitBucket Hook Log showing the last built revision and then it shows a command > git.exe ls-remote -h {repo} # timeout=10. In the system log, it shows "Triggering BitBucket job {JobName}". However, the build never starts. After about 10 minutes, the following error gets logged in the BitBucket Hook Log:

ERROR: Timeout after 10 minutes
ERROR: Failed to join a process
org.jvnet.winp.WinpException: Failed to read environment variable table    error=299 at .\envvar-cmdline.cpp:201
   at org.jvnet.winp.Native.getCmdLineAndEnvVars(Native Method)
   at org.jvnet.winp.WinProcess.parseCmdLineAndEnvVars(WinProcess.java:126)
   at org.jvnet.winp.WinProcess.getCommandLine(WinProcess.java:102)
   at hudson.util.ProcessTree$Windows$1.getArguments(ProcessTree.java:441)
   at hudson.plugins.msbuild.MsBuildKillingVeto.vetoProcessKilling(MsBuildKillingVeto.java:55)
   at hudson.util.ProcessTree$OSProcess.getVeto(ProcessTree.java:239)
   at hudson.util.ProcessTree$Windows$1.killRecursively(ProcessTree.java:422)
   at hudson.util.ProcessTree.killAll(ProcessTree.java:142)
   at hudson.Proc$LocalProc.destroy(Proc.java:375)
   at hudson.Proc$LocalProc.kill(Proc.java:367)
   at hudson.Proc$1.run(Proc.java:157)
   at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
   at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
   at java.util.concurrent.FutureTask.run(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

回答1:


I was able to fix this by changing the git credentials from the job from None to actually specifying credentials rather than just using default for the Jenkins user. I think this may have something to do with the call to git from the BitBucket Hook is running on a different thread as the job would and for some reason needs the specific credentials to use.



来源:https://stackoverflow.com/questions/39840486/bitbucket-build-erring-after-triggered-from-commit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!