Add some additional URL variables
${project.key}
returns the key as it is configured, which is normally auto-generated by Stash and thus in upper case.
The clone urls are automatically lower cased by stash. So, if I set up a build job on my Jenkins instance, I mostly use the lower case clone URL (copy & paste).
###Example### post-receive-hook URL:
http://jenkins.server/git/notifyCommit?url=http://stash.server/scm/${project.key}/${repository.slug}.git
is expanded to in http://jenkins.server/git/notifyCommit?url=http://stash.server/scm/MYPROJECT/my.repo.git
Jenkins Build repo URL:
http[s]://stash.server/scm/myproject/my.repo.git
This setup won't trigger a build. Using a hardcoded value "myproject" in the hook URL works.
A variable like ${project.key.lower}
would be nice to make this hardcoding unnecessary.
Additionally something like ${base.url}
would be great to get the currently configured Stash base url automatically.
Comments (6)
-
-
Before I forget - the translations are the following:
- ${project.key.lower}
- ${baseUrl}
- ${baseUrl.protocol}
- ${baseUrl.host}
- ${baseUrl.port}
- ${baseUrl.path}
-
- changed status to open
-
- changed status to resolved
After doing some more manual testing, I published the update. Enjoy :-)
-
-
assigned issue to
-
assigned issue to
-
reporter Wow, that was fast. Thanks :)
- Log in to comment
Hi Florian,
thank you very much for your request. I already implemented it (devel branch #39e69fb) but I still would like to test it before releasing it. If you feel like it you can try it out yourself - there is a snapshot in the download section :-)
Merry Christmas :-)
Cheers, Alex