Bitzu

AZ-400 ยท Maintaining pipelines

Retention of artifacts and dependencies

Retention policies for runs, artifacts, logs and releases, pipeline artifact vs build artifact lifetime, retain-for-release, GitHub Actions artifact and log retention, feed retention.

Key points

  • Azure DevOps run retention: per project (Project settings, Pipelines, Settings); no per-pipeline rules.
  • Deleting a run removes logs, pipeline and build artifacts, symbols, test results, but not feed packages.
  • A run is kept if marked for indefinite retention, held by a release, or among recent runs.
  • Classic releases have their own settings.
  • Keep longer: copy to your own storage.
  • GitHub Actions: 90 days by default, adjustable.

Source: https://learn.microsoft.com/en-us/azure/devops/pipelines/policies/retention?view=azure-devops

Practice questions

Single choice

Where do you configure run retention for both YAML and classic build pipelines in Azure DevOps Services?

  1. In each pipeline's YAML under a retention: key
  2. In Project settings, Pipelines, Settings
  3. In the agent pool capabilities
  4. In the Azure Artifacts feed permissions
Show answer

Answer: B. In Project settings, Pipelines, Settings

Per-pipeline retention rules are no longer supported; run retention lives in Project settings under Pipelines, Settings. The other places do not control run retention.

Select all that apply

Which items are removed when Azure Pipelines deletes a run under the retention policy?

  1. Run logs
  2. Pipeline and build artifacts
  3. Test results
  4. Universal Packages in a feed
  5. Git commits built by the run
Show answer

Answer: A. Run logs, B. Pipeline and build artifacts, C. Test results

Logs, pipeline and build artifacts, and test results are deleted with the run. Run retention does not govern packages in Azure Artifacts feeds, and Git commits stay in the repository.

True or false

Pipeline run retention policies also delete the NuGet and npm packages stored in Azure Artifacts feeds.

Show answer

Answer: False

False. Run retention does not govern Universal Packages, NuGet, npm and other packages; feeds have their own retention settings.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More AZ-400 topics in this module