0

I am configuring Gerrit-Trigger/Jenkins Job that does verify when the developer check In the code. I see the job is failing since Gerrit Parameters are not picked by Jenkins. Below is the error which I am getting:

> /usr/bin/git -c core.askpass=true fetch --tags --progress ssh://<Gerrit URL>.git $GERRIT_REFSPEC
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from ssh://<Gerrit URL>.git
    at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:810)
    at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1066)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1097)
    at hudson.scm.SCM.checkout(SCM.java:485)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1269)
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607)
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
    at hudson.model.Run.execute(Run.java:1738)
    at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
    at hudson.model.ResourceController.execute(ResourceController.java:98)
    at hudson.model.Executor.run(Executor.java:410)
Caused by: hudson.plugins.git.GitException: Command "/usr/bin/git -c core.askpass=true fetch --tags --progress ssh://<Gerrit URL>.git $GERRIT_REFSPEC" returned status code 128:
stdout: 
stderr: fatal: Couldn't find remote ref $GERRIT_REFSPEC

How do I configure Jenkins to pick all Gerrit Paramaters?

-Thanks

sunil
  • 65
  • 3
  • 11

0 Answers0