Set Retention Policy at Pipeline-level

JFrog Pipelines Documentation

ft:sourceType
Paligo

Once Retention Policy is enabled at system-level, it can also be configured at at pipeline-level. For information about setting the values for pipeline-level Retention Policy, see Defining a Pipeline.

Just like Retention Policy at system-level, you can control the values of the number of days and minimum number of runs to keep at pipeline-level. These settings override the system-level Retention Policy, but pipeline-level policy values can only beequal to or lesser than the system-level configuration.

For example, if the system-level Retention Policy configuration is:

 retentionPolicy:
    enabled: true
    maxAgeDays: 90
    minRuns: 10

And the pipeline-level Retention Policy configuration is:

 retentionPolicy:
    maxAgeDays: 30
    minRuns: 5

Then Pipelines will discard Pipeline run data for runs that are older than 30 days. Pipelines, however, will also keep at least 5 pipeline runs data, even if they are older than 30 days (or even if they are older than system-level 90 days value).

Note

If you set the values of pipeline-level Retention Policy to greater than your system-level values, the Pipeline Source Sync will fail.

Example

pipelines:
 - name: example_pipeline_retention_policy
   configuration:
     retentionPolicy:
       maxAgeDays: 30
       minRuns: 5
   steps:
     - name: step_1
       type: Bash          
       execution:
         onExecute:
           - echo "Hello world"