Add cache cleaning task for ML snapshot (#37505)

The ML subproject of xpack has a cache for the cpp artifact snapshots
which is checked on each build. The cache is outside of the build dir so
that it is not wiped on a typical clean, as the artifacts can be large
and do not change often. This commit adds a cleanCache task which will
wipe the cache dir, as over time the size of the directory can become
bloated.
This commit is contained in:
Ryan Ernst 2019-01-19 16:16:58 -08:00 committed by GitHub
parent 9b32f57cf1
commit fc99eb3e65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -46,6 +46,10 @@ task downloadMachineLearningSnapshot {
}
}
task cleanCache(type: Delete) {
delete "${projectDir}/.cache"
}
artifacts {
'default' file: snapshotZip, name: 'ml-cpp', type: 'zip', builtBy: downloadMachineLearningSnapshot
}