Retention of builds
When you run a pipeline, Azure DevOps logs each step's execution and stores the final artifacts and tests for each run.
Azure DevOps has a default retention policy for pipeline execution of 30 days. You can change these default values by going to Project settings | Pipelines | Settings:
Figure 4.39 – Pipeline retention policy
You can also use the Copy files task to store your build and artifacts data in external storage so that you can preserve them for longer than what's specified in the retention policy:
Figure 4.40 – Copy files task
The YAML definition for this task is as follows:
- task: CopyFiles@2 displayName: 'Copy files to shared network' inputs: SourceFolder: '$(Build.SourcesDirectory)' Contents: '**' TargetFolder...