Community
Participate
Working Groups
Created attachment 177387 [details] BuildParametersConfig.png 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]). Kicking a build from the new Builds view within Eclipse *silently* fails to start such a parameterized build.
Created attachment 177388 [details] BuildParameters.png Steffen, I could not find a Bugzilla component for "Builds". Please move this bug to the appropriate place.
I've just found out how to query the job config by appending "config.xml" to the job URL, as in https://build.eclipse.org/hudson/job/emf-cdo-integration/config.xml
The parameter definitions can be found in the resulting XML: <project> <hudson.model.ParametersDefinitionProperty> <parameterDefinitions> The following parameter types seem possible: FileParameterDefinition, BooleanParameterDefinition, ChoiceParameterDefinition, JobParameterDefinition, PasswordParameterDefinition, RunParameterDefinition, StringParameterDefinition See also http://hudson-ci.org/javadoc/hudson/model/ParameterDefinition.html
I've stripped down the HTML of my build's parameters form for you: <form method="post" action="build" name="parameters"> <div name="parameter" description=""> <input value="BUCKMINSTER_LOGLEVEL" type="hidden" name="name"/> <select name="value"> <option value="INFO">INFO</option> <option value="WARNING">WARNING</option> <option value="ERROR">ERROR</option> <option value="DEBUG">DEBUG</option> </select> </div> <div name="parameter" description=""> <input value="CLEAN_TOOLS" type="hidden" name="name"/> <input checked="true" class=" " type="checkbox" name="value"/> </div> <div name="parameter" description=""> <input value="CLEAN_TP" type="hidden" name="name"/> <input checked="true" class=" " type="checkbox" name="value"/> </div> <div name="parameter" description=""> <input value="CLEAN_WORKSPACE" type="hidden" name="name"/> <input checked="true" class=" " type="checkbox" name="value"/> </div> <div name="parameter" description=""> <input value="CLEAN_OUTPUT" type="hidden" name="name"/> <input checked="true" class=" " type="checkbox" name="value"/> </div> <div name="parameter" description=""> <input value="BUILD_TYPE" type="hidden" name="name"/> <select name="value"> <option value="N">N</option> <option value="I">I</option> <option value="S">S</option> <option value="R">R</option> </select> </div> <div name="parameter" description=""> <input value="BUILD_TARGET" type="hidden" name="name"/> <select name="value"> <option value="test">test</option> <option value="site.p2">site.p2</option> <option value="provision">provision</option> <option value="promote.sites">promote.sites</option> </select> </div> <div name="parameter" description=""> <input value="SITE_PACK200" type="hidden" name="name"/> <input checked="true" class=" " type="checkbox" name="value"/> </div> <input value="Build" class="submit-button" type="submit" name="Submit"/> </form>
Created attachment 177394 [details] PSF For my own convenience ;-)
Thanks for the detailed feature request. I am not sure if we would want to support a native interface for providing the parameter controls but it would be nice to at least delegate to the browser if running a build requires additional input. Thanks so much for creating the PSF! I'll upload that to our website. You can tag all Hudson/Builds related bugs as [build] for now. We'll move those to a separate component once we have figured out how to proceed with the Mylyn project restructuring.
(In reply to comment #6) > Thanks for the detailed feature request. You're welcome ;-) > I am not sure if we would want to > support a native interface for providing the parameter controls But that would make it way more acceptable. I know that many projects at Eclipse use parameters. I'm willing to help...
> > I am not sure if we would want to > > support a native interface for providing the parameter controls > > But that would make it way more acceptable. I know that many projects at Eclipse > use parameters. I'm willing to help... Great to hear :). I should have phrased that better... A native interface would certainly be preferable but I would expect that to require significantly more effort than browser based solution. That said, if anyone is interested in working on this, it would be a very welcome enhancement.
Created attachment 177546 [details] Patch v1 - complete, but with 403 status on runBuild
Thanks. Please try adding this call after createPostMethod(getJobUrl(job) + "/build") to fix the 403: method.setDoAuthentication(true); . It looks like Hudson responds with a 302 to the post request on success, probably need to fix the check Looks good overall. I'll post some more feedback later today.
Created attachment 177584 [details] Patch v2 stripped down to builds.core
I confirm that I'm the only author of the contributed patch and that I apply the EPL to this contribution.
Created attachment 177588 [details] PSF added JSON from Orbit
Thanks a lot! I have applied the patch and re-generated the model. I changed for requesting a build slightly to take a request object so we can extend it in the future, e.g. to add support for specifying a delay.