GIT and RTC integration via scm command line
Hello,
We're looking at integrating GIT repositories into RTC SCM. We need to create an automation that would access the .git directories and store them into RTC on a daily base.
Is there any sample code on how to use the scm command line to achieve what we need? How would scm handle the daily code changes?
Thank you in advance for any pointers.
Accepted answer
Hi EclipseTalk,
From what you have described, I believe you need to maintain the git objects (i.e., the ".git" directory) of a Git Repository in RTC SCM. If that is the case, you can try the following:
From what you have described, I believe you need to maintain the git objects (i.e., the ".git" directory) of a Git Repository in RTC SCM. If that is the case, you can try the following:
1. Create (or clone) a Git Repository inside a RTC SCM Sandbox, and share it into a Stream (component).
2. If you intend to store only the objects, then ignore the other files and folders apart from ".git" using the RTC client. It generates a .jazzignore file, check in the same. This makes sure that only the ".git" repository and its contents are being tracked by RTC SCM.
If the Git Repository in question is a bare repository or a mirror, then this may not be needed.
3. Now deliver the change-set containing the objects and references in the ".git" folder. The .git repository is now shared with RTC SCM.
Lets say that there are more commits pushed / created into this repository. Now, when you open an RTC client, and set to the same sandbox (as done above), it can detect that there are new changes to the ".git" directory, and is shown in the Pending Changes, and can be delivered to RTC Stream.
You may want to do this often.
As to whether you can do it via the SCM command line - yes, it should be possible, since from the RTC SCM CLI's perspective, the git repository is yet another folder, which can be tracked, checked in and delivered.
As to whether you can do it via the SCM command line - yes, it should be possible, since from the RTC SCM CLI's perspective, the git repository is yet another folder, which can be tracked, checked in and delivered.
(See SCM CLI commands: scm refresh, scm status, scm checkin, scm deliver commands).
Comments
Geoffrey Clemm
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Sep 16 '13, 4:58 p.m.EclipseTalk .
Sep 17 '13, 1:02 p.m.Geoffrey Clemm
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Sep 17 '13, 11:13 p.m.EclipseTalk .
Sep 18 '13, 8:54 a.m.