Open casmer opened 3 years ago
Good call - you can reuse the exact same image when you carefully don't touch anything, but the moment something gets shifted or a base image updates, you're right, it can take a really long time to rebuild, and not necessarily reproduce the results.
There are a few ways we could approach improving the experience, but I think that definitely custom tags for images to reuse instead of running specific steps would be a great way to go.
This would shave off about 15 minutes from my build... especially in the docker-in-docker case where caching becomes more complicated.
If someone can post a general outline of how to accomplish this I can try to tackle it next week.
A reasonable-sounding first-pass:
--use-build-image TAG
Platform.sysroot_image_tag
- maybe as a Platform.override_sysroot_image_tag(tag)
method "gather_rosdeps"
and "sysroot"
to stages_skip
in ros_cross_compile.py
- so that those steps are not run, and we just use the provided tag
Description
There is no way to specify and save the docker image created for a build to avoid having to redownload and setup the build environment. This also means that if updates occur to the base image and packages in the target image they will get applied not allowing one to build exactly what they build on a particular date.
Completion Criteria
Provide command line switches to do the following:
Testing Notes / Suggestions
create a build environment and output a build, use the cached environment to build an identical build.