Community
Participate
Working Groups
From bug 323568: Hudson builds can have parameters (see attachment #1 [details]) that lead to a parameter entry page when a build is kicked (see attachment #2 [details]). The connector should have support for parsing parameter definitions.
Created attachment 177585 [details] Patch v1 - JSON form encoding missing
I confirm that I'm the only author of the contributed patch and that I apply the EPL to this contribution.
I have applied the patch but added a guard around the retrieval of the configuration since this can fails if a user does not have the corresponding permissions. Since the required information is already provided in the original request for the list of plans I would prefer to parse it from there, e.g.: https://build.eclipse.org/hudson/api/xml?wrapper=hudson&depth=1&xpath=/hudson/job[name%3D%27emf-cdo-integration%27]&exclude=/hudson/job/build The only information that seems to be missing is the type. What do you think? I have tweaked RestfulHudsonClient.runBuild() to send a JSON representation of the request along which seems to be required by Hudson.
(In reply to comment #3) > I have applied the patch but added a guard around the retrieval of the > configuration since this can fails if a user does not have the corresponding > permissions. Good catch! I generally wondered if request failures should be better indicated to the user. IIRC I've never received failure info in the Error Log or in a dialog... > Since the required information is already provided in the original > request for the list of plans I would prefer to parse it from there, e.g.: > > https://build.eclipse.org/hudson/api/xml?wrapper=hudson&depth=1&xpath=/hudson/job[name%3D%27emf-cdo-integration%27]&exclude=/hudson/job/build > > The only information that seems to be missing is the type. What do you think? Excellent idea! But we'd definitely need the type. > I have tweaked RestfulHudsonClient.runBuild() to send a JSON representation of > the request along which seems to be required by Hudson. Thank you ;-)
> Good catch! I generally wondered if request failures should be better indicated > to the user. IIRC I've never received failure info in the Error Log or in a > dialog... I have that on my list of things to fix. BuildSchedulerUi is supposed to handle job results but the implementation is not yet complete.
Created attachment 177874 [details] all parameter types
The run and file parameter types are not yet properly supported. Apparently the AJAX string for run parameters needs to specify the id of a particular run and files need to included in a multi-part mime post (see attachments).
Let's close this bug for now. We can open other bugs to add support for addtional types. I have created bug 328204 to improve the Hudson API to provide parameter types in the job schema.