3
我設置Jenkins與父和子作業。父作業配置爲在拉取請求上執行,而子作業由父作業觸發。詹金斯拉請求生成器
我父作業配置,
在源代碼管理部分,
Repository URL: https://github.com/myorg/myrepo.git
Name: origin
Refspec: +refs/pull/*:refs/remotes/origin/pr/*
Branch Specifier (blank for default): ${sha1}
在Build部分,
Trigger/call builds on other projects :
Current build parameters
Pass-through Git Commit that was built
我的孩子作業配置,
在源代碼管理部分,
Repository URL: https://github.com/myorg/myrepo.git
Name: blank
Refspec: blank
Branch Specifier (blank for default): blank
問題:
兒童工作得到執行時,我得到一個錯誤,
父作業控制檯,
00:00:00.249 Last Built Revision: Revision defghi (origin/pr/29/merge)
00:00:00.407 Fetching upstream changes from https://github.com/myorg/myrepo.git
00:00:02.237 Commencing build of Revision abcdef (origin/pr/28/merge)
00:00:02.247 Checking out Revision abcdef (origin/pr/28/merge)
00:00:02.843 Waiting for the completion of child
00:01:30.776 child #23 completed. Result was FAILURE
兒童作業控制檯,
00:00:00.000 Started by upstream project "parent" build number 19
00:00:00.002 originally caused by:
00:00:00.002 GitHub pull request #28 of commit cdefgh automatically merged.
00:00:00.136 Last Built Revision: Revision bcdefg (detached)
00:00:01.101 Commencing build of Revision abcdef (detached)
00:00:01.151 Checking out Revision abcdef (detached)
00:00:01.317 FATAL: Could not checkout null with start point abcdef
00:00:01.317 hudson.plugins.git.GitException: Could not checkout null with start point abcdef
00:00:01.317 at hudson.plugins.git.GitAPI.checkoutBranch(GitAPI.java:863)
00:00:01.317 at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1192)
00:00:01.317 at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1176)
00:00:01.317 at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2394)
00:00:01.317 at hudson.remoting.UserRequest.perform(UserRequest.java:118)
00:00:01.317 at hudson.remoting.UserRequest.perform(UserRequest.java:48)
00:00:01.317 at hudson.remoting.Request$2.run(Request.java:326)
00:00:01.317 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
00:00:01.317 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
00:00:01.317 at java.util.concurrent.FutureTask.run(FutureTask.java:138)
00:00:01.317 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
00:00:01.317 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
00:00:01.317 at java.lang.Thread.run(Thread.java:619)
00:00:01.317 Caused by: hudson.plugins.git.GitException: Error performing command: /usr/bin/git checkout -f abcdef
00:00:01.317 Command "/usr/bin/git checkout -f abcdef" returned status code 128: fatal: reference is not a tree: abcdef
任何想法如何解決這個問題?
這取決於你想要孩子的工作要做什麼 – sti
有完全相同的問題。有人有主意嗎?帕布,你有沒有想過? – DrewVS