Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-76168

Add sub-option "Use multiple nodes" when selecting "Build modules in parallel"

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Minor Minor
    • maven-plugin
    • None

      Assume that there is a parent pomĀ file in a folder called root, with 10 child pom files each located in a single letter folder.

      $ tree.com //A //F
      Folder PATH listing for volume Acer
      Volume serial number is 127C-AD6A
      C:.
      \---root
          |   pom.xml
          |
          +---a
          |       pom.xml
          |
          +---b
          |       pom.xml
          |
          +---c
          |       pom.xml
          |
          +---d
          |       pom.xml
          |
          +---e
          |       pom.xml
          |
          +---f
          |       pom.xml
          |
          +---g
          |       pom.xml
          |
          +---h
          |       pom.xml
          |
          +---i
          |       pom.xml
          |
          \---j
                  pom.xml
      

      As mentioned, the children pom files list the root's pom as their parent. However, root's pom is also an aggregator pom, listing each of the child modules in its pom.

      • a has no dependencies.
      • Pom files b through j have a dependency on a.

      Let's assume that I have a jenkins set up with 3 available nodes, each with 3 executors.

      If I create a Maven Jenkins Job, checkout the above directory, and then run clean install, with the pom pointed at the root pom file, all children modules will be discovered, have "module" Jenkins Jobs automatically created for them, then they will get kicked off with respect to dependency order. Since the flag "Build Modules in parallel" is off, all modules will be built on a single executor.

      Now, if I check the flag "Build Modules in parallel", rather than running on a single executor, the different modules will generate separate builds, which will queue up (with dependency restrictions in mind). Now, potentially multiple executors can be used.

      However, only 1 node will receive and execute the 10 builds that will be queued up. All available executors on that 1 node will be utilized. But only that 1 node will be available to take on the queued builds.

      This feature request proposes to add an option to the Maven Jenkins Job Configure UI which allows multiple nodes to be used (and thus, each node's available executors) to be able to execute the queued builds. This new option should be defaulted to false.

      If the new flag is set to true, then all builds queued to be executed will be available to all nodes that can run them (attention must be paid to the "Label" functionality, which can restrict where jobs can be built, amongst other similar potholes).

            davidalayachew David
            davidalayachew David
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: