Snapshot Dependencies with System properties and Environment variables


Is there a way to run a build using Snapshot Dependency while providing an overriding value for System properties or Environment variables?

In this setup:

Build Config 1 - Build RPM
Environment variable - env.release_ready default value no

Build Config 2 - Publish
Artifact dependency - Build RPM

Developers will run Build RPM with the env.release_ready flag off for testing.

When the product is ready to be shipped, we run Publish which should run Build RPM with env.release_ready value on, so that the build script will detect the environment variable and perform additional tasks. Once Build RPM successfully creates a release-ready rpm, Publish picks it up and puts it in a network drive.

However, I cannot find a way to override a parameter of a dependency.
Is this possible somehow, or can you please think of a different, yet just as easy, solution?

Thank you,



For now, there is no such possibility in TeamCity. Please submit a feature request in our tracker

A workaround is to configure artifact dependencies and use Actions | Promote on the build results page to specify custom artifacts for a build.

Kind regards,


Thanks for the response Marina,

Would you be kind and explain the workaround a little further?
I can't quite visualize the setup.

Thanks again in advance.



There is no ability to pass a property from Publish to Build RPM build currently.

For now, you can run custom build in Build RPM configuration with "env.release_ready" value set to "on" (using Run Custom Dialog). Than run build Publish based on this finished build using Promote feature (from the Actions menu on the build results of Build RPM build). As the result, Publish build will pick up release-ready RPM build.

Kind regards,



Thank you. I've submitted a feature request.


Please sign in to leave a comment.