Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-52673

isRemoteParameterized detection fails for job with git params

    XMLWordPrintable

Details

    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

          chriswhite199 Chris White created issue -
          chriswhite199 Chris White made changes -
          Field Original Value New Value
          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:

           
          {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 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:

           
          {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
          chriswhite199 Chris White made changes -
          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:

           
          {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 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:

           
          {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
          cashlalala KaiHsiang Chang made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          cashlalala KaiHsiang Chang made changes -
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Resolved [ 5 ]
          cashlalala KaiHsiang Chang made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

          People

            cashlalala KaiHsiang Chang
            chriswhite199 Chris White
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: