It's all about the answers!

Ask a question

Question about the incremental build


Jayson Dai (333) | asked Feb 15 '13, 10:38 a.m.
edited Feb 15 '13, 10:50 a.m.
I am trying to set up the incremental build for our team, using RTC 3.0.1. 

I use the following settings in the Build definition : 
- Delete directory before loading : UNCHECKED 
- Accept latest changes ... CHECKED 
- Build only if there are changes .. CHECKED 
The build is automatically scheduled on a regular basis. 

I have a problem in the following scenario:

1) I make a mistake in the build definition
2) The scheduled build fails because of the mistake
3) I fixed the problem in the build definition

But now that the built doesn't start on the scheduled time since there is no change in the source code. 

My question is that if there is way to force the build start if the previous build fails? For example, can I make my build workspace go back to the previous state (before the failed build)? 

This is useful since for example, I want a "changed file list" between my current build and the last successful team build, so I can parse the "changed file list" to determine what target(s) I need to rebuild. 

One answer



permanent link
Tim Mok (6.6k38) | answered Feb 15 '13, 10:57 a.m.
JAZZ DEVELOPER
edited Feb 15 '13, 10:59 a.m.
The build workspace isn't something you should be manually changing unless you want to change where it accepts changes for the build. Every time a build runs, the build workspace will change if it's accepting new changes. This is the reason a snapshot is created during a build. You can use snapshots to compare the builds to see the differences.

To answer your question, the build won't restart if there weren't any changes since the last one. Unless there's an intermittent failure, I wouldn't expect a rerun to have any chance of passing. You'll have to manually request a build to rebuild with the same content.

Comments
Jayson Dai commented Feb 15 '13, 11:11 a.m. | edited Feb 15 '13, 11:42 a.m.

Thanks Tim for your quick response. I agree with you that the build workspace should not be manually changed. 


However, do you have any suggestion on how I resolve the following issue:  To get a "changed file list" between my current build and the last successful team build, so I can parse the "changed file list" to determine what target(s) I need to rebuild? Consider the following scenario:
1) Changes A and B are delivered
2) Build fails because of errors in the new code
3) Changes C and D are delivered, code error is fixed
4) Next scheduled build starts. 

Is there a way I can get the complete change list (A, B, C and D) so I can calculate the targets I need to build? 

Thanks,
Jay


Tim Mok commented Feb 15 '13, 11:43 a.m.
JAZZ DEVELOPER

You can compare builds by selecting them in the build view and invoking a compare on them. This will use the snapshots to compare the differences. This doesn't work on personal builds because snapshots aren't created for personal builds.


Jayson Dai commented Feb 15 '13, 12:03 p.m.

 But this won't work in my automated build. I guess I can do that by keeping a record of the snapshot of the last success build, and use that to generate the change log. I really wish RTC can provide a way to do that. 


Tim Mok commented Feb 15 '13, 2:26 p.m.
JAZZ DEVELOPER

Please open an enhancement if there's a build feature that you need.


Spencer Murata commented Feb 15 '13, 3:48 p.m.
FORUM MODERATOR / JAZZ DEVELOPER

If you are having to target various parts of the code to be built, you probably should break down the build into smaller parts for the CI build.  A CI build should not be calculating what to build, it should be a go or no go.  Generally though JBE does not do much on its own to persist data between builds.


~Spencer

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.