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

isRemoteParameterized detection fails for job with git params

      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

          [JENKINS-52673] isRemoteParameterized detection fails for job with git params

          It's a clear description, thanks. 

          I'll add this feature in the future.

          KaiHsiang Chang added a comment - It's a clear description, thanks.  I'll add this feature in the future.

          Chris White added a comment -

          Submitted https://github.com/jenkinsci/parameterized-remote-trigger-plugin/pull/44 to address this - tested on my instance and now works as expected

          Chris White added a comment - Submitted https://github.com/jenkinsci/parameterized-remote-trigger-plugin/pull/44 to address this - tested on my instance and now works as expected

          KaiHsiang Chang added a comment - chriswhite199 cheers

          KaiHsiang Chang added a comment - solved in  https://github.com/jenkinsci/parameterized-remote-trigger-plugin/pull/44

          Chris White added a comment -

          cashlalala - Any idea when this might be released?

          Chris White added a comment - cashlalala - Any idea when this might be released?

          chriswhite199,  in these two days!

          KaiHsiang Chang added a comment - chriswhite199 ,  in these two days!

          chriswhite199, v3.0.3 release, give it a try

          KaiHsiang Chang added a comment - chriswhite199 , v3.0.3 release, give it a try

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

              Created:
              Updated:
              Resolved: