Skip to content
This repository was archived by the owner on Dec 4, 2023. It is now read-only.

Midaxo/artifactory-cleanup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Artifactory Cleanup

A cleanup script for Artifactory that removes old (currently older than 4 months) artifacts from Artifactory plus a Jenkins pipeline for running the script periodically. This is needed because Artifactory Cloud Pro doesn't offer out-of-the-box solution for cleaning the old snapshots. Artifact is never removed in two cases:

  • Its name begins with release-*
  • It has Artifactory property "skipCleanup=true" set

Deleting artifact from Artifactory actually just puts it into trashcan. Artifacts will stay in the trashcan the number of days defined in the Retention Period field of Artifactory settings (under General Configuration).

AQL (Artifactory Query Language) and Artifactory REST API are used in the implementation.

Requirements

Python 2.7 or 3.7 Requests: pip install requests

Adding repositories

To enable cleaning for your new Artifactory repository, it must be added to the list of cleaned repositories in the script file.

Skipping cleanup for certain artifacts

Add the property "skipCleanup=true" in the Artifactory UI to any artifact that you want to keep indefinitely.

Authors

Juha Luoto

About

Scripts for removing old packages from Artifactory

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages