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

Pipeline Build Step should automatically convert mistyped parameters to the correct type where possible

XMLWordPrintable

    • pipeline-build-step 2.10

      The Pipeline build step does not validate that the types of parameters passed to the step match the parameter types defined on the downstream job. This leads to situations like users passing a string parameter ("true") when a boolean parameter is expected, or a string parameter where a password is expected, etc.

      Parameterized-trigger plugin made a change long ago to automatically convert some kinds of parameter type mismatches, see https://github.com/jenkinsci/parameterized-trigger-plugin/pull/62.

      The build step should be updated to perform the same conversion logic, and log a warning when such a conversion occurs.

      In some cases, a conversion is not possible/sensible (i.e. converting a password parameter to a boolean parameter). The build step does not currently attempt to prevent these kinds of mismatches, and this issue is not about changing that behavior (but perhaps it would make sense to fail the build or log a warning when that happens, perhaps hidden behind an option or system property).

            dnusbaum Devin Nusbaum
            dnusbaum Devin Nusbaum
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: