stash-jenkins-postreceive-webhook
stash-jenkins-postreceive-webhook copied to clipboard
commit notification 0000000000000000000000000000000000000000
Running the Stash Webhooks for Jenkins 2.6 we intermittently see commit notification 0000000000000000000000000000000000000000
on the Jenkins sidde. It looks like the stash post receive hook sometimes doesn't send the correct SHA for the commit.
The Jenkins side looks like:
commit notification 0000000000000000000000000000000000000000
[EnvInject] - Loading node environment variables.
Building remotely on cn45 in workspace /ahljenkins/slave/build/workspace/ahl-cluster-profile
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url ssh://git@ahlstash:7999/infra/ahl-cluster-profile.git # timeout=10
Cleaning workspace
> git rev-parse --verify HEAD # timeout=10
Resetting working tree
> git reset --hard # timeout=10
> git clean -fdx # timeout=10
Fetching upstream changes from ssh://git@ahlstash:7999/infra/ahl-cluster-profile.git
> git --version # timeout=10
> git fetch --tags ssh://git@ahlstash:7999/infra/ahl-cluster-profile.git +refs/heads/*:refs/remotes/origin/*
> git rev-parse 0000000000000000000000000000000000000000^{commit} # timeout=10
FATAL: Command "git rev-parse 0000000000000000000000000000000000000000^{commit}" returned status code 128:
stdout: 0000000000000000000000000000000000000000^{commit}
stderr: fatal: ambiguous argument '0000000000000000000000000000000000000000^{commit}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
hudson.plugins.git.GitException: Command "git rev-parse 0000000000000000000000000000000000000000^{commit}" returned status code 128:
stdout: 0000000000000000000000000000000000000000^{commit}
stderr: fatal: ambiguous argument '0000000000000000000000000000000000000000^{commit}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1435)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1411)
I know this was quite a while ago, so forgive me for just now following up. Are you still seeing this issue?
i just came upon this issue. It only happens when I create tags. I am running jenkins 1.606 and stash 3.8.
commit notification 0000000000000000000000000000000000000000
[EnvInject] - Loading node environment variables.
Building remotely on Jenkins Slave1 in workspace /home/jenkins_slave/workspace/sampro
> /usr/bin/git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> /usr/bin/git config remote.origin.url ssh://[email protected]:7888/sam/test.git # timeout=10
Fetching upstream changes from ssh://[email protected]:7888/sam/test.git
> /usr/bin/git --version # timeout=10
using GIT_SSH to set credentials Use to pull git repos
> /usr/bin/git -c core.askpass=true fetch --tags --progress ssh://[email protected]:7888/sam/test.git +refs/heads/*:refs/remotes/origin/*
> /usr/bin/git rev-parse 0000000000000000000000000000000000000000^{commit} # timeout=10
FATAL: Command "/usr/bin/git rev-parse 0000000000000000000000000000000000000000^{commit}" returned status code 128:
stdout: 0000000000000000000000000000000000000000^{commit}
stderr: fatal: ambiguous argument '0000000000000000000000000000000000000000^{commit}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
hudson.plugins.git.GitException: Command "/usr/bin/git rev-parse 0000000000000000000000000000000000000000^{commit}" returned status code 128:
stdout: 0000000000000000000000000000000000000000^{commit}
stderr: fatal: ambiguous argument '0000000000000000000000000000000000000000^{commit}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1591)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1567)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1563)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1249)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1261)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(CliGitAPIImpl.java:622)
at hudson.plugins.git.GitAPI.revParse(GitAPI.java:316)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:326)
at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:301)
at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:260)
at hudson.remoting.UserRequest.perform(UserRequest.java:121)
at hudson.remoting.UserRequest.perform(UserRequest.java:49)
at hudson.remoting.Request$2.run(Request.java:325)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
at ......remote call to Jenkins Slave1(Native Method)
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1360)
at hudson.remoting.UserResponse.retrieve(UserRequest.java:221)
at hudson.remoting.Channel.call(Channel.java:753)
at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:179)
at com.sun.proxy.$Proxy67.revParse(Unknown Source)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl.revParse(RemoteGitImpl.java:546)
at hudson.plugins.git.RevisionParameterAction.toRevision(RevisionParameterAction.java:85)
at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:903)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1017)
at hudson.scm.SCM.checkout(SCM.java:484)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1270)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:609)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:531)
at hudson.model.Run.execute(Run.java:1751)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:89)
at hudson.model.Executor.run(Executor.java:240)
Notified Stash for commit with id 8e5416d1f4fee09c74a2455eff7c4aaa9114f7e8
Finished: FAILURE
We too are seeing this issue currently. Looking at the timing, it could be tag related on our system as well.
We are using "The Tag Maker" Stash plugin. Stash 3.6.1, Jenkins 1.547
Still affecting Stash 3.10, Jenkins 1.609.1, The Tag Maker 1.3.4
I still see this issue please help FATAL: Command "C:\Program Files\Git\bin\git.exe rev-parse "60e96ea6d24f249efbdceef120a5ea0a8bf6df11^{commit}"" returned status code 128: stdout: 60e96ea6d24f249efbdceef120a5ea0a8bf6df11^{commit}
stderr: fatal: ambiguous argument '60e96ea6d24f249efbdceef120a5ea0a8bf6df11^{commit}': unknown revision or path not in the working tree.
I guess that this is not a problem regarding this plugin because I also receive the 00000000000 commit notification when using "HTTP Request Post-Receive Hook" Plugin
@chforster I think this is related to: https://bitbucket.org/a-v-r/bitbucket-http-request-hook/issues/37/nullpointer-exception-hook
I have installed Jenkins and I am new to it. . I am facing the same error and not able to figure out to solve it...