Skip to content

Commit

Permalink
Add cache cleaning task for ML snapshot (elastic#37505)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rjernst authored Jan 20, 2019
1 parent 9b32f57 commit fc99eb3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions x-pack/plugin/ml/cpp-snapshot/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ task downloadMachineLearningSnapshot {
}
}

task cleanCache(type: Delete) {
delete "${projectDir}/.cache"
}

artifacts {
'default' file: snapshotZip, name: 'ml-cpp', type: 'zip', builtBy: downloadMachineLearningSnapshot
}

0 comments on commit fc99eb3

Please sign in to comment.