AJAX like functionality in jenkins job config

85 views
Skip to first unread message

Adam Scarborough

unread,
Mar 26, 2015, 8:19:09 AM3/26/15
to jenkin...@googlegroups.com
hi, i'm wondering if anyone here might be able to comment of the feasibility of the following:

I'm trying to build a jenkins plugin in order to assist with our release/deployment process.

in order to do this i want to retrieve parameters from a different job and present these to a user in the form of a drop down

in order to do this i need to

1) create a drop down consisting of a listing all jobs currently in jenkins (i beleive this is reasonably trivial)
2) dependent on what is selected in that drop down display another drop down consisting of the parameters used in that job
3) display a drop down on the parameters page (i believe i can do this by extending dynamic extensible parameters)

the problem i have is step 2 - would anyone be able to comment on the plausibility of this and if possible how i might accomplish this? (from a web ui perspective i want to make an AJAX call when i update drop down 1 which updates drop down 2)

Thanks
Adam

Jesse Glick

unread,
Mar 26, 2015, 10:10:54 AM3/26/15
to Jenkins Dev
On Thu, Mar 26, 2015 at 8:19 AM, Adam Scarborough <sca...@gmail.com> wrote:
> 1) create a drop down consisting of a listing all jobs currently in jenkins
> (i beleive this is reasonably trivial)
> 2) dependent on what is selected in that drop down display another drop down
> consisting of the parameters used in that job

I *think* you can do this without custom JavaScript, by having the
doFill*Items descriptor method for the second dropdown accept a
parameter marked not only @QueryParameter but also @RelativePath. The
support in Jenkins core for this kind of stuff is quite patchy,
though—it may or may not “just work”, and if it does not, debugging
why is tricky.
Reply all
Reply to author
Forward
0 new messages