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

Check variable names as Jenkins core expands

    XMLWordPrintable

Details

    Description

      After the parameterized trigger plugin wants to exchange all choices to extensible choices we have to change many properties in our jobs. But that's OK.

      Problem:
      Because of many of our properties containing dots we have to overwork half of our build process.

      Suggestion:
      Please check if the name of a property can contain . too.


      Extensible Choice Parameter checks parameter names as Jenkins 1.466 expands variable
      (that is, alphabets, numbers, and underscore: https://github.com/jenkinsci/jenkins/blob/jenkins-1.466/core/src/main/java/hudson/Util.java#L111 )

      Jenkins 1.526 gets to allow dots in JENKINS-16660, f664639.

      Extensible Choice Parameter should check parameter names as the Jenkins core it runs on.

      Attachments

        Issue Links

          Activity

            ikedam ikedam added a comment -

            https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/Util.java#L116

            /**
             * Pattern for capturing variables. Either $xyz, ${xyz} or ${a.b} but not $a.b, while ignoring "$$"
             */
            private static final Pattern VARIABLE = Pattern.compile("\\$([A-Za-z0-9_]+|\\{[A-Za-z0-9_.]+\\}|\\$)");
            

            This seems available from jenkins-1.526 (JENKINS-16660). Dots are not accepted before.

            ikedam ikedam added a comment - https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/Util.java#L116 /** * Pattern for capturing variables. Either $xyz, ${xyz} or ${a.b} but not $a.b, while ignoring "$$" */ private static final Pattern VARIABLE = Pattern.compile( "\\$([A-Za-z0-9_]+|\\{[A-Za-z0-9_.]+\\}|\\$)" ); This seems available from jenkins-1.526 ( JENKINS-16660 ). Dots are not accepted before.
            ikedam ikedam added a comment -

            I decided how to do.
            Target version is 1.3.0.

            ikedam ikedam added a comment - I decided how to do. Target version is 1.3.0.
            ikedam ikedam added a comment - Fixed as https://github.com/jenkinsci/extensible-choice-parameter-plugin/pull/7
            ikedam ikedam added a comment -

            Really sorry for having you waiting for so long time.
            I released extensible-choice-parameter-1.3.0 including this fix.
            It will be available in a day.

            ikedam ikedam added a comment - Really sorry for having you waiting for so long time. I released extensible-choice-parameter-1.3.0 including this fix. It will be available in a day.

            Works perfect. Thanks

            zioschild Sven Appenrodt added a comment - Works perfect. Thanks

            People

              ikedam ikedam
              zioschild Sven Appenrodt
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: