rtcjazz

Pulling code automatically from remote Jazz server


I work for a development team and they have their source code in a remote jazz server. They have sent me a Team Invite which I have accepted and using Eclipse RTC plugins I am able to pull code in my local machine. I have the below goals to achieve :

  1. To periodically pull code from jazz server completely un-manned way. Example, I want to pull the code every 4 hours and want to trigger a local jenkins build on the pulled code.
  2. To send the build completion mail to stakeholders.

To achieve above point 1, I have done the following :

  1. Tried to use RTC Web Client -> Source control. For automation I can use Selenium, however, RTC Web Client-> Source Control feature does not provide facility to pull the code from project level in one shot, some one has to browse through all the folder hierarchy and can pull individual files by clicking on them.

  2. I have downloaded RCT-SDK-3.0.zip and tried to use the plugins inside my Eclipse Kepler, however, I could not make it work mostly because of lack of knowledge in RTC-SDK APIs and also because I am getting below error while doing so :

java.lang.NullPointerException at com.ibm.team.repository.common.internal.util.VersionStringComparator.getIntegerParts(VersionStringComparator.java:71) at com.ibm.team.repository.common.internal.util.VersionStringComparator.innerCompare(VersionStringComparator.java:45) at com.ibm.team.repository.common.internal.util.VersionStringComparator.compare(VersionStringComparator.java:32) at com.ibm.team.repository.common.internal.util.ModelElementDescriptor$EvolutionDescriptorComponentVersionComparator.compare(ModelElementDescriptor.java:152) .... at com.ibm.team.repository.common.internal.util.InternalTeamPlatform.initializeAdapterRegistry(InternalTeamPlatform.java:248) at com.ibm.team.repository.common.internal.util.InternalTeamPlatform.start(InternalTeamPlatform.java:105) at com.ibm.team.repository.client.TeamPlatform.startup(TeamPlatform.java:49)

Below is the code I tried :

TeamPlatform.startup();
ITeamRepository repo = TeamPlatform.getTeamRepositoryService().getTeamRepository("URL");
repo.registerLoginHandler(new ILoginHandler() {....};
repo.login(null);

The above error is coming while calling the API TeamPlatform.startup();

Please note that I do not have any access to change configuration on remote Jazz server and neither I can ask it for.

The goal I am trying to achieve , is it possible to achieve ?


Solution

  • want to trigger a local jenkins build on the pulled code.

    Then it is best to have it own Jenkins master (which will server here also as its main slave), and use the official Jenkins Team Concert Plugin in order to integrate RTC into Jenkins.

    All you need is, in addition of Jenkins, to unzip a Build System Toolkit and reference it in your RTC Jenkins job.
    That job will use a workspace which will be checked out as a local sandbox within the jenkins job path.