Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    How do I configure a retention rule that ensures that there is at least n versions of every package?

    Scheduled Pinned Locked Moved Support
    progetcleanup
    4 Posts 2 Posters 23 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ? This user is from outside of this forum
      Guest
      last edited by

      I am trying to configure a ProGet retention policy on a deployment package feed (used by Octopus Deploy). I am trying to set up a set of rules so that old or unused packages are cleaned but. That all works ok, but there is an additional requirement: I need to ensure that there are always at least n versions of a given package.

      The scenario is when you have a deployment package for a project that is fairly static. In this case, the package won't have been downloaded for perhaps many months, but if it gets cleaned up then we are kind of hosed when we need to add new servers, deploy again, etc.

      So what I want to build is a rule to delete packages older than X days that haven't been downloaded much, but make sure every package still has n versions. Is this possible, and if so, how?

      Thanks!

      Product: ProGet
      Version: 4.7.11

      1 Reply Last reply Reply Quote 0
      • benB Offline
        ben inedo-engineer
        last edited by

        Hello Erick,

        All of the conditions set in the retention rule must be met for the package to be deleted, so setting "delete old versions except the last n versions" and "delete unused versions not requested in the last X days" on the same rule will do what you want.

        1 Reply Last reply Reply Quote 0
        • ? This user is from outside of this forum
          Guest
          last edited by

          Thanks, that does make sense.

          For whatever reason, the documentation on this feature is a little bit confusing. I think it is because you can have multiple retention rules, and multiple conditions within each role. Does a package get excluded for cleanup if it matches more than one rule (as opposed to conditions in the rule)? Or does it need to match all rules?

          The answers are likely in the docs, but a few of us here read the docs and were still very unclear on what to do. Maybe some examples with multiple rules/conditions, and an explanation of the logic flow?

          Thanks,
          Erick

          1 Reply Last reply Reply Quote 0
          • benB Offline
            ben inedo-engineer
            last edited by

            Each rule separately checks that all of its conditions are met before deleting a package. If any of the rules decide to delete a package, the package is deleted.

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 1 / 1
            • First post
              Last post
            Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation