Home > Mobile >  Prevent parallelization of jobs in Jenkins
Prevent parallelization of jobs in Jenkins

Time:01-19

I am faced with the task of automating the build and test process for 4 software products in Jenkins. As many steps as possible should run in parallel.

enter image description here

The build of all four products can run in parallel. However, the test can only be parallelized by products 3 and 4. The test process of 1 and 2 must be sequential.

How would you basically design the automation in Jenkins?

  • If I create 4 separate pipelines, it needs to be ensured that the test process of 1 and 2 does not run in parallel.
  • Is it easier to create a single pipeline and prevent parallelization of 1 and 2 using job dependencies?

CodePudding user response:

A quick solution off the top of my head would be something like this:

enter image description here

Run all the build jobs in one stage and have all of them inside a parallel block.

Then you create a new stage that runs after all the build stages have completed. This stage will also have a parallel block. Tests 3 and 4 will run in parallel while 1 and 2 run sequentially.

  • Related