Is there a way to skip one of the build in chain by parameter value?

Answered

Hello!

I have a chain, wich started manually by the "Build & Deploy" build. This build has an options to skip one or more platform builds.

So the only way i found for now of how to achive it is just to cancel the skipped platform build (by use of service message) based on the passed parameter (by use of reverse.dep.*). 

 

 

it would be great if those dependencies would not run at all by the vaule of parameters. 

So is there any better way to achive it?

0
1 comment

Hello Dmitry!

We have a feature request for this logic: https://youtrack.jetbrains.com/issue/TW-65341; if the feature description looks like what you are looking for, please consider voting/commenting on the issue. I am also adding an internal reference to the issue so that the developers are aware of your use case.

Speaking of more immediate workaround, you could use TeamCity REST API to start (or skip) builds from the build context. Suppose you have a "head" build which consists of a custom script; this script reads the parameters and, depending on the values, either starts or skips platform build. A major downside is that the build chain feature is largely useless with this approach (essentially, you deal with different chain every time configuration is started, because of dependencies being switched on and off) - however, if it would work for you is up to you.

General details of TeamCity REST API usage are available here: https://www.jetbrains.com/help/teamcity/rest-api.html, and here (https://www.jetbrains.com/help/teamcity/rest-api-reference.html#Triggering+a+Build) you could find an example of build trigger request done via REST API.
I hope this helps; please do not hesitate to reach out if you would like any details.

0

Please sign in to leave a comment.