Is there a way to inject parameters by reading a property file into a build?

I am looking at TeamCity for the first time an am used to using Jenkins where I can Inject
parameters into the build job from Java style property files. This can be done for
ANY kind of build not just Java, Jenkins converts them automatically into Environment variables so you can access them from any kind of process.

Is there any way to do that with TeamCity? I know I can enter in each property one at a time but thats a bit of hassle if I already have them all in files.


Thanks.

4 comments
Comment actions Permalink

TeamCity has similar feature. You can create teamcity.default.properties file in the root of your project. Read more here: https://confluence.jetbrains.com/display/TCD9/Defining+and+Using+Build+Parameters+in+Build+Configuration#DefiningandUsingBuildParametersinBuildConfiguration-UsingBuildParametersintheBuildScripts

In this file you can use prefixes, like: system., env. to distinguish system properties from environment variables.

0
Comment actions Permalink

Thanks. I did see that but missed that it was project specific. I thought it was server specific.

0
Comment actions Permalink

Is this possible to do dynamically while the build is running? In Jenkins we create an environment file in one step, then inject it in another and then carry on with the rest of the build.
Can the "logic" be still the same, or do we need to change the scripts when migrating to TeamCity?

0
Comment actions Permalink

If someone is interested in the request please find the answer in the related forum thread: https://devnet.jetbrains.com/thread/473351.

0

Please sign in to leave a comment.