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
Please sign in to leave a comment.
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
Thanks for your response Eric, this is exactly what I want. Thanks again!!!
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?