Jazz Build Engine with GIT SCM
I want to use a Jazz Build Engine to build source from GIT. Does anyone have any experience of doing this?
My current thought is to have a Build Workspace set up and clone the GIT repo to that at the start of every build, using jgit ant tasks, then build as normal (our other builds use RTC SCM).
Is this the recommended approach?
One answer
Hi Kathleen, do your other builds do any modifications (delivering changes etc) back to RTC SCM? If not, and it's just a question of getting the latest sources down to the build machine, I would not recommend trying to maintain the code in both SCM systems.
In the simplest case, you could create a command line or Ant build definition in RTC, configured to point to a script on the build machine whose first step uses the Git command line to bring in changes from Git.
If you want to maintain this script under version control, then you could create an RTC SCM stream and corresponding build workspace just for that, and include the Jazz Source Control option in the build definition to bring the script down to the build machine.
One limitation here is that there's no way for the RTC build to do a pre-build check for whether there are new changes in Git to build. This check could be done early in your build script, and if no changes are found the script could invoke our completeTeamBuild Ant task with buildNotNecessary="true", which will close off the build and delete it.
Another option is to use Jenkins to run these Git builds, as it has good support for CI builds with Git. With our Team Concert plugin for Jenkins, you could configure the job to refer to a corresponding build definition in RTC, and the plugin will take care of creating an RTC build result corresponding to the Jenkins build, and cross-linking them. From within the main build script, you could still use our other Ant tasks for publishing downloads / logs / compilation- and test results, to the RTC build, like you do for regular JBE-based builds.