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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Labels:
      None
    • Environment:
      NodeLabel Parameter plugin v 0.2.0
      Parameterized Trigger plugin v 2.11
      EnvInject plugin v 0.13.1
    • Similar Issues:

      Description

      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.

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: imod
          Path:
          src/main/java/org/jvnet/jenkins/plugins/nodelabelparameter/LabelParameterValue.java
          src/main/java/org/jvnet/jenkins/plugins/nodelabelparameter/NodeParameterValue.java
          http://jenkins-ci.org/commit/nodelabelparameter-plugin/cc111ac9ffeea17a9d6bda57a762841d5c7b51ea
          Log:
          JENKINS-10982 trim labels

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: imod Path: src/main/java/org/jvnet/jenkins/plugins/nodelabelparameter/LabelParameterValue.java src/main/java/org/jvnet/jenkins/plugins/nodelabelparameter/NodeParameterValue.java http://jenkins-ci.org/commit/nodelabelparameter-plugin/cc111ac9ffeea17a9d6bda57a762841d5c7b51ea Log: JENKINS-10982 trim labels
          Show
          domi Dominik Bartholdi added a comment - fixed in version 1.0.0 see https://wiki.jenkins-ci.org/display/JENKINS/NodeLabel+Parameter+Plugin

            People

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

              Dates

              • Created:
                Updated:
                Resolved: