I’ve done a little plugin I hope might be useful for others who would like to know what is the total size of artefacts stored by Artifactory in local repository.
The functionality is quite simple:
- You can obtain a size of a repository by sending a POST request to url: /artifactory/api/plugins/execute/getRepositorySize?params=repoName=repository-name
- You can obtain a report in a form of a JSON Array for all local repositories by sending a POST request to url: /artifactory/api/plugins/execute/getAllRepositorySizes
Plugin code and a sample JSON response for all repository sizes below.
Just want to add that JFrog did a brilliant work with their very simple and elegant Artifactory API.
To install plugin just copy the RepositorySize.groovy file to ARTIFACTORY_HOME/etc/plugins folder.