How to update Meta-runners without loosing all parameters values?


I use a lot of meta-runners in our builds in order to get (reusable) tailored build steps, but I have an issue with new versions of meta-runners that are released.

For example, let's say I'm using meta-runnerV1.xml and it has two parameters: "User" and Password". Now I release a new version of the same meta-runner (meta-runnerV2.xml) with the same parameters "User" and Password" plus a new one e.g. "Path".
The internal names of the parameters are the same, everything is the same, the only real difference is that the ID of the meta-runner is different, so when configuring the build steps we have to change from V1 to V2, and this clears all the fields rather than keep the original values.

My expectation was that changing V1 to V2 would keep all the parameters that uses the same name, and leave all new parameters empty (or with the default values set by the V2 meta-runner).

Any tips?

Effectivelly what I want is to go to a build configuration and replace all build steps using meta-runnerV1 to meta-runnerV2, keeping any parameter value that is common to V1 and V2.

Caio Proiete

1 comment
Comment actions Permalink

For others with the same issue, there is a workaround described by Pavel here:

In summary, the ID of the meta-runner can be updated directly in the build configuration XML (e.g. <TeamCity Data Directory>\config\projects\MyProject\buildTypes\MyBuildConfiguration.xml)

      <runner id="RUNNER_1" name="My runner description" type="MRPP_ID_of_meta_runner">

TeamCity will pick up the change automatically... No need to restart it.

Please sign in to leave a comment.