Uploaded image for project: 'TeamCity Artifactory Plug-in'
  1. TeamCity Artifactory Plug-in
  2. TCAP-320

Maven deploy retention policy

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 2.6.0
    • Fix Version/s: None
    • Labels:
    • Environment:

      TeamCity 2017.2.3 -> RHEL 7
      Artifactory Enterprise 5.4.4 -> RHEL 7

      Description

      Hello,

      I am using the Artifactory plugin 2.6 in TeamCity to deploy Maven artifacts to Artifactory Maven repositories. I have both release (libs-release) and snapshot (libs-snapshot) repositories set up for my project. For build and deploy, everything works fantastically, snapshots and releases are correctly deployed to the appropriate repositories defined in the fields "Target repository" and "Target snapshot repository".

      The problem is with the retention section. If I choose "Discard Old Builds:" and use "Max # Of Builds To Keep:", the number entered is a collective total of builds in both release and snapshot repositories.

      Example:
      I have max # of builds to keep set at 3
      Build run 1 release (successfully deploys to libs-release maven repo)
      Build run 2 snapshot (successful to libs-snapshot repo)
      Build run 3 snapshot (again)
      Build run 4 snapshot (again, all successful)

      At this point, the release artifacts (from run 1) are deleted, even though they are in a separate repository than the last run. Because we have way more snapshot builds than release builds, using the same Max # as a total of the 2 repositories does not make sense.

      Either of these options would be a suitable solution for this issue: 
      1) apply the current Max # rule value to each repository separately (max 3 in each repo for example)
      2) give each repository its own Max # field (Max # of snapshots to keep & Max # of releases to keep)

       

        Attachments

          Activity

            People

            Assignee:
            eyalb Eyal Ben Moshe
            Reporter:
            cpalmer Charlie Palmer (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: