Skip certain jobs on branches


We have a build chain where we have 9 jobs. Some are executed in sequence, some are executed simultaniously. What I would like to achieve is that if the build chain is currently building a BRANCH, i want some of the jobs to be skipped (just return OK).
Is this possible to achieve?


1 comment
Comment actions Permalink

I don't know of a way to do this purely within TeamCity. I achieve your goal by always using  the command line runner which runs a wrapper script shared by all builds. This gives me all the flexibility I need to define build policies independent of the feature set provided by TeamCity

In this case, all I need to do is pass in the  parameter as an environment variable and then test it within the build  script itself.

Even if you wish to use one of the canned build runners, you could insert a build step prior to the canned build runner that runs a test script and fails on your branches where you wish the build to not occur. Not sure how to force the build to succeed in that case, though.


Please sign in to leave a comment.