Skip to content

Using GIT as SCM with IBM Rational Team Concert

28/12/2011
tags: , , ,
For a student course that started fully using IBM Rational Team Concert, but since we are working on extending an open source project (AgilEfant) we were thinking of moving the source code back to a more public accessible SCM namely GIT hosted on GitHub. Yet we still want to use RTC as development and planning environment.

There is a technical document available on jazz.net that describes with some pretty good examples on how to write a git hook to add a link to a work item that points to the change.

I modified the scripts to make them a bit easier to adjust to your own setting. Although that means that instead of two files there are five and currently they won’t work under Windows. The three shell scripts contain everything that needs to be configured, from the Perl binaries (you will need to install the WWW::CURL library), your git binary location, and the location of the other scripts. Everything else is configured in the rtc.sh script. Here is a zip file containing all the files: link. Just copy those files into your .git/hooks/ folder of the code base you want to use with jazz.

Since we need o bring in another 15 or so students into the course working on AgilEfant and those 15 students will have various different setup with respect to their OS and OS configuration, we were looking for another solution. The one we came up with is: GitHub allows to add remote hooks. You can configure GitHub by adding a remote hook. We wrote a small php script that starts a perl script linking the commit to a work item. Of course as described in the technical document depending on the commit comment. The nice thing is that now the students only need to add the one link to the hook and don’t worry about configuring or even installing additional programs. You can download the remote GitHub hooks here.

If you have any questions about the scripts please let me know by either leaving a comment or writing me at adrian.schroeter@googlemail.com.

Update: added the files to a github repository https://github.com/schadr/Git-Hooks-Collection.

7 Comments leave one →
  1. Petteri Räty permalink
    28/12/2011 12:50

    Instead of keeping a zip somewhere we could make a github repo for the hooks.

  2. da7489 permalink
    13/06/2012 10:02

    Thanks for the great post.. Do you know what needs to be done to get these scripts to work in Windows?

    • 13/06/2012 12:22

      I guess you will need to install perl, apache and curl and modify the php script such that you can run the perl script from the php script, that should do the trick

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: