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

Filtering on build configuration name doesn't seem to work #73

Closed
jelco opened this issue Aug 14, 2017 · 11 comments
Closed

Filtering on build configuration name doesn't seem to work #73

jelco opened this issue Aug 14, 2017 · 11 comments

Comments

@jelco
Copy link

jelco commented Aug 14, 2017

Some of my webhooks should only be triggered for specific build configurations within a project. I've tried adding a trigger-filter on buildTypeId, buildName and buildFullName, but none of them seem to work. Whenever I add such a filter, the hooks seem to not be triggered for any build anymore, which leads me to believe the values I enter actually evaluate to empty strings on which no regex will match.

Is this supported, and if so, which variable should I use? I'm hoping that if I try something for which I at least know it's supposed to work, I can do some targeted debugging.

@netwolfuk
Copy link
Member

Do you think this is related to a certain timeframe too? Like #72

@jelco
Copy link
Author

jelco commented Aug 15, 2017

This seems to occur on all build configs I try it on, so I'm guessing it is not related.

@jelco
Copy link
Author

jelco commented Aug 15, 2017

I noticed while working on the other issue that TC debug logging gives clear information about the actual value it tests filters on, so I'll see if I can figure out some things by using that debug log. I'll keep you posted.

@netwolfuk
Copy link
Member

Thanks

@jelco
Copy link
Author

jelco commented Aug 16, 2017

So this is what it looks like:

[2017-08-15 17:14:45,776]  DEBUG -   jetbrains.buildServer.SERVER - WebHook NOT triggered: Filter mismatch: ${buildName} (Run tests and deploy (staging, production)) does not match using regex (CentOS|Debian|deploy) https://.../...

Just a thought: I made a point of not including ^ and $ in this regex so it doesn't require a full string match, but could it be that you're forcing such a match in your code? In that case I should be able to fix it by just adding wildcards around it I guess.

@netwolfuk
Copy link
Member

I have a suspicion that java adds the ^ and $ implicitly in a regex match.

@jelco
Copy link
Author

jelco commented Aug 16, 2017

I've modified the regexes, but I'm not running one of these builds anymore today so I'm not sure when I'm going to be able to test it. I'll get back to you.

@netwolfuk
Copy link
Member

My tests have ^ and $ in them, with wildcards as well.

@jelco
Copy link
Author

jelco commented Aug 21, 2017

I can confirm that adding the wildcard prefix and suffix solves this issue. Maybe something to add to the documentation?

@netwolfuk
Copy link
Member

Thanks for the feedback. Are you happy for me to close this once I update the docs?

@netwolfuk
Copy link
Member

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

No branches or pull requests

2 participants