How to make a teamcity build successfully based on build parameter

Answered

I need to write a build step that will check if a certain build parameter is true in team city then that build should become successful and should not run further steps of same build. 

Please let me know how can I achieve this?

I am new to teamcity so can you please explain the solution in detail with examples

0
3 comments

TeamCity v2020.1 introduced a feature called Conditional Build Steps, which would make this easy to achieve: https://www.jetbrains.com/help/teamcity/what-s-new-in-teamcity-2020-1.html#Conditional+build+steps

Using this feature, you could simply have each of the build steps conditional on a certain build parameter. See here for some additional information on this topic: https://www.jetbrains.com/help/teamcity/build-step-conditions.html

We also have a blog post that covers this topic in detail available here: https://blog.jetbrains.com/teamcity/2020/07/new-in-2020-1-conditional-build-steps

1

Thanks for your response Eric, this is exactly what I want. Thanks again!!!

0

I have one more problem now. If suppose there are 10 nested dependencies on one build(suppose A) and and build A is dependent B.

So I don't want Conditional Build Steps to be added within each Build Step of dependent builds. So is there anyway to restrict dependencies of Build A not to run altogether based upon specifying condition only at Build A level?

0

Please sign in to leave a comment.