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

Parameters are mixed up in parameters page when job was triggered by pipeline upstream job with build step

    XMLWordPrintable

Details

    • pipeline-build-step 2.13

    Description

      I have job job_with_parameters with several parameters:

      If I trigger job manually and go to parameters section in triggered build, I see parameters in the right order:

      If I trigger this job from another freestyle jobs using Parameterized Trigger plugin, parameters will be in the right order as well:

       

      However, when I trigger this job from pipeline job using build step, parameters are mixed up in parameters page of triggered build:

      build job: "job_with_parameters", parameters: [ string(name: "PARAMETER4", value: "value") ]
      

       

      This became a really big problem when you have jobs with more than 50 input parameters, which are logically grouped.

      This problem is also reproduced when you trigger job via ssh API. 

      Attachments

        1. build_with_parameters.PNG
          12 kB
          Mikhail Falaleev
        2. build_with_parameters.PNG
          12 kB
          Mikhail Falaleev
        3. freestyle-triggering.PNG
          27 kB
          Mikhail Falaleev
        4. parameters_are_mixed.PNG
          32 kB
          Mikhail Falaleev
        5. parameters_right_order.PNG
          32 kB
          Mikhail Falaleev

        Activity

          This line in the build step plugin is probably the culprit; the parameters are added to an unordered map, which then causes the parameters to be shown in the wrong order.

          rensgroothuijsen Rens Groothuijsen added a comment - This line in the build step plugin is probably the culprit; the parameters are added to an unordered map, which then causes the parameters to be shown in the wrong order.
          dnusbaum Devin Nusbaum added a comment -

          I'm not sure exactly what "This problem is also reproduced when you trigger job via ssh API" means, but if it is unrelated to the build step it should probably be split into a separate ticket.

          The issue with the Pipeline build step should be fixed by https://github.com/jenkinsci/pipeline-build-step-plugin/pull/44 which was just merged but has not yet been released. Thanks rensgroothuijsen for the fix!

          dnusbaum Devin Nusbaum added a comment - I'm not sure exactly what "This problem is also reproduced when you trigger job via ssh API" means, but if it is unrelated to the build step it should probably be split into a separate ticket. The issue with the Pipeline build step should be fixed by https://github.com/jenkinsci/pipeline-build-step-plugin/pull/44 which was just merged but has not yet been released. Thanks rensgroothuijsen for the fix!
          dnusbaum Devin Nusbaum added a comment -

          A fix for this issue was just released in Pipeline: Build Step plugin version 2.13.

          dnusbaum Devin Nusbaum added a comment - A fix for this issue was just released in Pipeline: Build Step plugin version 2.13.

          People

            rensgroothuijsen Rens Groothuijsen
            falaleevms Mikhail Falaleev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: