• Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • envinject-plugin
    • None

      As stated in https://issues.jenkins-ci.org/browse/JENKINS-16100 variable names with . in them are not supported. This fact should be communicated to the user who tries to create a new key/value-pair using the webfrontend, either by doing some validation or providing this information in the help message.

          [JENKINS-17053] Warn user about variable names with . (dot)

          Since variables with dots in it are common, I would say that the plugin should handle those.

          Joris van der Pol added a comment - Since variables with dots in it are common, I would say that the plugin should handle those.

          @Joris
          How to handle variable names with dots with shell scripts?
          Please give me some samples?
          Thanks

          Gregory Boissinot added a comment - @Joris How to handle variable names with dots with shell scripts? Please give me some samples? Thanks

          Gregory,

          variables are a confusing lot in Jenkins, since there is a lot of variation among plugins and the ways they are handled. I try to use the java property style with dots to group properties.
          The simplest example I came up with is the following:

          • Parameterize the build with a string parameter called 'version.name'.
          • In the 'execute windows batch command' build step you can use %version.name%.

          The parameterized build trigger plugin can handle the same situation. I'm not sure on 'execute shell' build step, since I have not used it before. Maybe it is possible to have a duplicate variable which replaces the dot for an underscore. I saw the build-name-setter plugin use another way: ${ENV,var="VARIABLENAME"}.

          With kind regards,

          Joris

          Joris van der Pol added a comment - Gregory, variables are a confusing lot in Jenkins, since there is a lot of variation among plugins and the ways they are handled. I try to use the java property style with dots to group properties. The simplest example I came up with is the following: Parameterize the build with a string parameter called 'version.name'. In the 'execute windows batch command' build step you can use %version.name%. The parameterized build trigger plugin can handle the same situation. I'm not sure on 'execute shell' build step, since I have not used it before. Maybe it is possible to have a duplicate variable which replaces the dot for an underscore. I saw the build-name-setter plugin use another way: ${ENV,var="VARIABLENAME"}. With kind regards, Joris

          Oleg Nenashev added a comment -

          Not in progress I'd guess

          Oleg Nenashev added a comment - Not in progress I'd guess

            Unassigned Unassigned
            schaarda Daniel Schaarschmidt
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: