changing env variables after commit
Hello,
I have some project with env.variables, which are getting in build gradle. All works good.
Need to check new commits before build and if there is new commit - update env.variable
How can I realise it?
P.S. it needs for update some components version, it changes after commits in some git directories, version are in env.variables
I have some builinds which start after commit, for example, but how change env.variable - don't know
Best regards
Please sign in to leave a comment.
Hi,
there is no automated way in teamcity to modify environment variables per se. You can start new builds and run scripts in your builds, and those scripts can modify the env. variables as you might require. If the value that you need to assign to the variable is somehow available for teamcity, you can also set an "env.<variable_name>" parameter that will be transferred to the build agent as an environment variable: https://www.jetbrains.com/help/teamcity/configuring-build-parameters.html#ConfiguringBuildParameters-TypesofBuildParameters