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

isRemoteParameterized detection fails for job with git params

    XMLWordPrintable

    Details

    • Similar Issues:

      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

          Hide
          cashlalala KaiHsiang Chang added a comment -

          It's a clear description, thanks. 

          I'll add this feature in the future.

          Show
          cashlalala KaiHsiang Chang added a comment - It's a clear description, thanks.  I'll add this feature in the future.
          Hide
          chriswhite199 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

          Show
          chriswhite199 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
          Hide
          cashlalala KaiHsiang Chang added a comment -

          Chris White cheers

          Show
          cashlalala KaiHsiang Chang added a comment - Chris White cheers
          Show
          cashlalala KaiHsiang Chang added a comment - solved in  https://github.com/jenkinsci/parameterized-remote-trigger-plugin/pull/44
          Hide
          chriswhite199 Chris White added a comment -

          KaiHsiang Chang - Any idea when this might be released?

          Show
          chriswhite199 Chris White added a comment - KaiHsiang Chang - Any idea when this might be released?
          Hide
          cashlalala KaiHsiang Chang added a comment -

          Chris White,  in these two days!

          Show
          cashlalala KaiHsiang Chang added a comment - Chris White ,  in these two days!
          Hide
          cashlalala KaiHsiang Chang added a comment -

          Chris White, v3.0.3 release, give it a try

          Show
          cashlalala KaiHsiang Chang added a comment - Chris White , v3.0.3 release, give it a try

            People

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

              Dates

              • Created:
                Updated:
                Resolved: