devopshq / artifactory-cleanup

Extended cleanup tool for JFrog Artifactory

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

KeepLatestNFilesInFolder & KeepLatestNFiles keeps oldest files, not newest

bartoszpietrzyba opened this issue · comments

I'm not sure if it's a bug or I misunderstand how the program works, but with the policy written this way, the oldest artifacts are kept and not the newest ones.

This is my example:

  policies:
    - name: example-name
      rules:
        - rule: Repo
          name: example-repo
        - rule: DeleteDockerImagesNotUsed
          days: 200       
        - rule: KeepLatestNFiles
          count: 15
        - rule: KeepLatestNFilesInFolder
          count: 10
        - rule: ExcludeDockerImages
          masks:
            - "*:latest"
            - "*:release*"
commented

@bartoszpietrzyba yep, it was a bug. Fixed in 1.0.2!