This bug report details an issue encountered with the Jenkins Role-Based Access Plugin. When attempting to define an Agent role in the Manage Roles section, the provided role pattern fails to identify matching agents.

      Steps to Reproduce:

      1. Access Jenkins and navigate to "Manage Jenkins."
      2. Click on "Manage and Assign Roles."
      3. Go to the "Manage Roles" section.
      4. Create a new role or edit an existing one.
      5. Under the "Agent" permissions, enter "master" as the role pattern.
      6. Double-click on the "master" pattern.

      Expected Behavior:

      Double-clicking on the "master" pattern should display a list of agents matching the pattern (presumably an agent named "master").

      Actual Behavior:

      Double-clicking on the "master" pattern results in a message indicating "no agent found matching 'master'."

          [JENKINS-73407] Agent Role Pattern Not Finding Matching Agent

          Sudarshan T N created issue -

          Markus Winter added a comment -

          Please provide more input, e.g. a screenshot listing the agents that are defined (from .../computer) would be helpful

          Is your intention to define permissions on the built-in agent?

          Markus Winter added a comment - Please provide more input, e.g. a screenshot listing the agents that are defined (from .../computer) would be helpful Is your intention to define permissions on the built-in agent?
          Markus Winter made changes -
          Assignee Original: Oleg Nenashev [ oleg_nenashev ] New: Markus Winter [ mawinter69 ]
          Sudarshan T N made changes -
          Attachment New: image-2024-07-05-19-06-51-030.png [ 62939 ]
          Sudarshan T N made changes -
          Attachment New: image-2024-07-05-19-09-43-992.png [ 62940 ]

          Sudarshan T N added a comment -

          Sudarshan T N added a comment -

          Sudarshan T N added a comment - - edited

          define permission for master and cloud agents

          Sudarshan T N added a comment - - edited define permission for master and cloud agents

          Markus Winter added a comment - - edited

          remember that you have to use regular expressions, so

          (?i)restricted-agent*
          

          should probably be

          (?i).*restricted-agent.*
          

          This will not match labels given to agents.

          And 'master' will only match an agent with name 'master'. As mentioned before the controller itself is not using the term 'master' anymore.

           

           

          Markus Winter added a comment - - edited remember that you have to use regular expressions, so (?i)restricted-agent* should probably be (?i).*restricted-agent.* This will not match labels given to agents. And 'master' will only match an agent with name 'master'. As mentioned before the controller itself is not using the term 'master' anymore.    
          Markus Winter made changes -
          Attachment New: image-2024-07-05-16-43-24-453.png [ 62942 ]
          Attachment New: image-2024-07-05-16-42-31-339.png [ 62943 ]

          Sudarshan T N added a comment -

          thank you it worked 

          Sudarshan T N added a comment - thank you it worked 

            mawinter69 Markus Winter
            sudarshan Sudarshan T N
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: