Re:If a Build Takes 4 Hours, Run It Every 4 Hours
by noisy_boy on Wednesday April 22, 2020 @08:15AM
(#22944696)
Thanks for the suggestions. We have very few multi-module projects. Most of the time, the time is spent in the various stages - almost all of them shell scripts. I guess there is overhead of initializing the stages/spawning etc. I also think that Jenkins could be doing some serialization to be able to resume a failed build - which we don't really need as we'll probably start a fresh build anyway. That's my next area to explore.
You can still have nice stages separations, but try to avoid the pitfall of doing too much shell invocations.
A good trick is to create a fake "multi-module reactor" pom.xml and grouping all the modules logically there, then you build like
mvn clean install -f reactor-pom.xml -T 8C