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

CLONE - Job and Node naming convention

    Details

    • Type: Improvement
    • Status: Reopened (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: core
    • Labels:
    • Environment:
      Windows 7
    • Similar Issues:

      Description

      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

        Attachments

          Activity

          Hide
          danielbeck 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.

          Show
          danielbeck 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.
          Hide
          sagayd 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

          Show
          sagayd 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
          Hide
          sagayd Sagayaraj David added a comment -

          Is there any update here? I also think View Name also can be standardized with pattern

          Show
          sagayd Sagayaraj David added a comment - Is there any update here? I also think View Name also can be standardized with pattern

            People

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

              Dates

              • Created:
                Updated: