evaluateInRuntime

open override fun evaluateInRuntime(settingsModifier: BuildType.() -> Unit): DslBasedGeneratorBuildType

Deprecated

This is an experimental API and it is subject to change in the future

Experimental.

Once this method is called, the current build type is transformed to a dynamic build type. Under the hood a generator build type is created which will be linked to the current build type and will be triggered as soon as the current build type is triggered.

The generator build produces the settings which then will be applied to the current build type.

The settings modifier function passed to this method will be executed when the generator build is running on a TeamCity agent. Execution is deferred until project initialization and all onProjectInitialized callbacks are complete. The function can change the settings of the current build type (dependencies, parameters, steps, build features or failure conditions). For instance, it can transform the current build type to a build chain by creating new build types and attaching them as the dependencies. Since the function is running as a part of a generator build on an agent, it can also access agent environment, launch executables or make network calls.

Return

returns the automatically created generator build type which will be used to produce the settings when the current build type is triggered