It's all about the answers!

Ask a question

Setup Continuous Integration with ClearCase Adapter.


Andrew Meng (11) | asked May 14 '10, 12:00 p.m.
Hello,
Can anyone share a detailed steps(or document/link) to setup BF to do a continous integration by monitoring source code changes in ClearCase repository?

Thanks a lot!
Andrew

19 answers



permanent link
Brent Ulbricht (2.5k11) | answered May 17 '10, 10:55 a.m.
JAZZ DEVELOPER
Hello,
Can anyone share a detailed steps(or document/link) to setup BF to do a continous integration by monitoring source code changes in ClearCase repository?

Thanks a lot!
Andrew


Hi Andrew,

Are you more interested in the details of how to set up Build Forge to use an adaptor on a schedule (ex. adaptor, adaptor link, project, schedule objects) or the actual commands in the ClearCase adaptors that ship with Build Forge?

bju

permanent link
Sam Mathia (2121) | answered May 17 '10, 3:39 p.m.
I am looking for similar information. Do you know where to find information on the actual commands that can be used with the default clearcase adaptor.

Thanks
Sam

permanent link
Brent Ulbricht (2.5k11) | answered May 18 '10, 8:55 a.m.
JAZZ DEVELOPER
Hi,

The IBM Education Assistant has some introductory information on Build Forge adaptors and adaptor links that is a good overview. The modules are based on an older version of Build Forge, but that area of the product has not changed much with newer releases.

http://publib.boulder.ibm.com/infocenter/ieduasst/rtnv1r0/index.jsp?topic=/com.ibm.iea.rbf/rbf/7.0/Operations/RBF_Operations1_WorkingWithAdapters/player.html

Once you are familiar with the adaptor XML structure, looking at the the commands that are in the ClearCase adaptors should make more sense. You might try to match up which commands the adaptors have in them with your current process for building software and adjust as needed.

bju

permanent link
Sam Mathia (2121) | answered May 18 '10, 10:41 a.m.
Hi,

The IBM Education Assistant has some introductory information on Build Forge adaptors and adaptor links that is a good overview. The modules are based on an older version of Build Forge, but that area of the product has not changed much with newer releases.

http://publib.boulder.ibm.com/infocenter/ieduasst/rtnv1r0/index.jsp?topic=/com.ibm.iea.rbf/rbf/7.0/Operations/RBF_Operations1_WorkingWithAdapters/player.html

Once you are familiar with the adaptor XML structure, looking at the the commands that are in the ClearCase adaptors should make more sense. You might try to match up which commands the adaptors have in them with your current process for building software and adjust as needed.

bju


Thanks for sharing the info. This should be very helpful.

permanent link
ep zee (9695) | answered Jun 14 '10, 11:22 a.m.


Hi Andrew,

Are you more interested in the details of how to set up Build Forge to use an adaptor on a schedule (ex. adaptor, adaptor link, project, schedule objects) or the actual commands in the ClearCase adaptors that ship with Build Forge?

bju


Hello, I'm actually more interested in the commands and env variables that the ClearCase adaptor uses. For instance in the ClearCaseBaseline template we have the following variables:

# INT_STREAM
# VIEW
# PROJECT_VOB
# CCSERVER
# UNIXCLIENT

What value should I set to the CCSERVER var? The online help says: Set this variable to the name of a Build Forge server that has the ClearCase client installed and running. But I don't know what "ClearCase client" means.

Also, in the commands section we have a "cleartool" command. I'm familiar with the rcleartool but I've never used the "cleartool" one. Do I have to install/configure any aditional software? The cleartool command is the ClearCase client? If so, where can I download it?

Thanks in advance,
ep.

permanent link
Brent Ulbricht (2.5k11) | answered Jun 15 '10, 9:03 a.m.
JAZZ DEVELOPER


Hi Andrew,

Are you more interested in the details of how to set up Build Forge to use an adaptor on a schedule (ex. adaptor, adaptor link, project, schedule objects) or the actual commands in the ClearCase adaptors that ship with Build Forge?

bju


Hello, I'm actually more interested in the commands and env variables that the ClearCase adaptor uses. For instance in the ClearCaseBaseline template we have the following variables:

# INT_STREAM
# VIEW
# PROJECT_VOB
# CCSERVER
# UNIXCLIENT

What value should I set to the CCSERVER var? The online help says: Set this variable to the name of a Build Forge server that has the ClearCase client installed and running. But I don't know what "ClearCase client" means.

Also, in the commands section we have a "cleartool" command. I'm familiar with the rcleartool but I've never used the "cleartool" one. Do I have to install/configure any aditional software? The cleartool command is the ClearCase client? If so, where can I download it?

Thanks in advance,
ep.

Hi ep,

The ClearCase adaptor that ships with Build Forge is intended for use with the ClearCase full client install. Your mention of rcleartool suggests that you are using ClearCase Remote Client (CCRC) which is different than the full client install.

The CCSERVER variable needs to point to a logical Build Forge server definition which has both the Build Forge agent and the full ClearCase client. The cleartool command should be in the path so that when the adaptor runs it can find the cleartool command. Running something like 'cleartool -v' should give an indication if cleartool is in the path.

bju

permanent link
ep zee (9695) | answered Jun 15 '10, 11:07 a.m.


Hi ep,

The ClearCase adaptor that ships with Build Forge is intended for use with the ClearCase full client install. Your mention of rcleartool suggests that you are using ClearCase Remote Client (CCRC) which is different than the full client install.

The CCSERVER variable needs to point to a logical Build Forge server definition which has both the Build Forge agent and the full ClearCase client. The cleartool command should be in the path so that when the adaptor runs it can find the cleartool command. Running something like 'cleartool -v' should give an indication if cleartool is in the path.

bju


Hi bju, thank you very much.

Indeed I use CCRC, so how can I connect BuildForge with CCRC? Do I have to write my own adaptor?

EDIT: I can execute rcleartoll commands successfully, but what I want to do is run a build only if the code has changed.

Thanks,
ep

permanent link
Brent Ulbricht (2.5k11) | answered Jun 17 '10, 11:39 a.m.
JAZZ DEVELOPER


Hi ep,

The ClearCase adaptor that ships with Build Forge is intended for use with the ClearCase full client install. Your mention of rcleartool suggests that you are using ClearCase Remote Client (CCRC) which is different than the full client install.

The CCSERVER variable needs to point to a logical Build Forge server definition which has both the Build Forge agent and the full ClearCase client. The cleartool command should be in the path so that when the adaptor runs it can find the cleartool command. Running something like 'cleartool -v' should give an indication if cleartool is in the path.

bju


Hi bju, thank you very much.

Indeed I use CCRC, so how can I connect BuildForge with CCRC? Do I have to write my own adaptor?

EDIT: I can execute rcleartoll commands successfully, but what I want to do is run a build only if the code has changed.

Thanks,
ep

Hi ep,

Yes, you could write your own adaptor. The main thing would be to understand the manual process that you follow for CCRC and translate that into a XML adaptor. If you can find an existing adaptor that is close to what you need to do, then that could serve as a template.

Best regards,

bju

permanent link
ep zee (9695) | answered Jul 08 '10, 10:55 a.m.
Finally I wrote my own adaptor:


<?xml version="1.0"?>
<!DOCTYPE PROJECT_INTERFACE SYSTEM "interface.dtd">
<PROJECT_INTERFACE IFTYPE="Source" INSTANCE="7.021">
<template>

<env name="latest_build" />
<env name="latest_update" />

<env name="username" />
<env name="password" />
<env name="server" />
<env name="tag" />

</template>

<interface name="ByDate">
<run command="lsview" params="$username $password $server $tag" server="$BF_SERVER" dir="/" timeout="360"/>


<ontempenv name="Changes" state="empty">

<step result="FAIL"/>
</ontempenv>

<onstep result="pass">
<setenv group="[ADAPTOR]" name="latest_build" value="$latest_update"/>
</onstep>
</interface>

<command name="lsview">

<execute>
rcleartool lsview -username $username -password $password -server $server -age $tag
</execute>

<resultsblock>

<match pattern="^Last accessed (.*) (AM|PM)">
<bom category="Result" section="LastAccessDate">
<field name="lastAccessedDate" text="$1"/>
</bom>
<setenv group="[ADAPTOR]" name="latest_update" value="$1"/>
<run command="compare_dates" params="$1 $2 $latest_build" server="$BF_SERVER" dir="/" timeout="360"/>
</match>

</resultsblock>
</command>

<command name="compare_dates">

<execute>
compare_dates.bat "$1 $2" "$latest_build"
</execute>

<resultsblock>
<match pattern="RUN$">
<setenv name="Changes" value="$1" type="temp append"/>
</match>
</resultsblock>
</command>



<bomformat category="Result" title="Last Access Date">
<section name="LastAccessDate">
<field order="1" name="lastAccessedDate" title=""/>
</section>
</bomformat>

</PROJECT_INTERFACE>


The compare_dates.bat batch file only does the following:
IF NOT %1==%2 echo RUN


I really don't like using this batch file to compare the variables, so I've tried this:


<setenv group="[ADAPTOR]" name="Changes" value="" condition="true($latest_build==$latest_update)"/>
<setenv group="[ADAPTOR]" name="Changes" value="RUN" condition="false($latest_build==$latest_update)"/>


The condition is always false, even when the values are the same! (I save them into 2 different variables in previous setenv tags), but it doesn't seem to change the "Changes" var...

Is this the way to compare in the xml? What could be going on?

Thanks!
ep

permanent link
Brent Ulbricht (2.5k11) | answered Jul 09 '10, 9:05 a.m.
JAZZ DEVELOPER
Hi ep,

It's great to have an update on your progress. I was wondering if you had tried this solution. In your <resultsblock>, instead of running the "compare_dates" command, if you added a statement to set the "Changes" variable instead. I'm thinking the new <resultsblock> might look like the following (I'm hoping this displays correctly since the XML could possibly confuse the forum software.):

      <resultsblock>

<match pattern="^Last accessed (.*) (AM|PM)">
<bom category="Result" section="LastAccessDate">
<field name="lastAccessedDate" text="$1"/>
</bom>
<setenv group="[ADAPTOR]" name="latest_update" value="$1"/>
<setenv name="Changes" value="RUN" type="temp append" condition="false($latest_build==$latest_update)"/>
</match>
</resultsblock>


The one thing I noticed about your previous <setenv> statements with the condition is that the group attribute was set to "". That signals to set the variable on the environment of the step or adaptor link that calls the adaptor, but in this case the "Changes" variable is more of a temporary variable local to the adaptor itself.

bju

Your answer


Register or 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.