Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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?

0 votes



One answer

Permanent link
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.

2 votes

Comments

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.

  1. Do you know if the Git integration that is provided by RLIA standard works any better in regard to supporting Git builds? 
  2. Also, what is the process that  should be followed to perform a Git build with Jenkins if you are using RTC 5.0?  In other words, 
    1. You use the RTC/Git integration to associate Git commits to RTC WIs.
    2. You create a Jenkins build script that will build Git source code.
    3. You use RTC to invoke the associated Jenkins build job.
  3. How will the RTC/Git change sets get reflected in build results in both RTC and Jenkins?


another thing u can do is update the git commit trigger to fire a jenkins build

https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin

Push notification from repository

To 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

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,023
× 1,203
× 562
× 97

Question asked: Oct 01 '13, 12:47 p.m.

Question was seen: 8,792 times

Last updated: Jun 23 '14, 6:18 p.m.

Confirmation Cancel Confirm