jkube icon indicating copy to clipboard operation
jkube copied to clipboard

Cache buildpack builds in a local docker volume

Open rohanKanojia opened this issue 1 year ago • 0 comments

Component

JKube Kit

Task description

Description

Part of #439

Buildpack builds can involve downloading artifacts from multiple sources in a single build. I've even seen various intermittent failures due to network errors during pack build.

We should enable caching buildpack builds in a local docker volume so that subsequent builds are faster. This would provide much better development experience. Name of the local docker volume should be directly mapped to the project / container image name.

We can probably configure this behavior via the nocache configuration option that we already have at the moment. If user explicitly enables nocache, we won't cache buildpack build.

Expected Behavior

As a user using JKube to build container images leveraging buildpacks, I want to have faster subsequent builds by relying on the build cache, so that I can save time and avoid intermittent network errors.

Acceptance Criteria

Given:

  • User hasn't performed build and has disabled nocache option.
  • User has specified build strategy as buildpacks using jkube.build.strategy property / plugin configuration

When: User performs k8s:build

Then: BuildPackConfiguration cache is added by default during k8s:build

rohanKanojia avatar Nov 21 '23 15:11 rohanKanojia