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

Loading a component root as a directory during a build?

How do I load a component root as a directory during a build? I can do it from the command line and from the UI. The Component load rules in the build definition only allows for folders within a component.

I imported a ClearCase VOB into an RTC component and it has this structure:
VOB_Name
-> CommonFile.txt
-> Dir1
-> Dir2

Unless I load the component root (i.e. VOB_Name) as a directory I do not get the CommonFile.txt loaded. I cannot figure out how to do this as part of the build automation.

Thanks,

Jeff

0 votes



12 answers

Permanent link
This functionality will be provided by work item 85020 (in plan for RTC
3.0).

Cheers,
Geoff

jeffhans wrote:
How do I load a component root as a directory during a build? I can do
it from the command line and from the UI. The Component load rules in
the build definition only allows for folders within a component.

I imported a ClearCase VOB into an RTC component and it has this
structure:
VOB_Name
-> CommonFile.txt
-> Dir1
-> Dir2

Unless I load the component root (i.e. VOB_Name) as a directory I do
not get the CommonFile.txt loaded. I cannot figure out how to do this
as part of the build automation.

Thanks,

Jeff

0 votes


Permanent link
On 16-Dec-09 12:22 AM, jeffhans wrote:
How do I load a component root as a directory during a build? I can do
it from the command line and from the UI. The Component load rules in
the build definition only allows for folders within a component.

I imported a ClearCase VOB into an RTC component and it has this
structure:
VOB_Name
-> CommonFile.txt
-> Dir1
-> Dir2

Unless I load the component root (i.e. VOB_Name) as a directory I do
not get the CommonFile.txt loaded. I cannot figure out how to do this
as part of the build automation.

Thanks,

Jeff


Just wondering... why not using SCM CLI (you said from command line is
working) from your Build script?

0 votes


Permanent link
I should clarify a bit here. I expected that for at least the build automation part that I would get out everything in the RTC component, including files that are at the component root (i.e. no parent directory). That is not the case. When the build workspace is created it only loads the directories but not the file that is at the same level (i.e. CommonFile.txt). If I create a workspace from the UI or command line specifying the creation of component root directory then the file shows up. My challenge is that the code in the directories reference CommonFile.txt so unless I can get that file to show up where its expected then I'll have to make a lot of code changes.

I have not tried to use the command line from my build scripts at this point. I'm just trying to get the build automation running based on how its being done in ClearCase with CruiseControl today.

Thanks,

Jeff

0 votes


Permanent link
So you're saying that if no load rules are specified, files at the root of the component are not loaded? If that's the case, then that's definitely a bug.

0 votes


Permanent link
Nick,

Regardless of the build's load rules I do not get the files at the component root. I can log a bug against this if you determine I should.

Here's a test I just ran:

From the command line I get what I expect:
c:\jazz_workspaces\root_test>scm load _dmDyIOkaEd69vLBSXkwbcQ -r https://localhost:9443/jazz -u jeffhans -P jeffhans -d .

Downloading AMA.MA.snk (19 B)
Downloading .project (210 B)
Downloading loadrules_build.txt (16 B)

Downloading /DragDrop/Code/Form1.resx (5.4 KB)
Downloading /DragDrop/Code/DragDrop.csproj (4.1 KB)
Downloading /DragDrop/Code/Form1.cs (17.4 KB)
Downloading /Attributes/Misc/TraceLibrary.xml (8.1 KB)
Downloading /Attributes/Code/AttributeSample.sln (1.9 KB)
Downloading /Attributes/Misc/AttributeSample.xml (3.9 KB)

c:\jazz_workspaces\root_test>dir
Directory of c:\jazz_workspaces\root_test
12/17/2009 10:44 AM <DIR> .
12/17/2009 10:44 AM <DIR> ..
12/17/2009 10:44 AM <DIR> .jazz5
12/17/2009 10:44 AM <DIR> .metadata
12/17/2009 10:44 AM 210 .project
12/17/2009 10:44 AM 19 AMAT.MAS.snk

12/17/2009 10:44 AM <DIR> Attributes
12/17/2009 10:44 AM <DIR> DragDrop
12/17/2009 10:44 AM 16 loadrules_build.txt
3 File(s) 245 bytes
6 Dir(s) 2,092,625,920 bytes free

Using a basic Command Line build definition (without load rules) I don't get the rooted files. Using load rules doesn't change the behavior:

c:\jazz_buildspaces\csharp_bld>dir
Directory of c:\jazz_buildspaces\csharp_bld
12/17/2009 10:51 AM <DIR> .
12/17/2009 10:51 AM <DIR> ..
12/17/2009 10:51 AM <DIR> .jazz5
12/17/2009 10:51 AM <DIR> Attributes
12/17/2009 10:51 AM <DIR> DragDrop
0 File(s) 0 bytes
5 Dir(s) 2,092,814,336 bytes free

0 votes


Permanent link
Here are the results of my testing alternate solutions based on http://jazz.net/library/article/195.

Using the command line build without the Jazz engine I successfully created a build workspace with the expected top level files.

Using the Ant build without the Jazz engine I successfully created a build workspace but without the expected top level files.

This is the build.xml file I used:
<project>
<Typically>
<property>
<property>
<target>
</target>
<target>
<mkdir>
<teamFetch>
</target>
<taskdef>
<taskdef>
</taskdef>
<taskdef>
</project>


This is the resulting build workspace from the Ant build:

c:\jazz_buildspaces\test>dir
Directory of c:\jazz_buildspaces\test
12/17/2009 04:25 PM <DIR> .
12/17/2009 04:25 PM <DIR> ..
12/17/2009 04:25 PM <DIR> .jazz5
12/17/2009 04:25 PM <DIR> Attributes
12/17/2009 04:25 PM <DIR> Build
12/17/2009 04:25 PM <DIR> DragDrop

0 File(s) 0 bytes
6 Dir(s) 1,851,142,144 bytes free


This is what I had expected to see:

c:\jazz_buildspaces\scm_cmdline>dir
Directory of c:\jazz_buildspaces\scm_cmdline
12/17/2009 02:20 PM <DIR> .
12/17/2009 02:20 PM <DIR> ..
12/17/2009 02:20 PM <DIR> .jazz5
12/17/2009 02:20 PM <DIR> .metadata
12/17/2009 02:20 PM <DIR> Attributes
12/17/2009 02:20 PM <DIR> Build
12/17/2009 02:20 PM <DIR> DragDrop
12/17/2009 02:20 PM 210 .project
12/17/2009 02:20 PM 19 AMA.MA.snk
12/17/2009 02:20 PM 16 loadrules_build.txt

3 File(s) 245 bytes
7 Dir(s) 1,851,142,144 bytes free


Based on this test it looks like there is an issue with the Ant fetch of source code.

0 votes


Permanent link
Reposting the build.xml file with {} replacing <>.

{project name="sample" default="all"}
{!-- Typically, a "build" user is created and used here. --}
{property name="userId" value="build" /}
{property name="password" value="build" /}
{target name="all" depends="
fetchCode"}
{/target}
{target name="fetchCode"}
{mkdir dir="${root_bld_workspaces}/test" /}
{teamFetch repositoryAddress="${repositoryAddress}"
userId="${userId}"
password="${password}"
workspaceName="Build JKH CSharp WS"
buildResultUUID="${buildResultUUID}"
destination="${root_bld_workspaces}/test"
verbose="true" /}
{/target}
{taskdef name="linkPublisher"
classname="com.ibm.team.build.ant.task.LinkPublisherTask" /}
{taskdef name="teamFetch"
classname="com.ibm.team.build.ant.task.TeamFetchTask"}
{/taskdef}
{taskdef name="startBuildActivity"
classname="com.ibm.team.build.ant.task.StartBuildActivityTask" /}
{/project}

0 votes


Permanent link
Thanks for the info. I've filed 102186: SourceControlUtility doesn't load top-level files to investigate further.

Note: when posting XML snippets, check "Disabled HTML in this post" (also note that Preview loses that setting.)

0 votes


Permanent link
I've got version 2.0.0.2iFix2 and am experiencing this issue. Is there a public release with this fix in it?

0 votes


Permanent link
The fix is in 3.0 M4. The build system for 3.0 M4 should work fine with a 2.0.0.2 server (3.0 M5 has problems though).

A workaround is to specify (in the build definition editor's SCM page) a load rules file for the component with:
RootFolderName=/

0 votes

1–15 items
page 1of 1 pagesof 2 pages

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

Question asked: Dec 15 '09, 6:10 p.m.

Question was seen: 13,025 times

Last updated: Dec 15 '09, 6:10 p.m.

Confirmation Cancel Confirm