Closed sschuberth closed 6 years ago
Hi @sschuberth , thanks for filing this issue! Although it does seem like the task should just skip as up-to-date, Jib builds work a bit differently from Docker builds in that the base image is not stored (only layers are cached). Therefore, Jib must at least check if the base image has changed via a request to its registry. We plan to potentially add caching of base images if they are specified via a digest so that in those cases the task could skip the base image check request.
Thanks for the clarification, I'll close this then for now!
Description of the issue:
I was accidentally running
./gradlew jibDockerBuild
two times in a row without making any modifications in between.Expected behavior:
I would expect this to be a no-op on the Gradle-level, marking the
jibDockerBuild
task to beUP-TO-DATE
.Steps to reproduce:
Check out e.g. https://github.com/heremaps/oss-review-toolkit/tree/jib and run
and again
Note that while the second run was significantly faster (probably because the result was cached on the Docker-level), that 1 task was still executed and only 67 were up-to-date.
Environment:
Ubuntu 18.04
jib-gradle-plugin
Configuration:Additional Information:
Docs about how Gradle's up-to-date checks work:
https://docs.gradle.org/current/userguide/more_about_tasks.html#sec:how_does_it_work