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

The location of Build Toolkit's component load rules

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.


0 votes

Comments

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

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.

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

1 vote


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

0 votes

Comments

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.

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.

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 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,020
× 562

Question asked: Oct 23 '13, 6:44 a.m.

Question was seen: 7,337 times

Last updated: Oct 23 '13, 9:06 p.m.

Confirmation Cancel Confirm