Jump to content

TeamCity Plastic Branch Filtering by multiple attributes


Khaled

Recommended Posts

Hello,

I've integrated TeamCity with PlasticSCM, and everything works just fine,

Here is few details about my environment:

I do Branch per Task
I use same branch for both platforms Android and iOS
I have two TeamCity -> Build Configuration , one for Android and one for iOS

Some branch affects only one of the platforms and I want the build to start on the relevant platform, what I am thinking of is adding another attribute for platform, so it will be:

status=resolved
platform=ios

in that case I want TeamCity to start building the iOS version only, I think the best way is if I can add two attributes to the "Enable plastic branch filtering" option, but I could not find a way to do that

image.png.d3bc0834adb420bff7678b2bd8a7a302.png

Link to comment
Share on other sites

Hi @Khaled,

Unfortunately, I don't think you can add two statuses to the Enable plastic branch filtering field, but you can use a cm find branch query as a filter. For example you enter the below into the field...

where attribute='status' and attrvalue='resolved' and attribute='platform' and attrvalue='ios'

Alternatively, if you have a naming convention on your branches you could do something like this...

where attribute='stage' and attrvalue='done' and name like 'ios-%'

For more information on the cm find query, please see here.

 

Hope this helps!

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...