You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 12, 2019. It is now read-only.
At the moment if you use a BuildLocator to find a build by id or number you can't also specify additional dimensions like "branch:(default:any)" to look in non-default branches. This was causing me a problem so I've made some changes to allow locating builds by id or number and dimensions at the same time:
a new BranchLocator class that wraps the "branch locator" spec in the TeamCity REST API - e.g. "(name:name,default:true/false/any,unspecified:true/false/any,branched:true/false/any)"
allow build locators to specify dimensions in addition to id or number - e.g. "number:1.0.0.9999,buildType:(name:My CI Build),status:SUCCESS,branch:(default:any)"
additional Locator classes that implement Fluid methods for each property. No more BuildLocator::WithDimensions($null, $null, $null, $null, $null, $null, $null, 100, 50, $null, $null, $null, $null) in PowerShell to specify maxResults and startIndex - just use (new-object FluidBuildLocator).WithMaxResults(100).WithStartIndex(50) instead.
added a load of unit tests to check string generation for Locators.
Hi,
At the moment if you use a BuildLocator to find a build by id or number you can't also specify additional dimensions like "branch:(default:any)" to look in non-default branches. This was causing me a problem so I've made some changes to allow locating builds by id or number and dimensions at the same time:
Example (in PowerShell):
$branchLocator = (new-object TeamCitySharp.Locators.FluidBranchLocator).WithDefault("Any");
$buildTypeLocator = [TeamCitySharp.Locators.FluidBuildTypeLocator]::WithName($buildTypeName);
$buildLocator = [TeamCitySharp.Locators.FluidBuildLocator]::WithNumber($buildNumber).WithBuildType(
$buildTypeLocator).WithBranch($branchLocator).WithStatus("SUCCESS");
$builds = $tcClient.Builds.ByBuildLocator($buildLocator);
Cheers,
Mike
The text was updated successfully, but these errors were encountered: