Chapter 10. Using Incremental and Chained Builds
When a Source-to-Image builder is used, the build phase is performed in a single step by the assemble script. One issue with this is that each build is distinct. This means that build artifacts generated by one build cannot be used for a subsequent build. As everything needs to be re-created each time, this can slow down build times.
Part of the reason it can be slow is that for each build it would be necessary to pull down third-party packages over the internet from a remote package repository. One way of speeding this up is to deploy a local caching proxy server through which downloads are routed. Downloading of the package will be sped up as the package can be provided by the cache, avoiding the need to download it from a remote package index each time.
Use of a local caching proxy server, though, will not eliminate the need to recompile a package that is only provided as source code, unless the cache also supports uploading of a precompiled package to the cache that the build process can use.
An alternative to using a local caching proxy server is to save build artifacts from a build in OpenShift and copy them across to subsequent builds so that they can be reused. In this chapter, you will learn how you can use incremental and chained builds to speed up build times by reusing the build artifacts of prior builds.
Faster Builds Using Caching
When you develop and deploy an application locally on your own computer system, you ...
Get Deploying to OpenShift now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.