Having a pipeline with a few steps that all use caches (gradle, gradlewrapper)
The caches are configured to only be updated when their config files (build.gradle, gradle-wrapper.properties) change.
The problem is that in every build step the build teardown does perform "compression" of the cache, even though it won't be updated.
That adds quite some time to my build.
here's a teardown of a single step:
Assembling contents of new cache 'gradle'
You already have a 'gradlewrapper' cache so we won't create it again
Cache "gradle: ~/.gradle/caches": Cache key d4b80d15320a9f8a8b5d1f2dbaf8f9db40b55f35faa037ab8df457ade969878b
Cache "gradle: ~/.gradle/caches": Compressing
Cache "gradle: ~/.gradle/caches": Compressed in 96 seconds
Cache "gradle: ~/.gradle/caches": Compressed cache size is 245.8 MiB over the 1 GiB upload limit, so the cache will not be uploaded.
Cache "gradlewrapper: ~/.gradle/wrapper": Skipping upload for existing cache
Searching for files matching artifact pattern app/build/reports/**
Artifact pattern app/build/reports/** matched 3 files with a total size of 603.6 KiB
Compressed files matching artifact pattern app/build/reports/** to 79.6 KiB in 0 seconds
Uploading artifact of 79.6 KiB
Successfully uploaded artifact in 0 seconds.
Searching for test report files in directories named [test-results, failsafe-reports, test-reports, TestResults, surefire-reports] down to a depth of 4
Finished scanning for test reports. Found 0 test report files.
Merged test suites, total number tests is 0, with 0 failures and 0 errors.