I'm trying to write a Bamboo plugin that can signal our remote agent manager to spawn the required remote agents on our HPC cluster as a pre-stage action. All our plan jobs specify a number of custom capabilities used by the HPC cluster and the remote agents are spawned with these capabilities by the manager.
My problem is that I can't find how to access the required capabilities for the jobs within the stage. I can access the BuildExecution and BuildContext from the StageExecution which seem to be able to provide some of the information but I can't find the job requirements (set on the requirements tab of the job configuration).
Please can someone point me in the right direction! Thanks for your assistance.
Since this is happening on server, you should be able to use Spring-injected CachedPlanManager to retrieve Job object
//fetch Job from Plan cache Job myJob = cachedPlanManager.getPlanByKey(buildExecution.getPlanResultKey().getPlanKey(), Job.class); //and now you can read requirements: RequirementSet requirements = myJob.getEffectiveRequirementSet()
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.