It's all about the answers!

Ask a question

RTC Build Deleting Destination Folder Files


Randy Tan (21155) | asked May 07 '12, 5:17 a.m.
Hi,

I am trying to run an RTC build on a directory that contains existing files and directories. However, those files and directories that are not in the RTC workspace will be deleted. Is there a way to retain the existing files and directories while only replacing those files that are in the workspace?

What is this following setting used for:
"team.scm.deleteDestinationBeforeFetch"="false"

Thanks in advance.

Regards,
Randy

5 answers



permanent link
Ralph Schoon (63.6k33646) | answered May 07 '12, 6:33 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Randy,

if you uncheck "delete directory for loading" on the Jazz SCM page of the build definition (which corresponds to the "team.scm.deleteDestinationBeforeFetch"="false" setting in your post the fetch folder will not be deleted and files will remain in the folder. This way you can have files and other folders in your fetch location and prevent them from being deleted. Please note, that files in the eclipse project folders you are loading will still be deleted. You can only keep files that don't overlap with what you are loading.

Other than that, the best option I have seen if you want to work with files that have been loaded previously and that you don't always reload is to have them in a different fetch location and reference them.

permanent link
Randy Tan (21155) | answered May 07 '12, 7:33 a.m.
Hi Ralph,

Thanks for the quick reply.

Correct me if I am wrong, could it be that the files and directories from the directories have been deleted because the directory that has been loaded from RTC does not contain them and hence they get deleted?

For instance, my comp A has directories A1, A2 and A3, and files within them. In the target/load directory, existingly there are directories A1, A2, A3 and A4. Also, in A1, there is file B and subdirectory B1 that is not in comp A in RTC. When I run the build, A4 still exists, but file B and subdirectory B1 will be deleted. Would it be because the directory A1 does not contain those artifacts in RTC?

How can I overcome that? I have already uncheck "delete directory for loading".

Thanks.

Regards,
Randy

permanent link
Ralph Schoon (63.6k33646) | answered May 07 '12, 8:19 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Hi Randy,

as per my observation. If you have A1, A2, A3 in the component and A4 in the load directory Loading A1, A2, A3 will keep A4 (no overlap).

If you have A1/B1 and a file b in B1 then B1, its files and subfolders will be deleted (overlap) and B1 not in SCM.

I don't think you can change that behavior. I also think it makes sense. You could never reproduce or trust a build otherwise. You would have different behavior on different build machines and all kinds of other problems.

What files do you want to preserve and why? Can you check them in? If not, why is that a problem? Have you looked into the money that matters example? It has some small binaries checked into the build component.

permanent link
Randy Tan (21155) | answered May 07 '12, 9:11 a.m.
Hey Ralph,

The issue is that the log folder happens to be in one of the directories and there is no point in checking the log files in.

Thanks anyway. You have been a great help.

Cheers,
Randy

permanent link
Ralph Schoon (63.6k33646) | answered May 07 '12, 9:27 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Hi Randy,

what about using an Ant build task to publish/upload the log file to the build result?
As an alternative you could consider to move the log file(s) to a different location that does not get deleted. If you configure your build to have a unique folder foreach build, all results remain.

Here are some articles I wrote because of related questions. Maybe some of the ideas apply:

https://jazz.net/library/article/797
https://jazz.net/library/article/807

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.