Skip to content
Cleanup your unused JFrog Artifactory's artifacts
Branch: master
Clone or download
dependabot and gkohen Bump nodemon from 1.18.10 to 1.18.11 (#90)
Bumps [nodemon](https://github.com/remy/nodemon) from 1.18.10 to 1.18.11.
- [Release notes](https://github.com/remy/nodemon/releases)
- [Commits](remy/nodemon@v1.18.10...v1.18.11)

Signed-off-by: dependabot[bot] <support@dependabot.com>
Latest commit f135248 Apr 15, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin This is where it all begins.. Oct 2, 2018
src Resolve an issue where the 'keep' option was deleting the k newest (#60) Feb 20, 2019
.babelrc This is where it all begins.. Oct 2, 2018
.editorconfig This is where it all begins.. Oct 2, 2018
.eslintrc Bugfix/issue 6 fix GitHub url (#11) Dec 14, 2018
.gitignore Resolve an issue where the 'keep' option was deleting the k newest (#60) Feb 20, 2019
.travis.yml Bugfix/issue 6 fix GitHub url (#11) Dec 14, 2018
CHANGELOG.md Bugfix/issue 6 fix GitHub url (#11) Dec 14, 2018
CODE_OF_CONDUCT.md Add documentation files. Nov 13, 2018
CONTRIBUTING.md Add documentation files. Nov 13, 2018
LICENSE
README.md
_config.yml
jest.config.js Bugfix/issue 6 fix GitHub url (#11) Dec 14, 2018
nodemon.json This is where it all begins.. Oct 2, 2018
package.json Bump nodemon from 1.18.10 to 1.18.11 (#90) Apr 15, 2019
screen.png Addition of repository filter as well as screenshot. Oct 15, 2018
sonar-project.properties Bugfix/issue 6 fix GitHub url (#11) Dec 14, 2018
yarn.lock

README.md

artifactory-cleanup

Travis Build Status Codecov badge Code quality Code Smells Reliability Rating Vulnerabilities Maintainability MIT PR's welcome

Background

In a development organization dependency management is key to sharing 3rd party and in-house common libraries as well as build artifacts to be deployed to the cloud and in-premise. Artifactory, by JFrog is such as solution that is provided as both a PaaS offering and in house solution for dependency management. The issue with such systems is that after a while, you start to accumulating old artifacts, such as libraries versions not used or outdated binaries that are no longer used. Having these extra artifacts will result in higher monthly cost for the Artifactory PaaS offering as well as slow down your server and make it more difficult for team members to navigate. Out of the box Artifactory will clean up snapshot libraries only. We were looking for a utility that would allow generating a report for artifacts that have not been used in a while. A good solution would be able to run the utility from a CI/CD server. Further, we wanted to let users with the right permissions and credentials to be able to run remotely. Inspired by a JFrog's cleanup plugin for in-premise servers, we decided to create this utility that fits the bill.

Description

artifactory-cleanup allows an Artifactory user with admin permissions to get a list of all artifacts that have not been in user in more than a specified period of time. You could specify a time period such as 6 months or use a specific date. If you run the utility in a dry run, only a report will be generated. Otherwise, the files that fit the criteria will be removed from your artifactory.

Prerequisites

You will need to have NPM installed on your machine.

Installation

$ npm install -g artifactory-cleanup

Usage

artifactory-cleanup [options]

Options:
  --help                   Show help                                                                                                        [boolean]
  --version                Show version number                                                                                              [boolean]
  -a, --artifactoryApiUrl  Artifactory server API URL                                                                                      [required]
  -u, --user               Artifactory user with permission to API                                                                         [required]
  -q, --quiet              Quiet down output                                                                                                [boolean]
  -t, --token              Artifactory user generated token                                                                                [required]
  -f, --filter             Repository filter                                                                                     [default: "*-local"]
  -p, --path               Path prefix filter
  -l, --logging            logging level                                              [choices: "error", "warn", "info", "verbose", "debug", "silly"]
  -d, --date               Threshold date (ISO-8610 format)
  -k, --keep               Threshold to keep only nth newest artifact parent folders                                                         [number]
  -o, --duration           Duration of time for threshold. To be combined with `unit` parameter
  -n, --unit               Unit of time for threshold. To be combined with `duration` parameter
     [choices: "years", "y", "quarters", "Q", "months", "M", "weeks", "w", "days", "d", "hours", "h", "minutes", "m", "seconds", "s", "milliseconds",                                                                                                                                              "ms"]
  -r, --dryrun             Dry run of the utility. Not files will be deleted

Example

Example

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

You can’t perform that action at this time.