TL;DR; How to I exclude directory (mounted by docker if this is of any relevance and not subdirectory of: ${bamboo.build.working.directory}) from being cleaned when "Clean working directory after each build" is checked.
Hi,
I have a big project (1,2 mln lines of C++ code) that I obviously require pull request in order to add code to develop and main branches.
One of (obvious) requirements is that code compiles. Compilation is happening inside docker container with following mounts (not my idea, the compilation script has some of those hardcoded and I can not do anything about it):
${bamboo.build.working.directory} -> /opt/src
${bamboo.build.working.directory}/results -> /opt/results
In order to speed up the compilation we tested usage of ccache and it works great. Compilation time down from around 40 minutes to around 4 minutes.
So the idea was to mount:
/home/ccache -> /home/ccache
so that each docker will have access to that folder and cache will be shared.
Everything works OK as long as option "Clean working directory after each build" for the build job is unchecked.
Now we want this option checked and ${bamboo.build.working.directory} cleaned after the build since we are talking 2+GB. Given all the other builds and branches ... there is a limited NVMe storage for the builders ...
My understanding was that "Clean working directory after each build" will clean only ${bamboo.build.working.directory} not ALL directories mounted by docker.
I really need to exclude /home/ccache from the clean.
How do I do that?