build configuration templates => GIT multiple branches and configuration dependencies

I have setup a configuration template that has two parameters.

- defaultBranch
- branchSpecifiction

They are used in the templates VCS

I have three build configurations that use the template.

- Build and run Tests
- deploy master branch
- deploy test branch

the build and run tests should run against all branches (master and test) as well as all PR's
the deploy master should only run for master branch changes.
the deploy test should only run for test branch.

each of the deploy configurations have their own version of the parameters, i.e. master will point to refs/heads/master and test refs/heads/test with the relevant specifications

each of the deploy configurations have the build and run tests as a dependency.  

What I am trying to achieve is when deploy test is triggered, (either manually or automatically) the build and run tests will ensure it has run for the test branch.  Currently I can only get it to run for master.  So when I trigger deploy test, build and run tests runs for master, then deploy test branch runs for test branch.

Is this possible with one shared build and run tests configuration?

1 comment

Hello Jon,

Do you have snapshot dependency configured between "Deploy Test" build configuration and "Build and run Tests"? If a build configuration with branches has snapshot dependencies on other build configurations, when a build in a branch is triggered, the other builds in the chain also get the branch associated. Please see the section in documentation for more details.

0

Please sign in to leave a comment.