java - Jenkins Plugin development, use one global config for two builders? -


i have 2 builders within plugin developing, want them share same global config. have repeatable list of server details of can select server want use drop down in buildera's config. want same builderb's config, requirs me duplicating global config buildera , user filling out 2 lots of global config.

is there anyway can access buildera's global config? or make buildera's global config global....

i found this: can 2 different jenkins builders exist in same hpi , share same global configuration? , copied it, test, doesnt tell how can globalfield1 in perform method of mybuildstepaclass.

you can this. did selenium axis plugin needed name of selenium server kept in related class

this in groovy easy convert.

//so need @ name of selenium server in global config protected static descriptor<? extends complexaxisdescriptor> gettopleveldescriptor(){     seleniumaxis.descriptorimpl sad = jenkins.getinstance().getdescriptor(seleniumaxis.class)     sad.load()     return sad } 

source

i think need change

<? extends complexaxisdescriptor> 

to

<? extends descriptor> 

and use descriptor class otherwise methods not accessible


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -