TSR
TSR

Reputation: 20607

How to delete an Azure Pipeline cache without changing cache key

I have a task that creates a cache

- task: Cache@2
  inputs:
    key: 'sonarCache'
    path: $(SONAR_CACHE)
    cacheHitVar: CACHE_RESTORED
  displayName: Cache Sonar packages

However, the cache got corrupted. So how do I run this pipeline while telling it to ignore any existing cache ?

For some reason, I cannot change the cache key sonarCache

Upvotes: 14

Views: 10206

Answers (2)

tibtof
tibtof

Reputation: 7967

There's currently no way to do this. Here is what the documentation says: enter image description here

Upvotes: 6

Xiang ZHU
Xiang ZHU

Reputation: 436

maybe failing the pipeline once will invalidate the existing cache

Upvotes: -1

Related Questions