-
Type:
Suggestion
-
Resolution: Answered
-
None
-
Component/s: Repository - Hooks
-
None
I'm trying to trigger a simple build/deploy script on commit to one of our Stash repositories.
I know that if we were running a straight git repo (i.e. not Stash), all I would need to do would be to add it as a post-receive script to the hooks folder for the repo, and I'd be done and onto the next job. For example, in this case, I just want to do something as simple as this...
curl -S http://www.myserver.com/trigger-my-deployment?token=mysecrettoken
Unfortunately, it seems the Atlassian devs deemed that Stash admins would not understand or want to be able to do this?!...
https://blogs.atlassian.com/2013/03/stash-git-hooks-api/
I strongly disagree! Stash should be making git repo admin easier, not harder. The way it is now, what is a simple 4-5 minute job in straight git, that ought to be a 1-2 minute job with Stash is just not as straightforward as it could be. Currently, I am faced with having to scrub up my rusty Java skills, break out a dev environment, and spend a considerable amount of time writing/debugging/testing/deploying a whole bunch of custom Java code.
IMHO, there should be a standard Atlassian plugin, provided by default with Stash, that provides a very simple 'Script' hook that allows us to run snippets of shell script, a bit like how Bamboo/Jenkins works. Simple. Generic. Effective.
I've hunted through the marketplace for a third party plugin that does this, but I could find one and I really don't feel I should have to for such a basic requirement. It should be a default capability. Stash should be extending git's functionality, not stubbing it.