I backed a docker image with gradle, but whenever ...
# community-support
g
I backed a docker image with gradle, but whenever the CI run
./gradlew build
it keeps downloading the distro again, the structure seems to be fine
Copy code
$ cd ${GRADLE_USER_HOME}
$ find . | sed -e "s/[^-][^\/]*\// |/g" -e "s/|\([^ ]\)/|-\1/"
.
 |-gradle.properties
 |-init.d
 | |-elara.nexus.init.gradle.kts
 |-wrapper
 | |-dists
 | | |-gradle-8.12.1-bin
 | | | |-eumc4uhoysa37zql93vfjkxy0
 | | | | |-gradle-8.12.1
 | | | | | |-init.d
 | | | | | | |-readme.txt
 | | | | | |-bin
 | | | | | | |-gradle.bat
 | | | | | | |-gradle
 | | | | | |-NOTICE
 | | | | | |-LICENSE
 | | | | | |-lib
 | | | | | | |-native-platform-osx-aarch64-0.22-milestone-27.jar
 | | | | | | |-gradle-base-services-groovy-8.12.1.jar
 | | | | | | |-gradle-base-asm-8.12.1.jar
I also see in the logs
./gradlew
deletes the right directory
Copy code
$ ./gradlew build
Downloading <https://services.gradle.org/distributions/gradle-8.12.1-bin.zip>
.............10%.............20%.............30%.............40%.............50%.............60%.............70%.............80%.............90%.............100%
Deleting directory /home/user/.gradle/wrapper/dists/gradle-8.12.1-bin/eumc4uhoysa37zql93vfjkxy0/gradle-8.12.1
any idea why?
t
Any reason for using
./gradlew
vs.
gradle
? (fwiw, I use the https://hub.docker.com/_/gradle image in CI with
gradle
rather than
./gradlew
; and to make sure I use the same version, I run
gradle wrapper
and check whether it modified the
gradle/wrapper/
files)
👍 1
v
If the
gradle-8.12.1-bin.zip.ok
is missing, it is assumed the provisioning failed mit-unzip so the archive is got freshly, old try deleted, and freshly unzipped
👍 3
g
the
zip.ok
file was indeed the culprit
Any reason for using
./gradlew
vs.
gradle
?
this is the setup I inherited I just gave it a try to an official docker gradle image, but I had some issue. I'll probably investigate it further