Last active
December 17, 2015 16:59
-
-
Save aldaris/5642634 to your computer and use it in GitHub Desktop.
Jenkins+Artifactory notes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How the Jenkins build works: | |
To debug the start of the Maven build go for MavenModuleSetBuildExecution#doRun. | |
Basically during job start some of the extensions are called to create these build properties file that contains lots of information on where to deploy and what, the same set of data hence should be available when actually running the build. (becomes a temp file in tempdir), after it's set up. | |
ProcessCache#MavenProcess constructor is a good place to actually see the maven-agent3 starting cli command, although it should be logged in build console as well. | |
At somewhere very low on the stack a ProcessCache#call method will be invoked. | |
Basically when you do a Maven build that will kick off a new process running using the Maven3Main class from maven3-agent, and uses TCP connections to share data across the processes. On the forked process side you can look at Maven3Launcher class, where it will actually invoke the Maven3 execute method, after that you just run the build nicely from Maven itself. | |
Artifactory as a regular bastard of course uses an AbstractLifecycleListenerParticipant implementation coming from build-info-extractor-maven3 or whatnot (see -Dm3plugin.lib JVM property), and basically that listener will be invoked with onSessionEnded when the build has pretty much finished. See also BuildInfoRecorder which is invoked open projectSucceeded. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment