Note that there are some explanatory texts on larger screens.

plurals
  1. POJenkins: How To Build multiple top-level projects from a git repository?
    primarykey
    data
    text
    <p>I have a Git repository that contains a bunch of top-level maven projects (each sits in their own sub-directory with a pom.xml). Top-level here means that these projects sit in subdirectory directly underneath the repository root. All of these projects should remain in the same Git repository.</p> <pre><code>repo +--- projectA +--- pom.xml +--- projectB +--- pom.xml </code></pre> <p>They can/should be built by independent jenkins jobs. So we have a job for projectA and one for projectB.</p> <p>Formerly with Subversion I was able to set up a Jenkins job (for each project) that would checkout only the project source and run a Maven build from the pom.xml.</p> <p>With the Git model (probably the same with all DVCS) this changes and I'm not sure what is best practice. There are a few options that I see and from which none I really like:</p> <ol> <li>Each Jenkins job is <a href="https://stackoverflow.com/questions/17310959/is-there-any-way-to-change-the-working-directory-of-a-jenkins-maven-build">configured</a> to clone/pull the full Git repo and refers to the /pom.xml for the Maven build. So the job has all the code but builds only a slice of it. </li> <li>Git offers Submodules (<a href="http://book.git-scm.com/5_submodules.html" rel="nofollow noreferrer">http://book.git-scm.com/5_submodules.html</a>) which seem to be a bit tricky to handle (and can break easily)</li> <li>Create a maven parent (aggregator that contains all of the projects) project that triggers each projects build (having a single jenkins job). This pom.xml contains elements for projectA and projectB.</li> </ol> <p>Do you see any more useful approach for this (very typical setup). What is your experience? Any best practices?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload