tests-trigger: add support for wildcard matches#8129
tests-trigger: add support for wildcard matches#8129allisonkarlitskaya wants to merge 2 commits intomainfrom
Conversation
None of our repositories use this name anymore and I don't expect we'll ever see any others that do. Keep the infrastructure for per-project main branches in place in case some day we add another repo that uses a name other than 'main'.
This can be helpful if you want to trigger something like '*/networking@*', for example.
|
So I did this from the standpoint of running it from the bots repository itself, similar to |
| if branch.startswith('_'): | ||
| continue | ||
| for context in contexts: | ||
| c = context + '@' + repo |
There was a problem hiding this comment.
like you say this probably isn't right. I think this should work on the target repository so when I do
./tests-trigger --repo cockpit-project/cockpit 22330 '*/networking'
I'd like to trigger all images that run cockpit tests and their /networking scenario
|
I'd say it's fine to only support wildcard match for image variants and maybe contexts for specific image? So basically |
I kinda feel like doing it at the string level is actually easier... it might be "too powerful" in some sense, but it's also just kinda the easiest way to do it... But probably we do need to do something about the launch context: if we're in a repo other than bots we probably want to only refer to the contexts present in that repo. I'll redo this a bit... |
This can be helpful if you want to trigger something like '/networking@', for example.