Skip to content
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

[gradle] Allow programatically setting base layer cache directory #1238

Closed
anuraaga opened this issue Nov 10, 2018 · 3 comments
Closed

[gradle] Allow programatically setting base layer cache directory #1238

anuraaga opened this issue Nov 10, 2018 · 3 comments
Assignees
Milestone

Comments

@anuraaga
Copy link
Contributor

Description of the issue: It would be convenient to be able to set the base layer cache directory programatically, for example to set it to project.getGradle().getGradleUserHomeDir() to keep it together with other gradle caches if desired.

Expected behavior: Currently, it seems to only be possible to either say yes/no to project-level cache, or use the environment variable XDG_CACHE_HOME. It is often difficult to set an environment variable programatically or in a way that allows reproducible builds (e.g. applies to both CI and dev machines).

Environment: gradle-jib-plugin

@coollog coollog added this to the v1.0.0 milestone Nov 19, 2018
@coollog
Copy link
Contributor

coollog commented Nov 20, 2018

Hi @anuraaga , thanks for the suggestion! We'll consider adding this since it does enable better control over caches across multiple machines. However, one thing we do wish to avoid is to enable bad practices like placing full paths in a pom.xml where the full paths are specific to a single machine and not portable across machines.

@coollog
Copy link
Contributor

coollog commented Nov 27, 2018

We may wish to also allow changing the application layers cache for users who wish to clean upon each build but not always clear the jib-cache.

@coollog
Copy link
Contributor

coollog commented Dec 19, 2018

Hi @anuraaga , we released v1.0.0-rc1 with the jib.baseImageCache and jib.applicationCache system properties for setting these two caches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants