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

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

 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 ?

0 votes



5 answers

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

0 votes

Comments

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?

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

0 votes


Permanent link

Hello Pavitra,

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

Regards,
Harish.

0 votes


Permanent link

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.



cheers 

0 votes


Permanent link
Hi
Please see https://jazz.net/forum/questions/270655/load-workspace-with-changed-components-only#270661 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.

0 votes

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

Question asked: Jan 08 '16, 1:22 a.m.

Question was seen: 5,250 times

Last updated: Jul 31 '20, 6:08 a.m.

Confirmation Cancel Confirm