Consider this scenario:
I configured two custom capabilities on the bamboo server: GWT2.0 and GWT 2.4.
Each project has its own plan in bamboo and the relevant jobs are marked with the relevant requirement.
To pass the location of the GWT folder to each build script (Ant) I pass a system property to the build target like this:
-DgwtHome=${bamboo.capability.GWT_XYZ}
What troubles me is that I need to alter this system property to include the correct capability's path. What I would want to do is:
-DgwtHome=${bamboo.capability.GWT}
This would require something like a custom type level on capabilities along with the possibility to find a capability based on its type using bamboo variabled.
Is something like this possible? Are there other ways of doing this kind of abstraction?
I have several cases where I could use this patterns, its not only for the GWT compiler location (app server location for ejb compiles ...).
many thanks
I dont think there is a native way to do what you are wanting... the capability part of the variable I believe is only designed to obtain the value of that particular agent's capability so it can be used. So if AgentA had GWT 2.0 in "/usr/bin" and AgentB had GWT 2.0 in "/usr/local/bin" then you could get the path for that particular build.
Yeah that's what I thought, maybe Atlassian would find this something neath to add to the product?
Thanks for your input!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
According to the Bamboo documentation one is supposed to do this, but it does not appear to work. See the documentation -- https://confluence.atlassian.com/display/BAMBOO/Bamboo+variables#Bamboovariables-Usingcapabilities
And I found references to this capability back in Bamboo 2.
Following the instructions to see the value to be used I use this in a script task (Bamboo running on Linux)
echo "GIT ${bamboo.capablity.system.git.executable}"
I get errors like this
02-Jan-2014 11:01:02 /prodinfolocal/atlassian-bamboo-5.2/temp/E2P-GD-CR-12-ScriptBuildTask-6848542872684244705.sh: line 2: GIT at ${bamboo.capablity.system.git.executable}: bad substitution
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just to help anyone looking, this does in fact work. There is a typo in the syntax listed in the response:
${bamboo.capability.system.git.executable}
Also, you would need to pass this as an argument into the script for it to work correctly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.