从Commit触发后,Bitbucket Build Erring [英] Bitbucket Build Erring after triggered from Commit

查看:174
本文介绍了从Commit触发后,Bitbucket Build Erring的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用BitBucket插件进行提交时自动触发构建.我似乎已使用Web Hook正确设置了所有内容,并选中了项目中的复选框将更改推送到BitBucket时进行构建".

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".

当我提交时,我在BitBucket挂钩日志中看到一条消息,显示上次构建的修订,然后显示命令> git.exe ls-remote -h {repo}#timeout = 10.在系统日志中,它显示正在触发BitBucket作业{JobName}".但是,构建永远不会开始.大约10分钟后,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)

推荐答案

我能够通过将作业中的git凭据从无"更改为实际指定凭据,而不仅仅是为Jenkins用户使用默认凭据来解决此问题.我认为这可能与BitBucket Hook中对git的调用有关,因为该作业将在不同的线程上运行,并且出于某种原因需要使用特定的凭据.

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.

这篇关于从Commit触发后,Bitbucket Build Erring的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆