Consider this scenario:
- we have 1 set of scripts to build two projects
- the first project requires a certain executable (lets say GWT 2.0)
- the second project requires another executeable (lets say GWT 2.4)
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:
- Add the capability to the job for the relevant GWT version (already doing that)
- Referencing the capability in a generic way to be able to do something like:
-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