Reduce how often CI builds download Gradle
wilkinsona opened this issue · 4 comments
Judging by some recent CI failures due to the download of https://services.gradle.org/distributions/gradle-7.6-bin.zip timing out, CI builds are downloading Gradle more often than they should. We could try:
- Caching the
.gradle
directory across runs - Pre-installing Gradle in the CI container image
I think we already call this function to setup a .gradle
symlink and then our task should use that as a cache.
Oddly, if I fly hijack
I see that the gradle
folder isn't a symlink. It's also empty.
Sorry for the noise, I thought this was a Spring Boot issue 🤦.
It turns out we do have a similar issue with Spring Boot which is caused by us creating a .gradle
folder in the CI image. This stops the symlink from being created. I think AOT tests has the same problem looking at these lines
Thanks, @philwebb. That does indeed look like the same problem.