0

To make the most out of a build server's ability to run jobs in parallel

a) split maven lifecycle phases across bamboo stages (Build -> Test -> Deploy) b) split each stage into parallel jobs

I know how to split phases in segments: BUILD: mvn clean deploy -DskipTests TESTS: mvn surefire:test failsafe:test

I don't know how to split across jobs where modules which could be run in parallel are processed by different jenkins jobs. I'd like something that allowed me to run maven with multiple threads to determine which projects should be in each thread or job so I could construct the command line for each thread.

Desired

  • mvn -T4... to generate lists of modules to build for each thread
  • Provide list of modules as "-pl group:art1 -pl group:art2 ..." to each parallel build job
  • Execute jobs in parallel be they builds or tests

Do you know of a plugin or cmdline option for this?

Thanks

Peter

Peter Kahn
  • 12,364
  • 20
  • 77
  • 135
  • If you call `mvn clean install` and an other one `mvn clean deploy` you seemed to be ignoring the maven life cycle cause `deploy` includes install.. – khmarbaise Nov 25 '14 at 20:39
  • Why do you like to split build and test? Cause unit tests belong to the build of a module which is really important. You have also writting `failsafe:test` which are by idea integration tests which should be controlled by a profile instead. Using `mvn -T 4 ` works best...For every build job a new JVM with appropriate memory settings is created...To split life cycle into different jobs does not really make sense. – khmarbaise Nov 25 '14 at 20:41
  • Thanks. I already split build and test by calling failsafe and surefire plugin goals directly. That got me from 10 hours to 2hr for build and 8 for test. My next goal is to split the 2 hrs build across 4 systems and the 10 test test across at least 8 systems. – Peter Kahn Dec 02 '14 at 19:48
  • I'm using build: clean deploy skipping tests. but my GWT compiles suck up a lot of time and can be run in parallel. However, I don't want to hand craft my build jobs. I want generic jobs that get fed their tasks by maven – Peter Kahn Dec 02 '14 at 19:50

0 Answers0