Assembling Multi-build-configuration Setup

I'm trying to figure out how to work out how to assemble two build configurations based off one VCS root. I want one build configuration to watch the dev branches, and the other build configuration to watch master, release, and other branchs. They will each have different commands run and different build artifacts.

VCS ROOT (The root is an internal git repository)
Default Branch
refs/heads/master
Branch Spec:
+:refs/heads/*

Build Configuration 1 (Ignoring Dev work)
VCS Trigger
Branch Filter
+:*
-:refs/heads/dev-*

Build Configuration 2 (Processing Dev work)
VCS Trigger
Branch Filter
+:refs/heads/dev-*

However, both build configurations are picking up the branch updates, including the one's that they shouldn't trigger on. What more, the second build configuration doesn't automatically run at all. The change just sits in queue, waiting for me to manually run it. It does at least run the right command when it does run.

I imagine that I'm probably missing something quite small and trivial, but I've already spent a couple of hours on this and have exhausted my google-fu.

Thanks,

4 comments
Comment actions Permalink

Hi,

In VCS Trigger branch filter the logical branch name is used. So you need to configure it like this:

Build Configuration 1 (Ignoring Dev work)
VCS Trigger
Branch Filter
+:*
-:dev-*

Build Configuration 2 (Processing Dev work)
VCS Trigger
Branch Filter
+:dev-*

0
Comment actions Permalink

Thanks. That almost got me there. Processes are dividing out properly between the two build configurations. However, each is building up a queue of 'pending' branches that the other build configuration:

Build Configuration 1 Pending Queue (ignoring dev-* branches)
dev-1-branch checkin
dev-2-branch checkin


Build Configuration 2 Pending Queue (processing only dev-* branches)
master
test

Thoughts, comments, suggestions?

Edit:

I have been able to tease out most of this by creating a second VCS Root, though am still having issues. I'm trying to simplify the case by removing wildcards and focusing on a single branch (master).


Build Configuration 1 (Watching Master)
VCS Root 1
Default Branch: refs/heads/master
Branch Specifications: None

Build Trigger 1
Branch Filter: +:*

Build Configuration 2 (Ignoring Master)
VCS Root 2
Default Branch: None
Branch Specification:
+:refs/heads/*
-:refs/heads/master

Build Trigger 2
Branch Filter: +:*

Build configuration 1 only does processes when master is checked in (as desired). However, Build Configuration 2 is still picking up changes to master. It's also marking the branch name in bold blue rather than the lighter blue of the other branches. I have this feeling I may need to remove the build configuration and start over?

0
Comment actions Permalink

For Git for example the Default branch is set to master by default (and it also used when you setup Build specification). So for sencond build confuguration you need to redefine default branch.


Build Configuration 1 (Watching Master)
VCS Root 1
Default Branch: refs/heads/master
Branch Specifications: None


Build Configuration 2 (Ignoring Master)
VCS Root 2
Default Branch: refs/heads/dev (or other non-master branch)
Branch Specification:
+:refs/heads/*
-:refs/heads/master

And you can configure triggers with no branch rules.
See related issue http://youtrack.jetbrains.com/issue/TW-23395.

0
Comment actions Permalink

Thank you much for your help! :) That helped to solve the issues I was having.

0

Please sign in to leave a comment.