jenkinsjenkins-pipelinejenkins-pluginsjenkins-job-dsl

Jenkins run queued jobs at the same time when they need run one by one


My configuration:

The problem:

QA goes to UI, and runs for example 8 pipelines at the same time. What happens at this moment? As I mentioned before, Node has 15 executors, so all of these pipes can be run - without any blocks(it's nice). Then, when any pipe goes to stage, where it will call another pipe - it will do it. But when the next pipe will go to this stage, he will be scheduling to run this pipe. And we have a situation, when the first pipe is running another pipe, while the others 7 will wait for the first one to finish work with pipe that build modules for android.

BUT then all 7 pipes will call pipe for building android modules at the same time with the same build number - it doesn't expected behavior. I need that all of these 7 pipes will run one by one, and the pipeline for building android modules - will execute well, because I pass different variables to it from the parent pipe.

Maybe somebody had the same issue in the past ??

How Can I solve this problem?


Solution

  • Well, if you want that child pipes will start in sequence you need to pass them different params. For example you can pass in the child pipe params with the name of parent pipe or smth random, but for different pipes it needs to be different.