Search code examples
jfrog-pipelines

is there a function call that can be used to clean up run artifacts in Jfrog pipelines


I am using the utility function add_run_files and want to remove them after the run completes. How do I do this

I have gone through this documentation


Solution

  • You can set retention policy in your yml like:

    pipelines:
      - name: sample_pipeline_retention_policy
        configuration:
          retentionPolicy:
            maxAgeDays: 10
            minRuns: 5
    

    All the data associated with runs exceeding the maxAgeDays will be deleted, including any storage in artifactory. Refer to this doc for more info