<?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[Retention Policies for PR Builds]]></title><description><![CDATA[<p dir="auto">Buildmaster,<br />
In another post I asked about the best way to set up builds off PRs (mainly for the purpose of verifying they build before allowing them to be merged). The result of that ticket was that the build would be created without a release if it was generated off a PR.  The regular builds would be done on a release as usual. This solves the one issue I was going for which is to make it clear what type of build one was if you were looking at it but it doesn't solve the clean up.</p>
<p dir="auto">I realize I could set up a build specific retention policy but in this case there isn't really any options that make sense.  Once the PR and/or branch is gone there isn't really a point to keeping the build around any longer.  In my opinion these PRs/Branches should be short lived and so should the builds but my company (at least at this time) may not run things in a way that would make that true which makes the cleanup that much more important to get right.</p>
<p dir="auto">You have a the ability to define scheduled tasks and I thought this would be a great way to write a custom cleanup script.  Unfortunately when you run a script from the scheduled tasks that doesn't run in the context of a release/build it becomes quite difficult to interact with the system on the release/build's behalf.</p>
<p dir="auto">I'm curious (since I'm a .NET developer) if the best option would be to write an extension in this case.  I'm currently reading documentation on that.  I also played around with making rest calls to buildmaster but I have to admit it seems odd to make calls from buildmaster to exit buildmaster and come back externally to get information to use within buildmaster.  Even sounds confusion when you write out <img src="https://forums.inedo.com/assets/plugins/nodebb-plugin-emoji/emoji/android/1f923.png?v=6a0c1edef1b" class="not-responsive emoji emoji-android emoji--rolling_on_the_floor_laughing" style="height:23px;width:auto;vertical-align:middle" title=":rolling_on_the_floor_laughing:" alt="🤣" />. If I were to write an extension it would probably be a repository monitor as that would likely be the most efficient way to handle it.  I actually originally thought I could the repository monitor feature that was built in but it doesn't have an option to monitor when PRs are merged/deleted.  Hopefully that is something I can figure out how to write in an extension.</p>
<p dir="auto">If you have other thoughts I'd appreciate it.</p>
<p dir="auto">Thank you,<br />
Brandon</p>
]]></description><link>https://forums.inedo.com/topic/5809/retention-policies-for-pr-builds</link><generator>RSS for Node</generator><lastBuildDate>Mon, 10 Aug 2026 09:12:56 GMT</lastBuildDate><atom:link href="https://forums.inedo.com/topic/5809.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 06 Aug 2026 21:13:20 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Retention Policies for PR Builds on Fri, 07 Aug 2026 19:53:49 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/brandon_owensby_2976" aria-label="Profile: brandon_owensby_2976">@<bdi>brandon_owensby_2976</bdi></a> I definitely do not recommend it, but if you are intent on creating something that automatically promotes feature branch builds to a "rejected" stage, you could code a custom <a href="https://sdkdocs.inedo.com/sdk/inedosdk/Inedo.Extensibility.PromotionRequirements" rel="nofollow ugc">PromotionRequirements</a>.</p>
<p dir="auto">You'd be much better doing something on the GitHub side that promotes a build using the API, however.</p>
]]></description><link>https://forums.inedo.com/post/19927</link><guid isPermaLink="true">https://forums.inedo.com/post/19927</guid><dc:creator><![CDATA[dean-houston]]></dc:creator><pubDate>Fri, 07 Aug 2026 19:53:49 GMT</pubDate></item><item><title><![CDATA[Reply to Retention Policies for PR Builds on Fri, 07 Aug 2026 19:51:09 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/user/brandon_owensby_2976" aria-label="Profile: brandon_owensby_2976">@<bdi>brandon_owensby_2976</bdi></a> ,</p>
<p dir="auto">While it's technically possible to create a custom repository monitor (see the <a href="https://github.com/Inedo/inedox-subversion/tree/master/Subversion/InedoExtension/RepositoryMonitors" rel="nofollow ugc">Subversion one</a>), I'm not sure if I'd recommend it for this use case.</p>
<p dir="auto">Did you see our guidance here on build clean-up?</p>
<p dir="auto"><a href="https://docs.inedo.com/docs/buildmaster/builds-continuous-integration/buildmaster-ci-git-workflows/buildmaster-git-feature-branches#cleaning-up-feature-branch-builds-with-retention-rules" rel="nofollow ugc">https://docs.inedo.com/docs/buildmaster/builds-continuous-integration/buildmaster-ci-git-workflows/buildmaster-git-feature-branches#cleaning-up-feature-branch-builds-with-retention-rules</a></p>
<p dir="auto">In a feature branch pipeline, a build should still be promoted to a final stage ("merged" or something), and once that happens it's status can be set to Rejected. So, instead of worrying about whether the PR is merged/deleted, just delete rejected builds after X days.</p>
<p dir="auto">-- Dean</p>
]]></description><link>https://forums.inedo.com/post/19926</link><guid isPermaLink="true">https://forums.inedo.com/post/19926</guid><dc:creator><![CDATA[dean-houston]]></dc:creator><pubDate>Fri, 07 Aug 2026 19:51:09 GMT</pubDate></item></channel></rss>