我们使用jgit作为git项目来签出并完成jenkins流程。它通过快照构建但下面的错误失败的发布版本:Jenkins发布jgit问题
Building on master in workspace /home/jenkins2/jenkins/jobs/Git-end_to_end_4.0/workspace
Fetching changes from the remote Git repository
Checking out Revision 302b3bc2190db18b4661407ec67918e4f8ca65fc (refs/remotes/lighthouse/master)
Property '-Dm3plugin.lib' is already part of MAVEN_OPTS. This is usually a leftover of previous build which was forcibly stopped. Replacing the value with an updated one. Please remove it from the job configuration.
[RELEASE] Release build triggered
> jgit rev-parse --verify HEAD # timeout=10
ERROR: Failed to parse POMs
java.io.IOException: Failed retrieving current commit hash: Error performing command: jgit rev-parse --verify HEAD
at org.jfrog.hudson.release.scm.git.GitManager$CurrentCommitCallable.invoke(GitManager.java:194)
at org.jfrog.hudson.release.scm.git.GitManager$CurrentCommitCallable.invoke(GitManager.java:168)
at hudson.FilePath.act(FilePath.java:914)
at hudson.FilePath.act(FilePath.java:887)
at org.jfrog.hudson.release.scm.git.GitManager.getCurrentCommitHash(GitManager.java:52)
at org.jfrog.hudson.release.scm.git.GitCoordinator.prepare(GitCoordinator.java:74)
at org.jfrog.hudson.release.maven.MavenReleaseWrapper.setUp(MavenReleaseWrapper.java:131)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:643)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:585)
at hudson.model.Run.execute(Run.java:1676)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:519)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:231)
作为参考,下面是我的版本的详细信息:
詹金斯版本:詹金斯版本。 1.554
Git的客户端插件:1.17.1
Git的插件:2.4.0
我曾参观过几个进出计算器的页面,但并没有得到适当的反应。将欣赏任何进一步的建议。
- https://git-scm.com/book/en/v2/Embedding-Git-in-your-Applications-JGit
- Determine Tracking Branch in JGit
- Is there a JGit method equivalent to git rev-parse --short?
- What does git rev-parse do?
我认为GitManager类没有提供jgit命令执行的实际输出,也没有很难说实际的失败。你可以在jenkins工作区中手动运行jgit命令吗? – centic
如果您要降级,请注明您的意见! – dildeepak
你在这方面取得进展的最佳选择是回答我之前评论中的问题,这个问题显然没有足够的信息,但任何人都没有建议解决方案... – centic