Skip to content

Commit 0254161

Browse files
authored
Clean Maven cache in Azure pipelines (#12028)
Signed-off-by: Jakub Scholz <www@scholzj.com>
1 parent bc4a4dc commit 0254161

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
steps:
22
- task: Cache@2
33
inputs:
4-
key: 'maven-cache | $(System.JobName) | **/pom.xml'
4+
# The first key is used to clean the cache after some time to avoid it getting bigger and bigger
5+
# Once the cache gets too big, try to bump it to for example `summer-2027`
6+
key: 'autumn-2025 | maven-cache | $(System.JobName) | **/pom.xml'
57
restoreKeys: |
6-
maven-cache | $(System.JobName)
7-
maven-cache
8+
autumn-2025 | maven-cache | $(System.JobName)
9+
autumn-2025 | maven-cache
810
path: $(HOME)/.m2/repository
911
displayName: Maven cache

0 commit comments

Comments
 (0)