New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build cache for staging #688
Comments
I got a branch that proves that CACHE_IMAGE is working: https://github.com/epinio/epinio/tree/688-cache-image Managing the generated image though, may be tricky: https://betterprogramming.pub/cleanup-your-docker-registry-ef0527673e3a The various cache images may start taking up too much space in the registry and there is no easy way to inspect what is going on or do some cleanup. It is probably easier to create and use a persistent volume claim as described here: https://github.com/tektoncd/pipeline/blob/main/docs/workspaces.md#persistentvolumeclaim We can delete that PVC when the application gets deleted. |
I updated the branch to use a PVC as a Tekton workspace for cache instead of Then I tried to use the same PVC, both for the source and the cache but that results in another error during staging:
I guess that's because it finds the sources already in place (since the existing PVC is not automatically deleted). Not sure what the right solution is yet. |
I created a draft PR (#701) but I want to read more on what the limitation is that doesn't allow us to have 2 different PVCs, one for the "source" tekton workspace and one for the "cache". Being different PVCs means we would have the option to create a different PVC for each "upload" when we get to #699 while still using the same "cache" PVC on every build of the same app. Otherwise we would have to handle the various "uploads" as directories on that PVC. That's only if we we want to have more versions of the code around (e.g. keep the old code until the new code successfully stages). |
The buildpack tekton task supports the CACHE_IMAGE and "cache workspace" settings to cache builds artifacts so that subsequent pushes are faster. Right now, pushing Rails or Wordpress on Epinio is equally slow every time because we don't use that. We should try to use one of the settings to speed things up.
Acceptance Criteria
The text was updated successfully, but these errors were encountered: