我正在尝试使用BitBucket插件进行提交时自动触发构建。我似乎已经使用Web Hook正确设置了东西,并将项目中的框选中“将更改推送到BitBucket时构建”。
当我提交时,我在BitBucket Hook Log中看到一条消息,显示最后构建的修订版,然后它显示一个命令> git.exe ls-remote -h {repo} #timetime = 10。在系统日志中,它显示“触发BitBucket作业{JobName}”。但是,构建永远不会开始。大约10分钟后,BitBucket挂钩日志中记录以下错误:
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)
答案 0 :(得分:1)
我能够通过将作业中的git凭据从None更改为实际指定凭据而不是仅使用Jenkins用户的默认值来解决此问题。我认为这可能与从BitBucket Hook调用git有关,因为作业会在不同的线程上运行,并且出于某种原因需要使用特定的凭据。