-
Improvement
-
Resolution: Fixed
-
Minor
jp.ikedam.jenkins.plugins.extensible_choice_parameter.ExtensibleChoiceParameterDefinition#getChoiceList
should be @Exported in order to get the choiceList in Remote Access API.
It allows programs retrieve choices in this way, with Remote Access API (https://www.jenkins.io/doc/book/using/remote-access-api/):
$ curl --user username:password <JENKINS_URL>/job/<JOB_NAME>/api/json { "_class": "hudson.model.FreeStyleProject", ... "description": "", "displayName": "job1", "displayNameOrNull": null, "fullDisplayName": "job1", "fullName": "job1", "name": "job1", ... "property": [ { "_class": "hudson.model.ParametersDefinitionProperty", "parameterDefinitions": [ { "_class": "jp.ikedam.jenkins.plugins.extensible_choice_parameter.ExtensibleChoiceParameterDefinition", "defaultParameterValue": { "_class": "hudson.model.StringParameterValue", "name": "extchoice1", "value": "value1" }, "description": "", "name": "extchoice1", "type": "ExtensibleChoiceParameterDefinition", "choiceList": [ "value1", "value2", "value3" ] } ] } ], ... }
Built-in choice parameter also exposed its choice in JENKINS-3703 to allow Eclipse retrieve choices to trigger builds. Built-in choice returns choices in REST api in this way:
{ "_class": "hudson.model.ChoiceParameterDefinition", "defaultParameterValue": { "_class": "hudson.model.StringParameterValue", "name": "choice1", "value": "value1" }, "description": "", "name": "choice1", "type": "ChoiceParameterDefinition", "choices": [ "value1", "value2", "value3" ] }
See https://github.com/jenkinsci/extensible-choice-parameter-plugin/pull/43
- relates to
-
JENKINS-3703 Parameterized Build: get the list of declared parameters and default values
-
- Closed
-
-
JENKINS-66145 choices not exposed via api from view
-
- Resolved
-
[JENKINS-63786] Expose live choices to the remote API (for programmatic consumption)
Assignee | New: ikedam [ ikedam ] |
Description |
Original:
Is it somehow possible to expose choices to the remote API job endpoint? Let's say we build a job with choices A and B and afterwards I remove B from the possible choices so the remote API will have only A without building the job? I need this feature especially for the System Groovy Script Choice Parameter in order to retrieve only online agents which can change from time to time independently of the job or a build. So the groovy script needs to be run on each call of `/job/JOBNAME/api/json`. |
New: `jp.ikedam.jenkins.plugins.extensible_choice_parameter.ExtensibleChoiceParameterDefinition#getChoiceList` should be `@Exported` in order to get the choiceList in Remote Access API. |
Description | Original: `jp.ikedam.jenkins.plugins.extensible_choice_parameter.ExtensibleChoiceParameterDefinition#getChoiceList` should be `@Exported` in order to get the choiceList in Remote Access API. |
New:
{code:java} jp.ikedam.jenkins.plugins.extensible_choice_parameter.ExtensibleChoiceParameterDefinition#getChoiceList{code} should be @Exported in order to get the choiceList in Remote Access API. |
Description |
Original:
{code:java} jp.ikedam.jenkins.plugins.extensible_choice_parameter.ExtensibleChoiceParameterDefinition#getChoiceList{code} should be @Exported in order to get the choiceList in Remote Access API. |
New:
{code:java} jp.ikedam.jenkins.plugins.extensible_choice_parameter.ExtensibleChoiceParameterDefinition#getChoiceList{code} should be @Exported in order to get the choiceList in Remote Access API. See https://github.com/jenkinsci/extensible-choice-parameter-plugin/pull/43 |
Link |
New:
This issue relates to |
Description |
Original:
{code:java} jp.ikedam.jenkins.plugins.extensible_choice_parameter.ExtensibleChoiceParameterDefinition#getChoiceList{code} should be @Exported in order to get the choiceList in Remote Access API. See https://github.com/jenkinsci/extensible-choice-parameter-plugin/pull/43 |
New:
{code:java} jp.ikedam.jenkins.plugins.extensible_choice_parameter.ExtensibleChoiceParameterDefinition#getChoiceList{code} should be @Exported in order to get the choiceList in Remote Access API. It allows programs retrieve choices in this way, with Remote Access API (https://www.jenkins.io/doc/book/using/remote-access-api/): {code} $ curl --user username:password <JENKINS_URL>/job/<JOB_NAME>/api/json { "_class": "hudson.model.FreeStyleProject", ... "description": "", "displayName": "job1", "displayNameOrNull": null, "fullDisplayName": "job1", "fullName": "job1", "name": "job1", ... "property": [ { "_class": "hudson.model.ParametersDefinitionProperty", "parameterDefinitions": [ { "_class": "jp.ikedam.jenkins.plugins.extensible_choice_parameter.ExtensibleChoiceParameterDefinition", "defaultParameterValue": { "_class": "hudson.model.StringParameterValue", "name": "extchoice1", "value": "value1" }, "description": "", "name": "extchoice1", "type": "ExtensibleChoiceParameterDefinition", "choiceList": [ "value1", "value2", "value3" ] } ] } ], ... } {code} Built-in choice parameter also exposed its {{choice}} in {code} { "_class": "hudson.model.ChoiceParameterDefinition", "defaultParameterValue": { "_class": "hudson.model.StringParameterValue", "name": "choice1", "value": "value1" }, "description": "", "name": "choice1", "type": "ChoiceParameterDefinition", "choices": [ "value1", "value2", "value3" ] } {code} See https://github.com/jenkinsci/extensible-choice-parameter-plugin/pull/43 |
Summary | Original: Expose live choices to the remote API | New: Expose live choices to the remote API (for programmatic consumption) |
Released As | New: https://github.com/jenkinsci/extensible-choice-parameter-plugin/blob/master/CHANGELOG.adoc#170 | |
Assignee | Original: ikedam [ ikedam ] | New: Danny Trunk [ dtrunk90 ] |
Resolution | New: Fixed [ 1 ] | |
Status | Original: Open [ 1 ] | New: Fixed but Unreleased [ 10203 ] |
Link |
New:
This issue relates to |
Thanks a lot for your contribution.
extensible-choice-parameter-1.7.0 is released.
It will be available in the update center in a day.
Please try that.