I'd like to be able to pass the last pinned build number to my TeamCity build step. I didn't see a system parameter that I could pass in, like I do with the current build number.
Is there a parameter for this that I didn't see? Or is there a way to get the version number from a URL? - thanks
Unfortunately I haven't been unable to find a way to pass pinned build information into my TeamCity build step - which is really what I'd like to do.
The next best solution I can think of is to query TeamCity for pinned builds using their REST API. With the right query, the API will return an XML structure which would include the build number for each pinned build, amongst other useful information.
At it's simplest, the request would look something like this:
http://<buildserver>/httpAuth/app/rest/builds/?locator=pinned:true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With