<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[the-doktor]]></title><description><![CDATA[A blog about DevOps, software development, nerdy stuff, and more.]]></description><link>https://blog.the-doktor.de</link><image><url>https://cdn.hashnode.com/res/hashnode/image/upload/v1728650867135/d1612215-9906-408c-8b55-4e31353a2e8a.png</url><title>the-doktor</title><link>https://blog.the-doktor.de</link></image><generator>RSS for Node</generator><lastBuildDate>Fri, 24 Apr 2026 22:50:35 GMT</lastBuildDate><atom:link href="https://blog.the-doktor.de/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Pipeline Retention Policies and How To Retain Pipline Runs]]></title><description><![CDATA[Why do pipeline runs disappear and how can they be retained? This is related to the “retention policies” (see illustration). Azure DevOps checks these policies to decide when a pipeline run and the associated artifacts are deleted and how many runs a...]]></description><link>https://blog.the-doktor.de/azure-devops-pipeline-retention-policies</link><guid isPermaLink="true">https://blog.the-doktor.de/azure-devops-pipeline-retention-policies</guid><category><![CDATA[azure-devops]]></category><category><![CDATA[Pipeline]]></category><dc:creator><![CDATA[Eike Hirdes]]></dc:creator><pubDate>Fri, 13 Sep 2024 14:58:35 GMT</pubDate><content:encoded><![CDATA[<p>Why do pipeline runs disappear and how can they be retained? This is related to the “retention policies” (see illustration). Azure DevOps checks these policies to decide when a pipeline run and the associated artifacts are deleted and how many runs are retained after the time has elapsed. These can be found under Project Settings -&gt; Pipelines -&gt; Settings.</p>
<p>However, there are ways to retain the results. On the one hand, this can be done <a target="_blank" href="https://learn.microsoft.com/en-us/azure/devops/pipelines/policies/retention?view=azure-devops&amp;#manually-set-retention-lease-on-pipeline-runs">directly from the web interface</a> for a selected run via "Retain" (see illustration). On the other hand, this can be automated via pipeline tasks. Microsoft provides <a target="_blank" href="https://learn.microsoft.com/en-us/azure/devops/pipelines/build/run-retention?view=azure-devops">examples as PowerShell, Bash and REST API tasks</a> for this purpose.</p>
<p><em>Note: Retained automatically, a run can only be held up to 731 days. If the results are needed for longer, they should be backed up, e.g. with the</em> <a target="_blank" href="https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/copy-files-v2"><em>CopyFiles Task</em></a><em>.</em></p>
<p>Furter information:</p>
<ul>
<li><p><a target="_blank" href="https://learn.microsoft.com/en-us/azure/devops/pipelines/policies/retention?view=azure-devops&amp;tabs=yaml">Set retention policies for builds, releases, and tests</a></p>
</li>
<li><p><a target="_blank" href="https://learn.microsoft.com/en-us/azure/devops/pipelines/build/run-retention?view=azure-devops">Pipeline Run Retention</a></p>
</li>
</ul>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1726235084889/8be363a2-37d7-4e68-be1c-c0dea453701e.png" alt class="image--center mx-auto" /></p>
<p><em>--- german | deutsch ---</em></p>
<p>Warum verschwinden Pipeline-Ergebnisse und wie lassen sie sich aufbewahren? Das hängt mit den sogenannten "Retention Policies" zusammen (siehe Abbildung). Anhand dieser entscheidet Azure DevOps, wann ein Pipeline-Run und die zugehörigen Artefakte gelöscht werden und wie viele Runs nach dem Ablauf der Zeit aufbewahrt werden. Diese finden sich unter Project Settings -&gt; Pipelines -&gt; Settings.</p>
<p>Es gibt jedoch Möglichkeiten, die Ergebnisse beizubehalten. Einerseits kann dies <a target="_blank" href="https://learn.microsoft.com/en-us/azure/devops/pipelines/policies/retention?view=azure-devops&amp;#manually-set-retention-lease-on-pipeline-runs">direkt in der Weboberfläche</a> für einen ausgewählten Run über "Retain" (siehe Abbildung) erfolgen. Zum anderen kann dies automatisiert über Pipeline Tasks erledigt werden. Hierfür stellt Microsoft <a target="_blank" href="https://learn.microsoft.com/en-us/azure/devops/pipelines/build/run-retention?view=azure-devops">Beispiele als PowerShell, Bash und REST API Tasks</a> zur Verfügung.</p>
<p><em>Hinweis: Automatisiert beibehalten wird der Run nur bis 731 vorgehalten. Falls die Ergebnisse länger benötigt werden, sollten diese gesichert werden, z.B. mit dem</em> <a target="_blank" href="https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/copy-files-v2"><em>CopyFiles Task</em></a><em>.</em></p>
<p>Weitere Informationen:</p>
<ul>
<li><p><a target="_blank" href="https://learn.microsoft.com/en-us/azure/devops/pipelines/policies/retention?view=azure-devops&amp;tabs=yaml">Set retention policies for builds, releases, and tests</a></p>
</li>
<li><p><a target="_blank" href="https://learn.microsoft.com/en-us/azure/devops/pipelines/build/run-retention?view=azure-devops">Pipeline Run Retention</a></p>
</li>
</ul>
]]></content:encoded></item></channel></rss>