We are using jgit for the git project to checkout and complete the jenkins flow. It passes the snapshot build but fails for release build with the below error :
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)
For reference , below are my version details :
Jenkins version : Jenkins ver. 1.554
Git client plugin : 1.17.1
Git plugin : 2.4.0
I have visited couple of pages in and out of stackoverflow , but did not get the proper response. Will appreciate any further suggestion.