Note that there are some explanatory texts on larger screens.

plurals
  1. POJenkins Partial Build / Modular Build on Commit Hook
    text
    copied!<p><em>Tools</em>:<br> Jenkins ver. 1.470<br> Maven 2<br> Subversion</p> <p><strong>Environment</strong></p> <p>Assume my build has a number of projects A-D. The dependency graph exists as shown. That is to say: B depends on classes in A, C depends on classes in B, D depends on classes in A. We create the jenkins builds such that they call the builds dependent upon them as a post-build action.</p> <p>A<br> |--> B --> C<br> |--> D</p> <p>Each night, we trigger a full build in Jenkins (A builds, triggers B (triggers C), triggers D). This is done easily enough by telling A to build nightly, and the rest cascades.</p> <p><strong>Problem</strong> </p> <p>However, on a commit we want to build the projects that were committed to once. </p> <ul> <li><p><em>Situation 1</em>: We poll the repository (or use <a href="https://wiki.jenkins-ci.org/display/JENKINS/Subversion+Plugin#SubversionPlugin-Postcommithook">commit hooks</a>, it makes no difference) and find that there was a commit to B, then B will build and C will build. <strong>Success!</strong></p></li> <li><p><em>Situation 2</em>: We poll the repository and find that B and C were committed to in one commit, then Jenkins will try to build B (triggering a build of C), and build C (a second build). <strong>Failure.</strong> See what happens? C was built twice, taking up precious build time. <em>Keep the build fast!</em></p></li> </ul> <p><strong>Does anyone know a way to only trigger the highest project in each committed build pipeline?</strong></p> <p>I suppose one solution would be a complex SVN hook that determines the highest project in each pipeline...</p> <ul> <li><em>Situation 3</em>: Commit to B C and D in one commit. SVN hook finds C depends on B. The hook calls project-specific links to start builds for B and D.</li> </ul> <p>Pitfalls: Very complex SVN commit hook. Have to upkeep the pipeline in the SVN hook.</p> <p>I feel like this is a problem others have run into. Is there a Jenkins plugin that helps with this?</p>
 

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