Search code examples
svneclipse-pluginjenkinstycho

Aggregating components from different source code locations


Is there a way to easily aggregate components from different SVN source code locations in a Jenkins build and using Tycho as a build tool?

Let's say product consists of five plugins, one might be located in trunk/core/pluginA, another in /trunk/ui/pluginB, another in a branch /branches/ui2/pluginC and also /trunk/ui/pluginC. I want to create Jenkins job that will aggregate all these plugins.

I can of course individually check them out with individual repository URL locations, but this task becomes a bit hard when you have 20 or 30 plugins to work with. Can I somehow checkout all these components using their location in the SVN tree as information for the aggregation?


Solution

  • I don't know the Buckminster build, but I suppose that it (just like the PDE headless build) also handles the interaction with the source control system. Tycho doesn't deal with source control, but assumes that the sources have been checked out before the Tycho build is invoked. This means, that you will need to handle the checkout of the sources yourself first.

    I assume that SVN doesn't allow you to check out the different branches at once. Therefore, you'll need to build iteratively. This is how this could be scripted:

    1. Clear the local Maven repository (to remove all result from previous builds)
    2. For each bundle
      • Check out the sources
      • Build with mvn clean install; this places the build results into the local Maven repository
    3. Aggregate the overall result through an eclipse-repository that includes all bundles. By default, everything built locally with install is part of the target platform, so this mvn call will be able to see all bundles built before.

    You will need to maintain the list of bundles and source location yourself. I'm not aware of any automation support for this.