stack72 / TeamCitySharp

No Longer Maintained - please use https://github.com/mavezeau/TeamCitySharp
Other
200 stars 165 forks source link

Get Build by Id #61

Open borismod opened 10 years ago

borismod commented 10 years ago

I am trying to retrieve build by it Id using the below code:

... var client = new TeamCityClient(teamCityUrl); client.Connect(user, password); var compatibleBuilds = client.Builds.ByBuildLocator(BuildLocator.WithId(buildId)); ...

It generates the following bad URL:

http://tc1:8080/httpAuth/app/rest/builds?locator=id:23121

Error has occurred during request processing (Bad Request). Error: jetbrains.buildServer.server.rest.errors.LocatorProcessException: Locator dimension [id] is ignored or unknown. Invalid request. Check locator is specified correctly.

slolife commented 10 years ago

It looks like the new url for this is:

http://teamcity/guestAuth/app/rest/builds/id:4014

van800 commented 10 years ago

2 years ago TeamCitySharp had ability to GetBuildById. Today I tried to update to present version, but this bug is stopping me for now.

van800 commented 10 years ago

I have added fix here https://github.com/van800/TeamCitySharp