Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 328204 - [build][hudson] retrieve build parameter from job and not config
Summary: [build][hudson] retrieve build parameter from job and not config
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: 0.9   Edit
Assignee: Steffen Pingel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 323759
  Show dependency tree
 
Reported: 2010-10-20 00:11 EDT by Steffen Pingel CLA
Modified: 2012-01-26 20:39 EST (History)
2 users (show)

See Also:


Attachments
mylyn/context/zip (55.89 KB, application/octet-stream)
2012-01-26 20:39 EST, Steffen Pingel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steffen Pingel CLA 2010-10-20 00:11:59 EDT
The /job/action and /job/parameter tags of the XML output of a Hudson job have a partial description of required build parameters:

<parameterDefinition>
  <defaultParameterValue>
    <value>INFO</value>
  </defaultParameterValue>
  <description/>
  <name>BUCKMINSTER_LOGLEVEL</name>
  <choice>INFO</choice>
  <choice>WARNING</choice>
  <choice>ERROR</choice>
  <choice>DEBUG</choice>
</parameterDefinition>

The only two things that are missing are the parameter types and for Run Parameter the project name. It seems that it would be straight forward to include that.

A full description of parameters is only availalable from the config.xml but that may not be readable by all users and requires a separate request, e.g. https://build.eclipse.org/hudson/job/emf-cdo-integration/config.xml :

<parameterDefinitions>
  <hudson.model.ChoiceParameterDefinition>
    <name>BUCKMINSTER_LOGLEVEL</name>
    <description/>
    <choices class="java.util.Arrays$ArrayList">
      <a class="string-array">
        <string>INFO</string>
        <string>WARNING</string>
        <string>ERROR</string>
        <string>DEBUG</string>
      </a>
    </choices>
  </hudson.model.ChoiceParameterDefinition>
  <hudson.model.RunParameterDefinition>
    <name>Run Parameter</name>
    <description>Run Parameter Description.</description>
    <projectName>test-ant</projectName>
  </hudson.model.RunParameterDefinition>
</parameterDefinitions>
Comment 1 Lucas Panjer CLA 2010-11-19 16:20:48 EST
I added these parameters to the job API in Hudson Core. 

See:
HUDSON-8133: Add parameter definition type and job name to job API
http://issues.hudson-ci.org/browse/HUDSON-8133
Comment 2 Steffen Pingel CLA 2010-11-19 17:05:16 EST
Thanks Lucas! I'll schedule this for the next release to consume the API changes.
Comment 3 Steffen Pingel CLA 2012-01-26 20:39:25 EST
Parameters are now parsed from the action list of the job. The job's config.xml is not accessed any longer.
Comment 4 Steffen Pingel CLA 2012-01-26 20:39:30 EST
Created attachment 210163 [details]
mylyn/context/zip