Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
Description
I have an issue where my job is not being detected as parameterized. I've looked at JENKINS-30810, but my issue is slightly different.
My Job Metadata response from /api/json has no actions array, but the parameters are defined in the property array instead:
{ "_class": "org.jenkinsci.plugins.workflow.job.WorkflowJob", "actions": [ {}, {}, {}, {}, {}, {}, {}, {}, { "_class": "hudson.plugins.checkstyle.CheckStyleProjectAction" }, {}, {}, {}, {}, { "_class": "com.cloudbees.plugins.credentials.ViewCredentialsAction" } ], ... truncated for readability "property": [ { "_class": "jenkins.model.BuildDiscarderProperty" }, { "_class": "hudson.model.ParametersDefinitionProperty", "parameterDefinitions": [ { "_class": "net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition", "defaultParameterValue": null, "description": "", "name": "BRANCH_NAME_PARAM", "type": "PT_BRANCH" }, { "_class": "net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition", "defaultParameterValue": { "_class": "net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterValue", "name": "ORIGIN_BRANCH_NAME", "value": "staging" }, "description": "", "name": "ORIGIN_BRANCH_NAME", "type": "PT_BRANCH" } ] } ],
Looking over the code in RemoteBuildConfiguration::isRemoteJobParameterized, the detect logic only works when the actions array has a parameterDefinitions entry.
This could be because my parameters are Git Branch typed, rather than a built in param type like String etc.
Versions:
Jenkins: 2.121.2
Param Remote Trigger Plugin: 3.0.2
Attachments
Activity
Field | Original Value | New Value |
---|---|---|
Description |
I have an issue where my job is not being detected as parameterized. I've looked at My Job Metadata response from /api/json has no actions array, but the parameters are defined in the property array instead: {noformat} { "_class": "org.jenkinsci.plugins.workflow.job.WorkflowJob", "actions": [ {}, {}, {}, {}, {}, {}, {}, {}, { "_class": "hudson.plugins.checkstyle.CheckStyleProjectAction" }, {}, {}, {}, {}, { "_class": "com.cloudbees.plugins.credentials.ViewCredentialsAction" } ], ... truncated for readability "property": [ { "_class": "jenkins.model.BuildDiscarderProperty" }, { "_class": "hudson.model.ParametersDefinitionProperty", "parameterDefinitions": [ { "_class": "net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition", "defaultParameterValue": null, "description": "", "name": "BRANCH_NAME_PARAM", "type": "PT_BRANCH" }, { "_class": "net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition", "defaultParameterValue": { "_class": "net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterValue", "name": "ORIGIN_BRANCH_NAME", "value": "staging" }, "description": "", "name": "ORIGIN_BRANCH_NAME", "type": "PT_BRANCH" } ] } ],{noformat} Looking over the code in (RemoteBuildConfiguration:: isRemoteJobParameterized)[https://github.com/jenkinsci/parameterized-remote-trigger-plugin/blob/master/src/main/java/org/jenkinsci/plugins/ParameterizedRemoteTrigger/RemoteBuildConfiguration.java#L992], the detect logic only works when the actions array has a parameterDefinitions entry. This could be because my parameters are Git Branch typed, rather than a built in param type like String etc. Versions: Jenkins: 2.121.2 Param Remote Trigger Plugin: 3.0.2 |
I have an issue where my job is not being detected as parameterized. I've looked at My Job Metadata response from /api/json has no actions array, but the parameters are defined in the property array instead: {noformat} { "_class": "org.jenkinsci.plugins.workflow.job.WorkflowJob", "actions": [ {}, {}, {}, {}, {}, {}, {}, {}, { "_class": "hudson.plugins.checkstyle.CheckStyleProjectAction" }, {}, {}, {}, {}, { "_class": "com.cloudbees.plugins.credentials.ViewCredentialsAction" } ], ... truncated for readability "property": [ { "_class": "jenkins.model.BuildDiscarderProperty" }, { "_class": "hudson.model.ParametersDefinitionProperty", "parameterDefinitions": [ { "_class": "net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition", "defaultParameterValue": null, "description": "", "name": "BRANCH_NAME_PARAM", "type": "PT_BRANCH" }, { "_class": "net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition", "defaultParameterValue": { "_class": "net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterValue", "name": "ORIGIN_BRANCH_NAME", "value": "staging" }, "description": "", "name": "ORIGIN_BRANCH_NAME", "type": "PT_BRANCH" } ] } ],{noformat} Looking over the code in (RemoteBuildConfiguration::isRemoteJobParameterized)[https://github.com/jenkinsci/parameterized-remote-trigger-plugin/blob/master/src/main/java/org/jenkinsci/plugins/ParameterizedRemoteTrigger/RemoteBuildConfiguration.java#L992], the detect logic only works when the actions array has a parameterDefinitions entry. This could be because my parameters are Git Branch typed, rather than a built in param type like String etc. Versions: Jenkins: 2.121.2 Param Remote Trigger Plugin: 3.0.2 |
Description |
I have an issue where my job is not being detected as parameterized. I've looked at My Job Metadata response from /api/json has no actions array, but the parameters are defined in the property array instead: {noformat} { "_class": "org.jenkinsci.plugins.workflow.job.WorkflowJob", "actions": [ {}, {}, {}, {}, {}, {}, {}, {}, { "_class": "hudson.plugins.checkstyle.CheckStyleProjectAction" }, {}, {}, {}, {}, { "_class": "com.cloudbees.plugins.credentials.ViewCredentialsAction" } ], ... truncated for readability "property": [ { "_class": "jenkins.model.BuildDiscarderProperty" }, { "_class": "hudson.model.ParametersDefinitionProperty", "parameterDefinitions": [ { "_class": "net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition", "defaultParameterValue": null, "description": "", "name": "BRANCH_NAME_PARAM", "type": "PT_BRANCH" }, { "_class": "net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition", "defaultParameterValue": { "_class": "net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterValue", "name": "ORIGIN_BRANCH_NAME", "value": "staging" }, "description": "", "name": "ORIGIN_BRANCH_NAME", "type": "PT_BRANCH" } ] } ],{noformat} Looking over the code in (RemoteBuildConfiguration::isRemoteJobParameterized)[https://github.com/jenkinsci/parameterized-remote-trigger-plugin/blob/master/src/main/java/org/jenkinsci/plugins/ParameterizedRemoteTrigger/RemoteBuildConfiguration.java#L992], the detect logic only works when the actions array has a parameterDefinitions entry. This could be because my parameters are Git Branch typed, rather than a built in param type like String etc. Versions: Jenkins: 2.121.2 Param Remote Trigger Plugin: 3.0.2 |
I have an issue where my job is not being detected as parameterized. I've looked at My Job Metadata response from /api/json has no actions array, but the parameters are defined in the property array instead: {noformat} { "_class": "org.jenkinsci.plugins.workflow.job.WorkflowJob", "actions": [ {}, {}, {}, {}, {}, {}, {}, {}, { "_class": "hudson.plugins.checkstyle.CheckStyleProjectAction" }, {}, {}, {}, {}, { "_class": "com.cloudbees.plugins.credentials.ViewCredentialsAction" } ], ... truncated for readability "property": [ { "_class": "jenkins.model.BuildDiscarderProperty" }, { "_class": "hudson.model.ParametersDefinitionProperty", "parameterDefinitions": [ { "_class": "net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition", "defaultParameterValue": null, "description": "", "name": "BRANCH_NAME_PARAM", "type": "PT_BRANCH" }, { "_class": "net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition", "defaultParameterValue": { "_class": "net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterValue", "name": "ORIGIN_BRANCH_NAME", "value": "staging" }, "description": "", "name": "ORIGIN_BRANCH_NAME", "type": "PT_BRANCH" } ] } ],{noformat} Looking over the code in [RemoteBuildConfiguration::isRemoteJobParameterized|https://github.com/jenkinsci/parameterized-remote-trigger-plugin/blob/master/src/main/java/org/jenkinsci/plugins/ParameterizedRemoteTrigger/RemoteBuildConfiguration.java#L992], the detect logic only works when the actions array has a parameterDefinitions entry. This could be because my parameters are Git Branch typed, rather than a built in param type like String etc. Versions: Jenkins: 2.121.2 Param Remote Trigger Plugin: 3.0.2 |
Status | Open [ 1 ] | In Progress [ 3 ] |
Resolution | Fixed [ 1 ] | |
Status | In Progress [ 3 ] | Resolved [ 5 ] |
Status | Resolved [ 5 ] | Closed [ 6 ] |
It's a clear description, thanks.
I'll add this feature in the future.