Filtering jobs based off of a parameter Follow
Answered
I'd like to be able to filter jobs in the UI based off of a parameter. I have a lot of projects that only differ by a few parameters. I'd like to be able to run them all with the same project. The issue is that it might make debugging a little more complicated. So I would want to able to filter jobs with the ID I set in a parameter.
In another project I see that I'm able to filter jobs by branch. This is exactly what I want, but I would want to be able to filter based on a parameter value. Is there some way to do this?
Please sign in to leave a comment.
Hi,
Sorry, I'm not sure what exactly you mean by jobs: build configurations or builds. And although there isn't an option to filter them by a parameter in the web UI, you can do that via REST API.
This example will give you the builds that have the 'myParam' parameter with value 'myValue':
http://<server:port>/app/rest/builds?locator=property:(name:myParam,value:myValue)
Same with the value matching '.*myValue.*' regex:
http://<server:port>/app/rest/builds?locator=property:(name:myParam,value:(.*myValue.*),matchType:matches)
And this will give you the build configurations having the 'myParam' parameter with value 'myValue':
http://<server:port>/app/rest/buildTypes?locator=parameter:(name:myParam,value:myValue)
Same with the value matching '.*myValue.*' regex:
http://<server:port>/app/rest/buildTypes?locator=parameter:(name:myParam,value:(.*myValue.*),matchType:matches)
Does that cover your use case?
-Anatoly
Register for TeamCity Technology Day - Nov 5th
I'm talking about builds. The locator search term for param/value is useful, but it would be useful if the UI had that as an option to filter builds, maybe something similar to how you can filter by branches.