Closed chahn1138 closed 4 years ago
Pardon my attempt to use ascii to format the thing....wow
More Data...just added as a comment on the related card:
I have queries on two different boards, the Atlassian Community and the Github site of the plugins creators. No responses yet.
I am now testing using the "safe dir" and the simplest of scripts:
[stash@XXXXX 765]$ /var/atlassian/bitbucket-home/external-hooks/test.sh IN SCRIPT: Test
[stash@XXXXX 765]$ cat !$ cat /var/atlassian/bitbucket-home/external-hooks/test.sh
echo "IN SCRIPT: Test" exit 0
Note the simplicity of the script.
The error seen in the log when one of these pushes hangs: 2017-10-06 08:28:48,520 ERROR [AtlassianEvent::thread-3] christopher.hahn @16MC444x508x1769362x0 fcszye X.X.X.X SSH - git-receive-pack '~christopher.hahn/hooktest.git' c.n.s.e.hook.ExternalPreReceiveHook Error running [/var/atlassian/bitbucket-home/external-hooks/test.sh, ] in /var/atlassian/bitbucket-home/shared/data/repositories/765 java.io.IOException: Broken pipe
2017-10-06 08:38:19,894 ERROR [AtlassianEvent::thread-3] christopher.C366x516x1773236x0 1visy70 X.X.X.X SSH - git-receive-pack '~christopher.hahn/hooktest.git' c.n.s.e.hook.ExternalPreReceiveHook Error running [/var/atlassian/bitbucket-home/external-hooks/test.sh, ] in /var/atlassian/bitbucket-home/shared/data/repositories/765 java.io.IOException: Stream closed
I got my own answer: I had first tried to get this working using a script in the traditional location...the repos hook directory. Well, I had left a copy of some version of my script down on the post-receive.d sub-directory. What I was seeing that that "second script" being run, over and over and over. The idea here is that one should just stay away from using hooks with Bamboo unless you are using a plugin to drive them.
Atlassian Bitbucket v4.14.4
From my own repos setting page: