It's all about the answers!

Ask a question

How to load/refresh only the specific components that are affected by new changes

Pavithra Kasturirangan (42955956) | asked Jan 08 '16, 1:22 a.m.
edited Jan 12 '16, 5:56 a.m.
 Hi All,

We have a setup with RTC build definition connected to Jenkins job for build.
  • We are trying to run component build at regular intervals. We have a workspace with, say, 100 components tagged with the build definition.
  • Build script has been written in such a way that when changes are delivered, then the build script will look into the changes and trigger build only for the affected components. The build logic works fine for us.
  • Before even the build trigger reads the Jenkins job and moves to the step to trigger the build script, from the log, we see that it proceeds to complete loading the whole workspace.

Say, if my actual change is only against one component, then what i expect is that the RTCbuild/Jenkins job to load ( or take time to refresh) only the specific component and move ahead with the build. Refreshing one component may take less than 30secs even. Instead, i see that the whole workspace is being refreshed although there are no real changes to more than one component.

Behavior is the same irrespective of whether we choose to "Delete directory before loading" or not.

I will not be able to control this behavior with "Load rules" or "Exclude" option as the workspace is common to all components for the build definition. At one instance, the build could be for Comp A and at another it could be for CompC. 

Having multiple build definitions specific to a component will also not work for us as we have large number of components.

Is there any setting that can remove the loading of all components for every build and save us some time from loading ?

5 answers

permanent link
Ralph Schoon (62.7k33643) | answered Jan 12 '16, 7:40 a.m.
Any available setting would have to be documented in the Jenkins Plugin's documentation, since we are talking about Jenkins and a Jenkins plugin here.

If you disagree with how the plugin loads, I would suggest to consider not using the automatic load at all and to put the load logic into your build logic or file an enhancement request. That way you have all the control.

I am not sure about the enhancement request process for that plugin. I would check on that plugin's page and see if there is a way to file enhancement requests.

The tab in the Jazz Build Engine also does only have very few ways to influence what gets loaded. Component load is not dynamic, but fixed in the build definition. If you delete the workspace and the load gets triggered, everything specified gets loaded. It is provided to make the normal use case relatively easy, but usually fails to address special cases, which basically means someone has to come up with their own logic. You could use the SCM commandline for loading in build scripts.

Pavithra Kasturirangan commented Jan 12 '16, 8:19 a.m.

Hi Ralph,

I really don't know if this behavior is seen only on Jenkins based build or standalone RTC build engine.

I haven't set any load rule explicitly on the build definition as the load rule can vary based on the changed component. 
When you have mentioned about command line, should i use RTC CLI on Execute Shell on Jenkins Job so that the loading happens as mentioned by CLI?

Ralph Schoon commented Jan 12 '16, 9:13 a.m.

Yes, I think you will have to use the RTC SCM CLI in your build scripts to do the loading. I don't know how you can communicate which components are changed but based on that you would load the components using the CLI.

permanent link
Pavithra Kasturirangan (42955956) | answered Jan 13 '16, 5:47 a.m.
 Hi Ralph,

My job in Jenkins is created as a 'freestyle project' and build definition in RTC is created based on the template of 'Hudson/Jenkins' with Jenkins job set to look at RTC build definition.

With this combination, when i select components to exclude in RTC build definition, then it loads correctly. 

When i mention components to exclude on the GUI, it works with no other change in Jenkins, which means that any property setting in RTC build definition should only help on dynamic selection.However, i don't find a way to mention this dynamically. 

The process doesn't look into Ant task or any instruction from Jenkins job before it loads the components. 

It is not possible to specify a load rule rule or components to exclude in Jenkins as a parameter.

Even if i write a script on Jenkins, job, the process comes to the execution of the script only after it completes the initial steps of refreshing all components.

I'm not sure if I'm missing any right setting here. 

Should i assume that with this combination of Jenkins based template and using RTC build toolkit in Jenkins, it is not possible to set the load rule dynamically ?

permanent link
Hareesh Jairaj (831838) | answered Jan 11 '17, 5:19 a.m.

Hello Pavitra,

Did you find solution for this scenario,I am trying to load single component in which changes took place. Thanks in advance.


permanent link
viswanath janakiraman (81124) | answered Jan 12 '17, 5:17 a.m.

Hello Pavithra ,

I can say in RTC 6.0.2 the dynamic load rule is possible by extension plugin. please check the below link for your reference.


permanent link
Lakshmi Narasimhan T V (4415) | answered Jul 31 '20, 6:08 a.m.
Please see for a similar request but for Build workspace configuration.

If you are using build definition configuration, then you can leverage optimized incremental load feature available in 7.0.1 release.

Your answer

Register or to post your answer.