• Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • core
    • Windows 7

      The Job naming pattern is working for simple pattern, however I am unable to include conditional regex (if) in the pattern

      (_)?(?(1)[\w]{1,15} )

      . Meaning _ is a optional string, if found then a string of length 1 to 15 should be available. Also, I would need to set similar Node naming pattern as we are having more nodes

          [JENKINS-28912] CLONE - Job and Node naming convention

          Sagayaraj David created issue -
          Sagayaraj David made changes -
          Summary Original: CLONE - Job and Project naming convention New: CLONE - Job naming and Node naming convention
          Sagayaraj David made changes -
          Description Original: Both 'Job' and 'Project' are used, but is unclear what the difference is. A new Job seems to create a Project and one can delete a Project but not a Job. One concept should be used in my opinion unless the difference is clearly distinguishable. New: The Job naming pattern is working for simple pattern, however I am unable to include conditional regex (if) in the pattern (_)?(?(1)[\w]{1,15} ). Meaning _ is a optional string, if found then a string of length 1 to 15 should be available. Also, I would need to set similar Node naming pattern as we are having more nodes
          Sagayaraj David made changes -
          Priority Original: Trivial [ 5 ] New: Major [ 3 ]
          Sagayaraj David made changes -
          Labels Original: job New: job naming node
          Daniel Beck made changes -
          Description Original: The Job naming pattern is working for simple pattern, however I am unable to include conditional regex (if) in the pattern (_)?(?(1)[\w]{1,15} ). Meaning _ is a optional string, if found then a string of length 1 to 15 should be available. Also, I would need to set similar Node naming pattern as we are having more nodes New: The Job naming pattern is working for simple pattern, however I am unable to include conditional regex (if) in the pattern {code}(_)?(?(1)[\w]{1,15} ){code}. Meaning _ is a optional string, if found then a string of length 1 to 15 should be available. Also, I would need to set similar Node naming pattern as we are having more nodes

          Daniel Beck added a comment -

          This is not a valid Java regular expression, and the error message tells you so.

          If you disagree, please provide sample code for the script console in Jenkins that shows that your regular expression is valid and matches according to your expectations.

          Daniel Beck added a comment - This is not a valid Java regular expression, and the error message tells you so. If you disagree, please provide sample code for the script console in Jenkins that shows that your regular expression is valid and matches according to your expectations.
          Daniel Beck made changes -
          Resolution New: Not A Defect [ 7 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

          Sagayaraj David added a comment - - edited

          It appears that by default java.util.regex.Pattern class does not support conditional regex. But it is possible with JRegex. Please check http://stackoverflow.com/questions/3687921/conditional-regular-expression-in-java for clarification.

          Also, at present only Job naming standard enforcement is available. Similarly Node naming needs to be enforced

          Sagayaraj David added a comment - - edited It appears that by default java.util.regex.Pattern class does not support conditional regex. But it is possible with JRegex. Please check http://stackoverflow.com/questions/3687921/conditional-regular-expression-in-java for clarification. Also, at present only Job naming standard enforcement is available. Similarly Node naming needs to be enforced
          Sagayaraj David made changes -
          Resolution Original: Not A Defect [ 7 ]
          Status Original: Resolved [ 5 ] New: Reopened [ 4 ]

            Unassigned Unassigned
            sagayd Sagayaraj David
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: