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

Feature Request: Allow to override "link.template" based on type of release (major, minor, bugfix, prerelease) #508

Open
lmrts opened this issue Dec 11, 2024 · 0 comments

Comments

@lmrts
Copy link

lmrts commented Dec 11, 2024

I came across the modsecurity-crs-docker project [1], which follows unusual rules for their docker image versioning.
For example, for release 4.9.0-nginx-202412020312:

  1. 4.9.0 represents the "modsecurity" release, e.g. see [3]
  2. 202412020312, but more specifically the 8 digits 20241202 represent the "modsecurity docker image" release, see [4]

With wud.tag.transform we can map this to ^(\d+\.\d+\.\d+)-nginx-(\d\d\d\d\d\d\d\d)\d+$$ => $$1-$$2 and get the <major>.<minor>.<bugfix> and <prerelease> variables separately, and calculate semver releases correctly.
But wud.link.template only allows 1 link per container, and, in this case, we need 2 different wud.link.template:

  1. for <major>.<minor>.<bugfix> -> https://github.com/coreruleset/coreruleset/releases/tag/v$${major}.$${minor}.$${patch}
  2. for <prerelease> -> https://github.com/coreruleset/modsecurity-crs-docker/releases/tag/release%2F$${prerelease}

A suggestion would be allow to set a global wud.link.template=..., and then allow overriding it on specific releases, e.g. wud.link.template.prerelease=....

Is this something easy / acceptable to have in WUD ?

[1] https://github.com/coreruleset/modsecurity-crs-docker/
[2] https://github.com/coreruleset/modsecurity-crs-docker/pkgs/container/modsecurity-crs
[3] https://github.com/coreruleset/coreruleset/releases
[4] https://github.com/coreruleset/modsecurity-crs-docker/releases

@lmrts lmrts changed the title [Feature Request] Allow to override "link.template" based on type of release (major, minor, bugfix, prerelease) Feature Request: Allow to override "link.template" based on type of release (major, minor, bugfix, prerelease) Dec 11, 2024
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

No branches or pull requests

1 participant