Snapshot Dependencies with System properties and Environment variables

Hello,

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,
Calvin

4 comments

Calvin,

For now, there is no such possibility in TeamCity. Please submit a feature request in our tracker http://youtrack.jetbrains.net/issues/TW.

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,
Marina

0

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.

0

Calvin,

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,

Marina

0

Thank you. I've submitted a feature request.

0

Please sign in to leave a comment.