In the past we have simply defined our custom hooks in <git_install_dir>/share/git-core/templates/hooks in order to have them included in all new repositories created by Stash.
In evaluating Stash 2.0.1, it appears that we need a way to automatically add our post-receive hook to <STASH_HOME>/data/repositories/<REPO_ID>/hooks/post-receive.d. I would really appreciate any suggestions on how to manage this. Thanks.
After creating a new repository Stash should be moving your pre/post receive hooks to pre/post-receive.d/10_custom. It is also possible to create post-receive.d/10_your_script in the templates directory directly (only in Stash 2.0.1 though).
Longer term we're planning to manage hooks _in_ Stash as plugins rather than as shell scripts on the filesystem. This is how we implemented branch permissions, and we hope to enhance both the documentation and the APIs in an uncoming release. If you're interested watch/vote on the following issue:
I hope this helps.
PS. If you're just trying to do a task asynchronously after every push I have created a simple Stash plugin that demonstrates a Jenkins build hook, as well as mentioning relevant parts of our in-app hooks API as well.
I have customized my post-receive hook to get email after every push. I have used atlassian SDK. So I have few java files and a soy template. How do I push them to my stash? Where exactly I have to copy it?
Please note that I want to do this only for one repository.
Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs