It's all about the answers!

Ask a question

The location of Build Toolkit's component load rules


dennys hsieh (2911519) | asked Oct 23 '13, 6:44 a.m.
I can use build toolkit to get specific directory by component load rules.

My question is, could I put the load rule file in other place instead of RTC?
Because it's strange, when I want to change load rules, I need to check-in/out file in RTC and it's not convenient.



Comments
Geoffrey Clemm commented Oct 23 '13, 10:23 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Just for interest's sake, where did you want to put the load rule file other than in the build workspace? 


dennys hsieh commented Oct 23 '13, 10:34 a.m.

We use Jenkins to get code from Jazz RTC and build it in Jenkins, therefore, we want to set the load rules in Jenkins.


In ClearCase, Jenkins can set load rule in the plugin.


Geoffrey Clemm commented Oct 23 '13, 9:06 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

One important reason to store the load rules file in an RTC component is that this makes the load rule file easily accessible for developers when loading their IDE workspaces, and it is usually important to make it easy for a developer to load the files the same way that the build does.

2 answers



permanent link
Scott Cowan (966310) | answered Oct 23 '13, 9:43 a.m.
JAZZ DEVELOPER
edited Oct 23 '13, 9:49 a.m.
Hi Dennys,

Even the updated docs for v4.0.4 indicate "You must create the load rules file in the build workspace."

http://pic.dhe.ibm.com/infocenter/clmhelp/v4r0m4/topic/com.ibm.team.build.doc/topics/r_scm_build_loadrules.html

I'm sure the intent is so that any JBE can find the file.  However, it is also a best practice to generate the load rules file as described here,

http://pic.dhe.ibm.com/infocenter/clmhelp/v4r0m4/topic/com.ibm.team.scm.doc/topics/t_scm_create_load_rule.html

And the reason is that you can be more confident the load rules file is valid it you have a clean building sandbox.

Scott

permanent link
Heather Fraser-Dube (4512) | answered Oct 23 '13, 10:49 a.m.
JAZZ DEVELOPER
The JBE does expect it to be in the build workspace. If you take over the loading of the workspace you could specify the loadrule file as a file on disk. This would mean using the teamAccept ant task to accept the changes into your build workspace, but rather than using the teamFetch ant task to load the workspace, use the CLI instead (example: scm load -r yourRepository -f -L yourBuilds.loadrule "Your Build Workspace"). See https://jazz.net/library/article/1015 for details on load rules themselves.

If you go this route, you will have to propagate any changes you make to a load rule to all the copies of the load rule. Assuming that you have more than 1 machine running builds and the load rule file will be on each machine.

Comments
Heather Fraser-Dube commented Oct 23 '13, 10:55 a.m.
JAZZ DEVELOPER

I see from above you are using Jenkins, If you are using the Jenkins plugin, then you are restricted to having the load rule within the build workspace.


dennys hsieh commented Oct 23 '13, 11:02 a.m.

Thanks, we know how to use CLI (scm load, scm accept, ...). Just because CLI is not easy to integrate to Jenkins and we're trying to integrate them through this plugin https://wiki.jenkins-ci.org/display/JENKINS/Team+Concert+Plugin


And this plugin depends on Build toolkit then we're studying it now.


Heather Fraser-Dube commented Oct 23 '13, 11:33 a.m.
JAZZ DEVELOPER

If you are using the plugin and want to use load rules, you will need to set up a build definition and configure it to reference the load rule(s) in the build workspace. The Jenkins job will need to be configured to use the build definition.

The other advantages to using a build definition are
- ability to start builds from within RTC (means you can do a build on a different workspace)
- build results are in RTC. Useful if you want to compare two different builds to see all the differences between them.
- control over whether to clear the directory prior to loading and whether to exclude any components from being loaded.

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.