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.
Comments
N. Dot
commented Jun 21 '14, 10:16 p.m.
Hello Nick! Now that RTC 5.0 has a native Git integration, are you able to create a build of the Git source code that is linked to an RTC work item via the Jenkins-RTC plugin? If so, will the build results, in both RTC and Jenkins, reflect the RTC work items that were included in the build along with their associated change sets (which are in Git)?
@nessadot, RTC 5.0 has support for Git wrt process enforcement for push operation and linking work items with commits. There is no build related integration that has been udpated -- Jenkins RTC plugin included. The 5.0 Git integration's features are described here.
The 5.0.1 investigation on Git <-> Build integration is tracked by this plan item.
I suggest subscribing and posting your requirements there.
This doesn't specifically cover Jenkins integration, but since Git and Jenkins are often found in use together, the kind of scenario you describe makes perfect sense.
N. Dot
commented Jun 23 '14, 5:39 p.m.
sam detweiler
commented Jun 23 '14, 6:18 p.m.
another thing u can do is update the git commit trigger to fire a jenkins build
Push notification from repositoryTo minimize the delay between a push and a build, it is recommended to set up the post-receive hook in the repository to poke Jenkins when a new commit is made. To do this, add the following line in your hooks/post-receive where "URL of the Git repository" is the fully URL you use to clone this repository.
how that gets back to RTC without the RTC plugin being used I don't know
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.