Load rule was ignored during the build
Samuel Wu (21●4●2)
| asked May 03 '16, 9:59 a.m.
edited Jun 21 '16, 10:52 a.m. by David Lafreniere (4.8k●7)
I'm running RTC client 5.0.2. During the build, I want to re-fetch a project for latest update. A load rule was created and called by following Ant script.
<teamFetch repositoryAddress="${repositoryAddress}" userId="${userId}" passwordFile="${passwordFile}" workspaceUUID="${team.scm.workspaceUUID}" destination="${user.dir}/../temp" verbose="true" loadRulesByPath="build.bldtools/project1/load.rules/history.loadrule"/> But the whole workspace was extracted from RTC regardless of history.loadrule. I wonder whether I missed something. |
Accepted answer
By default, a build will load all components in the build workspace. A load rule in a build can be used to specify 'what' (files or folders) to load and 'how' to load them (path location or alternate name). If you do not want to load certain components, you would need to put them in either the 'componentsToExcludeByUUID' or 'componentsToExcludeByName' Ant property.
Michael Valenta selected this answer as the correct answer
Comments
Samuel Wu
commented Jun 21 '16, 3:12 p.m.
Thank you, David, for the response. But there are so many components and projects in the workspace. It would be a maintenance nightmare to keep excluding the new components as they are created.
David Lafreniere
commented Jun 22 '16, 10:20 a.m.
| edited Jun 22 '16, 10:21 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
The TeamFetchTask does support those Ant properties (although only one can be provided). They let the build know where to find the load rule file(s) (which was traditionally one per component, to indicate what to load in each component and how). The original design of the build workspace was to load everything in that build workspace and 'build' it.
<see the continuation comment below>
David Lafreniere
commented Jun 22 '16, 10:21 a.m.
| edited Jun 22 '16, 10:24 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
If components are never to be built, you could avoid having them in the build workspace all together. You would need to add a scoped flow target so that the components are not re-accepted into the build workspace.
You can do this by following these steps:
-open the workspace editor for the build workspace
-select the stream in the Flow Targets section
-click Edit...
-choose 'Flow only components checked below' and check the components you want to include.
If you need to keep the components in the build workspace (but never want to load them), you would have to use the 'components to exclude' list.
I agree it would be nice if this area was improved. For some more background, please see comment 5 and comment 7 in Load workspace from load rules file behaves differently when performed by a build (371621)
Well, our build runs quite a while. Once the build starts, it takes a snapshot of the workspace and run the build with it. But something may changed during the build which we want to pick up. So we want to use this loadrule to reload a specific project to get the latest content during the build. Since there are so many components in the workspace and the containing project of the project has many other projects, the "components to exclude" list doesn't work well for us.
|
One other answer
https://jazz.net/forum/questions/19387/choosing-which-components-to-load-during-an-rtc-build - might be helpful for your scenario.
Thanks, Sridevi Comments
Samuel Wu
commented Jun 22 '16, 9:29 a.m.
Thank you, Sridevi, for the information. My scenario is slightly different that I need to fetch the artifacts through teamfetch ant task. There is no GUI access.
|
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.