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

Load rule was ignored during the build

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.

0 votes


Accepted answer

Permanent link
 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

0 votes

Comments

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.
Based on the following doc, loadRulesByPath and loadRulesByUUID should be supported.
http://www.ibm.com/support/knowledgecenter/SSYMRC_6.0.2/com.ibm.team.build.doc/topics/r_teamfetch.html

Based on the following doc, loadRulesByPath and loadRulesByUUID should be supported. 
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>

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.
If I take it correctly, loadrule is not supported in the teamfetch ant task yet (you may want the doc to be updated).  I wonder whether there is a solution for my scenario.


One other answer

Permanent link
https://jazz.net/forum/questions/19387/choosing-which-components-to-load-during-an-rtc-build - might be helpful for your scenario.

Thanks,
Sridevi

0 votes

Comments

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

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
× 12,017
× 1,202
× 562

Question asked: May 03 '16, 9:59 a.m.

Question was seen: 3,649 times

Last updated: Jun 22 '16, 4:57 p.m.

Confirmation Cancel Confirm