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

NodeLabel parameter value not trimmed when used with "Parameterized Trigger plugin'

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • NodeLabel Parameter plugin v 0.2.0
      Parameterized Trigger plugin v 2.11
      EnvInject plugin v 0.13.1

      Node parameter value supplied to the Parameterized Trigger plugin is not trimmed.

      Use case:
      In the compile job we read a parameter from a file using EnvInject plugin that is later used as the value to the 'Node' property of the Parameterized Trigger plugin with "NodeLabel parameter" selected to trigger a deploy job on target environment.
      As there is a trailing space in the property file, the Node name as it is triggered also contains a trailing space. Nodes however have there names trimmed when set, so there is no matching node ("slave1 " != "slave1").

      I believe this not to be a bug in the EnvInject plugin as trailing spaces are allowed in java .properties files. Trailing whitespace could well be part of the intended value. Jenkins Node names however are trimmed, so I believe that anything that uses a given value as a node name best trims that value.

            domi Dominik Bartholdi
            josbraaksma Jos Braaksma
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: