Hi Sergey,
conditional build steps are not implemented yet, please watch/vote for https://youtrack.jetbrains.com/issue/TW-17939. What you can do in dsl is to add a build step if some condition is true, but condition will be checked not during a build, but during TeamCity settings generation from dsl.