Creating a variable which persists between builds of a build configuration

I would like to be able to have a teamcity variable which remembers the last value that it was set to.

If a build configuration runs and it does 'print("##teamcity[setParameter ...', is it possible to see this updated value in the next build of this build configuration ?


i.e. :

Build configuration environment parameter -> env.VAR1, value "1"

BuildA runs -> print("##teamcity[setParameter name='env.VAR1' value='2']")


When BuildA runs the next time, it is possible that it can start with env.VAR1, value "2" ?

1 comment
Comment actions Permalink

Hi James,

It is not possible to change build parameters in build configurations via service messages. The changed build parameters will be available only in the build steps following the modifying one.
If you want to change build configurations parameters from the build script please use REST API.
Why do you need to change build configuration parameter from the build script?

0

Please sign in to leave a comment.