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

predefined variables do not expand env vars with dots

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I am running a parameterized job which triggeres another one, I am trying to pass predefined parameters to that job where one of them contais dots e.g "build.number"
      as opposed to other parameters passed this one does not get expended and I end up with the parameter name as its value.

      example:

      CI_VERSION_PREFIX=${buildVersion}
      CI_VERSION_POSTFIX=${build.number}

      in the triggered job:
      echo aaa = %CI_VERSION_PREFIX%
      echo bbb = %CI_VERSION_POSTFIX%

      Result:
      aaa = 0.0.0.
      bbb = ${build.number}

        Attachments

          Issue Links

            Activity

            Hide
            fredg Fred G added a comment -

            Discussion with kohsuke and abayer on IRC:
            <fredg02> kohsuke: do you see any problem with allowing variables that contain a dot (eg. $build.number) to get expanded?
            <kohsuke> $build.number is interpreted as ${build}.number elsewhere
            <kohsuke> like in shell
            <kohsuke> I'd be nervous about doing that
            <fredg02> hmm. ok. so dots should never be allowed in variable names?
            <kohsuke> Yeah. I think most programming languages don't use "." as a part of symbols
            <kohsuke> Any reason you want to do it?
            <fredg02> I don't want it. But JENKINS-7180 does
            <jenkins-admin> JENKINS-7180:predefined variables do not expand env vars with dots (Open) http://jenkins-ci.org/issue/7180
            <kohsuke> I think we should disallow dot in variable names
            <kohsuke> For one they aren't allowed in environment variables
            <abayer> kohsuke: Yes. I agree wholeheartedly.
            <fredg02> sure np. WON'T FIX then?
            <kohsuke> yeah
            <abayer> They'll break a bunch of things.

            Show
            fredg Fred G added a comment - Discussion with kohsuke and abayer on IRC: <fredg02> kohsuke: do you see any problem with allowing variables that contain a dot (eg. $build.number) to get expanded? <kohsuke> $build.number is interpreted as ${build}.number elsewhere <kohsuke> like in shell <kohsuke> I'd be nervous about doing that <fredg02> hmm. ok. so dots should never be allowed in variable names? <kohsuke> Yeah. I think most programming languages don't use "." as a part of symbols <kohsuke> Any reason you want to do it? <fredg02> I don't want it. But JENKINS-7180 does <jenkins-admin> JENKINS-7180 :predefined variables do not expand env vars with dots (Open) http://jenkins-ci.org/issue/7180 <kohsuke> I think we should disallow dot in variable names <kohsuke> For one they aren't allowed in environment variables <abayer> kohsuke: Yes. I agree wholeheartedly. <fredg02> sure np. WON'T FIX then? <kohsuke> yeah <abayer> They'll break a bunch of things.

              People

              Assignee:
              benza benza
              Reporter:
              benza benza
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: