I am trying to create a stash post-receive repository hook. I followed the "Starting from scratch" guide located at https://developer.atlassian.com/stash/docs/latest/how-tos/creating-a-stash-plugin.html.
After installing the atlassian SDK and its dependencies, I executed these commands:
I then ran atlas-debug, opened Firefox, went to the Stash URL provided by atlas-debug, and verified that the plugin shows up on the repository hooks page for Project 1 / rep_1. When I clicked "Enabled", a form appeared with a text field to enter the url. The description for the text field said "Some description for url".
As a quick test, I wanted to try changing the description to something else. I opened "src/main/resources/static/my-hook.soy", changed the description to be "foo bar", and saved the file.
Next, I re-ran atlas-debug and went back to Firefox to enable the plugin again. After clicking "Enabled" for the plugin, I noticed the description of the text field said "Some description for url" instead of "foo bar". It did not seem to be picking up my modifications to the .soy file.
My attempts to fix the problem include:
I also grepped for "Some description for url", in case it was coming from somewhere other than the .soy template but could not find any references to it.
Am I missing something here? Is there something I am supposed to do to get my .soy file changes to take affect?
For your reference, atlas-version says:
ATLAS Version: 4.2.0
ATLAS Home: /usr/share/atlassian-plugin-sdk-4.2.0
ATLAS Scripts: /usr/share/atlassian-plugin-sdk-4.2.0/bin
ATLAS Maven Home: /usr/share/atlassian-plugin-sdk-4.2.0/apache-maven
Executing: /usr/share/atlassian-plugin-sdk-4.2.0/apache-maven/bin/mvn --version -gs /usr/share/atlassian-plugin-sdk-4.2.0/apache-maven/conf/settings.xml
Apache Maven 2.1.0 (r755702; 2009-03-18 14:10:27-0500)
Java version: 1.6.0_43
Java home: /usr/lib/jvm/java-6-oracle/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux" version: "3.2.0-36-generic" arch: "amd64" Family: "unix"
I think there are some minor issues around our caching of plugins on restart. The good news is that by using 'atlas-cli' and then 'pi' you can both avoid this issue and not have to restart your server every time.
Let me know if that helps.
Thank you for the assisstance, Charles.
I ran the following commands:
After that, I refreshed the Hooks page and clicked "Enabled" again. Unfortunately, the description still said "Some description for url" instead of "foo bar".
Next, I completely cleared everything in Firefox's cache. After doing that, "foo bar" started to appear. My problem is now solved.
This experience was very frustrating for me. In case you or anyone else who reads this is capable of improving the experience of plugin developers, here are some suggestions:
Thank you again, Charles. Your timely response was very much appreciated.
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