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

Support for negative look behind / ahead expressions

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: role-strategy-plugin
    • Labels:
      None
    • Environment:
      Jenkins LTS v2.60.2
      Role Strategy Plugin 2.5.1
    • Similar Issues:

      Description

      My use case is that I'd like to exclude one folder while allowing all others without having to explicitly name every allowed folder, for which the general approach seems to be something on the order of:

      https://stackoverflow.com/questions/2107989/matching-all-words-except-one/2108007#2108007

      \w+\b(?<!\bboy)
      
      (?!boy\b)\b\w+
      

      https://stackoverflow.com/questions/2078915/a-regular-expression-to-exclude-a-word-string/2078953#2078953

      ^/(?!ignoreme|ignoreme2|ignoremeN)([a-z0-9]+)$ 
      

      I've tried numerous variations on these that all pass in regex testers, but none work in the role strategy plugin, in all cases the user can either see no jobs or all (mostly none).

      I've not much experience with either type of expression, so I could be making a mistake, but I've tested variations on them to the best of my ability on third-party tools.

        Attachments

          Activity

          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          No plan to work on it anytime soon. Pull requests will be appreciated, reviewed and integrated if possible.

          I also doubt that it should be enabled by default due to the performance concerns

          Show
          oleg_nenashev Oleg Nenashev added a comment - No plan to work on it anytime soon. Pull requests will be appreciated, reviewed and integrated if possible. I also doubt that it should be enabled by default due to the performance concerns

            People

            • Assignee:
              Unassigned
              Reporter:
              philmcardlecg Phil McArdle
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: