Remove older cache from harness pipeline
pending feedback
C
Competitive Pike
Hi,
As we are moving from bitbucket pipeline to harness, in bitbucket we have an option to remove the older cache from the pipeline.
In Harness pipeline also we want to remove older cache. We have enabled our cache intelligence in harness pipeline build stage. Now we want to remove older cache from harness pipeline. Please guide us on this
Log In
s
shivkumar.loka
pending feedback
s
shivkumar.loka
Hey Dipayan Ganguly,
Thank you for reaching out. We use this channel primarily for feature requests. For future support, please reach out to your Harness Support team for quicker resolution.
You can delete older cache using Cache Intelligence API in the following way:
curl --location --request DELETE 'https://app.harness.io/gateway/ci/cache?accountIdentifier=$YOUR_HARNESS_ACCOUNT_ID&path=/path/to/deleted/directory' \
--header 'Accept: application/json' \
--header 'X-API-KEY: $API_KEY'
For further information on Cache Intelligence like its retention policy or API access, please refer to the documentation here: https://developer.harness.io/docs/continuous-integration/use-ci/caching-ci-data/cache-intelligence/
Thank you
Regards
Shivkumar Loka
Harness Product Team