In TeamCity, if you know the build configuration id, then you can generate URLs like this:
http://example.org/guestAuth/repository/download/bt222/.lastSuccessful/exampleBuild.zip
But see that "bt222"? That's the Build Configuration ID; it is generated by TC when you set up the build configuration, and it's static. The Atlassian docs seem to say that the way to determine it is to look at your URL, on screen.
Thing is, I need to get at it programmatically, in the msbuild script, so that the same build script can serve multiple build configurations. TC otherwise has so many nice handy variables that I'm just hoping I've missed it somehow...
teamcity.buildType.id. none. The unique ID used by TeamCity to reference the build configuration the current build belongs to.
This section contains articles on how to create and configure build configurations via the TeamCity UI. A build configuration is a collection of settings used to start a build and group the sequence of the builds in the UI.
The configuration ID is available as %system.teamcity.buildType.id%.
Verified to work in Teamcity 7.1.5
Make it as parameter to your build script and set it in build configuration settings from outside.
Build script should not depend on the build server, it should work locally as well.
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