-
Bug
-
Resolution: Fixed
-
Major
-
None
-
amazon-ecs plugin version 1.16
-
-
v1.18
If you have one agent template with labels defined, and you create a Pipeline job that requests nodes of the same label in a parallel block, only one ECS agent will be launched. As a result, the work is only done serially, rather than in parallel as expected, because only one executor is available. Example Pipeline code:
def tasks = [:] tasks["task_1"] = { stage ("task_1"){ node('mylabel') { sh 'echo foo' } } } tasks["task_2"] = { stage ("task_2"){ node('mylabel') { sh 'echo bar' } } } parallel tasks
If you run two copies of this job, or any other job that uses the same label, an agent will be launched for each job that is running. And if the parallel block of your Pipeline job refers to two different labels, then two agents will be launched. The issue is only with uses of the same label within the parallel branches.