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

Allow greater fidelity of ruleset matching #70

Closed
duro1 opened this issue May 19, 2020 · 1 comment
Closed

Allow greater fidelity of ruleset matching #70

duro1 opened this issue May 19, 2020 · 1 comment
Labels
enhancement Indicates an improvement to a feature

Comments

@duro1
Copy link
Contributor

duro1 commented May 19, 2020

Description

Current ruleset matching utilizes a file match pattern utility. This does not allow for more stringent matching, particularly with version tags. Use regex pattern matching since it allows for greater control and it commonly known.

Value

Allows more control over step ruleset matchers

Definition of Done

Current ruleset must have one or more exclude clause to eliminate greedy matches for tags with trailing data. e.g. -SNAPSHOT, -rc, -prod, etc.

    ruleset:
      if:
        event: [ tag ]
        tag: [ "[0-9].*" ]
      unless:
        event: [ tag ]
        tag: [ "[0-9].*-prod" ]

After enhancement regex can be used to explicitly identify start/end of match

if:
  branch: master
  event: tag
  tag: [ "^refs/tags/(\\d+\\.)+\\d+$" ]

Effort (Optional)

4 days

Impacted Personas (Optional)

Users

@duro1 duro1 added the enhancement Indicates an improvement to a feature label May 19, 2020
duro1 pushed a commit to duro1/types that referenced this issue May 19, 2020
Current ruleset matching utilizes a file match pattern utility. This does not allow for more stringent matching, particularly with version tags. Use regex pattern matching since it allows for greater control and it commonly known.
wass3r pushed a commit that referenced this issue Jun 4, 2020
* Issue #70: Allow greater fidelity of ruleset matching

Current ruleset matching utilizes a file match pattern utility. This does not allow for more stringent matching, particularly with version tags. Use regex pattern matching since it allows for greater control and it commonly known.

* double * wildcard test added

* more tests for patterns added

* double * wildcard test added

Co-authored-by: ChadDurovec <chad.durovec@target.com>
Co-authored-by: Neal <neal.coleman@target.com>
@wass3r
Copy link
Collaborator

wass3r commented Jun 9, 2020

merged in with #71

@wass3r wass3r closed this as completed Jun 9, 2020
jbrockopp added a commit that referenced this issue Aug 18, 2020
* Issue #70: Allow greater fidelity of ruleset matching

Current ruleset matching utilizes a file match pattern utility. This does not allow for more stringent matching, particularly with version tags. Use regex pattern matching since it allows for greater control and it commonly known.

* double * wildcard test added

* more tests for patterns added

* double * wildcard test added

* tidy

* spl

* remove unnecessary type conversions

Co-authored-by: ChadDurovec <chad.durovec@target.com>
Co-authored-by: Neal <neal.coleman@target.com>
Co-authored-by: Jordan Brockopp <jordan.brockopp@target.com>
Co-authored-by: David May <1301201+wass3r@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Indicates an improvement to a feature
Projects
None yet
Development

No branches or pull requests

2 participants