Serialize bamboo assemblies?

We use Bamboo v3.1.1 as our continuous integration build server, and it works very well - most of the time.

One of the problems we are facing is that we conduct enough database-oriented testing, for example. assemblies perform some of their unit tests and integrations in a shared database instance.

This causes problems when we have several Bamboo assemblies for the same assembly plan that work at the same time - they trip over each other and cause deadlocks and, as a rule, all the assemblies associated with this will not be able to do this.

So, while parallel assemblies are large - theoretically - we would like us to be able to define an assembly plan to "serialize" assemblies, for example. never do more than one assembly in parallel.

Does anyone know how we can do this? Is there a setting to tell Bamboo to "not parallelize this build plan", just build at a time, sequentially "

Update:

My build process currently has two steps:

  • core build (creating a VS-solution, updating the test database to the latest scripts)
  • testing (NUnit 2.4)

The assembly core can be run several times in parallel - there are no problems. However, the β€œTesting” phase cannot be started more than once, since some of these tests gain access to the one and only common unit test database; if more than 1 "test" stage works, they will interlock each other.

So, how do I tell Bamboo in order to parallelize the kernel creation phase, but for β€œtesting” only one instance is always executed at a time, no matter how many starts it takes ??

+6
source share
2 answers

My approach would be to build a kernel in one plane and conduct testing in another plane. The kernel will build a test plan as a child plan.

Then, as soon as the construction of the kernel is completed, a test plan appears.

It is assumed that in terms of building a kernel, you can run multiple instances in parallel on many machines. The test plan will be limited to one instance of the plan, launched immediately.

My only confusion is that you said:

  • core build

    (creating a VS-solution, updating the test database to the latest scripts )

Does the test database update the problem for the current test plan?

+2
source

Yes. There are two ways to do this: tasks and steps. I guess you need stages.

In order for your assemblies to work in parallel, you must have several tasks performed within one stage. If you perform tasks that cannot be performed in parallel and place them in different stages, they will be launched sequentially. For example, if you have:

Test Foo Stage: Init Foo Database Job Hammer Foo Database Job Smash Foo Database Job Test Baz Stage: Init Baz Database Job Bamboozle Baz Database Job Befuddle Baz Database Job 

Then, Init / Hammer / Smash at the foo stage will work problematically in parallel. However, you can put each at its own stage:

 Test Foo Init Stage: Init Foo Database Job Test Foo Hammer Stage: Hammer Foo Database Job Test Foo Smash Stage: Smash Foo Database Job Test Baz Init Stage: Init Baz Database Job Test Baz Bamboozle Stage: Bamboozle Baz Database Job Test Baz Befuddle Stage: Befuddle Baz Database Job 

Then each task will be performed sequentially, and not in parallel. Of course, this effectively limits you to one useful agent.

If you really want to use only one agent, you can always disable everything except one agent, but this will affect all assemblies, so it would not be a good idea if you want something to run in parallel.

And as a last comment, you can also get where you want tasks instead of stages. Combine tasks from each task, and they will be launched in sequential order by one agent. Of course, each task will see the changed files and status from the previous task, so you want to make sure that they will not interfere.

+2
source

Source: https://habr.com/ru/post/900116/


All Articles