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 |
12 answers
Geoffrey Clemm (30.1k●3●30●35)
| answered Dec 15 '09, 9:23 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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 |
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 Just wondering... why not using SCM CLI (you said from command line is working) from your Build script? |
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.
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 |
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.
|
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: c:\jazz_workspaces\root_test>scm load _dmDyIOkaEd69vLBSXkwbcQ -r https://localhost:9443/jazz -u jeffhans -P jeffhans -d . 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 19 AMAT.MAS.snk 12/17/2009 10:44 AM <DIR> Attributes 12/17/2009 10:44 AM <DIR> DragDrop 3 File(s) 245 bytes 6 Dir(s) 2,092,625,920 bytes free 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 |
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 Using the Ant build without the Jazz engine I successfully created a build workspace <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. |
{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} |
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.) |
I've got version 2.0.0.2iFix2 and am experiencing this issue. Is there a public release with this fix in it?
|
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=/ |
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.