Sunday, 15 August 2010

java - Jenkins Plugin, share local configuration -



java - Jenkins Plugin, share local configuration -

i have plugin 2 builders (buildera & builderb)

each builder has own local config step , dropdown field called 'server', default value 'defualt' , options have been defined global. these steps can run independently (so buildera doesn't need builderb ...) or togher buildera b.

when running e.g. buildera builderb, if buildera has had server set should able leave builderb default , should pick server used buildera. i've gotten close with:

project p = (project)build.getproject(); list<builder> blist = p.getbuilders(); for(builder b : blist){ //somethinghere }

from debugging blist contains builders build , in loop b specific builder in case buildera. can name check right builder, can not server value (though can see debug).

any ideas?

fixed it!

check b class looking (example buildera) then:

buildera = (buildera)b;

you can access getter methods other builder

java jenkins jenkins-plugins

No comments:

Post a Comment