Label build with a variable from buildfile ?

Is thre any possibility to transfer any variable from buildfile to teamcity when build runs ?

For example, in our current environment, QA lead makes a decision on releasing a new version and performs appropriate changes in a project file: build/ , setting a new version number: build.version=3.4.5 , then file is committed.

The separate build configuration in teamcity listens to version property only changes, makes an immediate build and what I'd like is to tag it with a version number, taken from build/, however, I cannot find a way to pass this to teamcity.

Right now, we tag it from inside a build file with a custom ant task, however, we'd like to move tagging task to teamcity, if such scenario is possible.


Comment actions Permalink

Please submit a feature request to our tracker:

Right now this could be done via plugin only.

Pavel Sher

Comment actions Permalink


Why woudn't you modify build configuration's build number pattern for this? If your QA lead sets build number pattern to something like 3.4.5. you'll be able to label your build with such build number (VCS labeler can reference build number).

Moreover, you may use alternative scenario - TeamCity can report own build number to the server from the script, as described in

and this build number will be used by TeamCity (and can be used by VCS labeler).

Hope this helps,

Comment actions Permalink


With TeamCity 4.5.4, is there a way to pass a value generated from a build script, let's say MSbuild run on an agent, to TeamCity server, that could be used, concatenated with a fixed value or other value (like Build number), in VCS labeling.

I do not see an explicit solution in script Interaction with TeamCity documentation part.




Please sign in to leave a comment.