Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JENKINS-73658 Support regex for tag filter #130

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

camjcorley
Copy link

@camjcorley camjcorley commented Aug 20, 2024

This PR adds logic to allow for a regex filter to be used for the tagFilter. The changes include:

  • Add this new option to the parameter description displayed in Jenkins.
  • If the tagFilter supplied starts with a forward slash ('/') it is assumed to be a regex pattern. As a result, the git client call for tags will use an asterisk instead of the tagFilter (pulling all tag names).
  • If we're using a regex pattern, only tags that match will be included.

Testing done

In a local instance of Jenkins, installed the plugin and ensured the following patterns functioned as desired:

  • No filter ('').
  • A plain text filter ('dev').
  • A wildcard text filter ('staging*').
  • A regex pattern filter ('/.(dev|staging).').

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira: https://issues.jenkins.io/browse/JENKINS-73658
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue
image image

@camjcorley camjcorley requested a review from a team as a code owner August 20, 2024 16:39
@camjcorley
Copy link
Author

Let me know if you have any feedback or would like this implemented differently. Thanks!

@camjcorley
Copy link
Author

@jenkinsadmin @MarkEWaite sorry for the direct ping, this PR has been open for a few months now and I'm hoping to get a review. My team relies on this modification and it would be great to get it into the plugin repository to simplify upgrades to our jenkins instance. Thanks!

@camjcorley
Copy link
Author

@jenkinsadmin @MarkEWaite sorry for the direct ping, this PR has been open for a few months now and I'm hoping to get a review. My team relies on this modification and it would be great to get it into the plugin repository to simplify upgrades to our jenkins instance. Thanks!

Looks like a Windows test is failing after I synced my branch with master, possibly due to an Azure outage I see on the jenkinsci jenkins?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant