-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Build] Use Maven-deamon to speed up Maven artifact publication #2727
[Build] Use Maven-deamon to speed up Maven artifact publication #2727
Conversation
@@ -15,6 +15,9 @@ pipeline { | |||
} | |||
environment { | |||
REPO = "${WORKSPACE}/repo" | |||
PATH = "${installMavenDaemon('1.0.2')}/bin:${PATH}" | |||
MVND_DAEMON_STORAGE = "${WORKSPACE}/tools/mvnd" // Folder ~/.m2 is not writable for builds, ensure mvnd metadata are written within the workspace. | |||
TERM = 'dumb' // Prevent jline warning about inability to create a system terminal. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is necessary due to
We really need a new I-build to fix the license checking... |
Is this really mvn deamon or because we now store the m2 repository somewhere else?!? Seems a bit odd as the deamnon would be killed after the agent is stopped? |
I don't expect the maven-repo to be stored somewhere else. The gain is still explainable since we start maven twice (once for verification and once for the actual deployment) for each artifact to publish. And since we publish 296 artifacts it means maven is launched almost 600 times. And for all those invocations the daemon can be reused, even if it's killed after the build. |
ouch... |
b04cfa5
to
5b10579
Compare
5b10579
to
b2bb190
Compare
Yep. At least we save 10min of total build time for each second of runtime reduction of each build. And it looks like we save some seconds per build with this. After increasing the keep-alive timeout a bit using the maven-daemon works now stable as desired. I assume that's necessary due to the parallel execution of the matrix on a single-core CPU, which I think makes some threads sometimes sleep for some time. With that this is ready for submission to me. |
Using Maven-deamon reduces the runtime of the repository validation from ~14min to ~1.5min and the publication steps for the different projects from ~23min respectively ~5min to ~9min respectively ~2min.
Overall the runtime is reduced from ~42min to ~16min.