Giter VIP home page Giter VIP logo

artifactory-cleaner's Introduction

Artifactory::Cleaner

Gem Version CircleCI

Artifactory Cleaner is a tool for managing Artifactory repositories with a focus on analyzing and optimizing storage usage within Artifactory. Artifactory::Cleaner can be used as a Gem inside other Ruby automation, and also includes a command-line interface (CLI) which can be used inside an interactive terminal session or incorporated into other automation workflows.

Installation

To use as a CLI command:

The gem can be installed using rubygems:

sudo gem install artifactory-cleaner

This will install the artifactory-cleaner command.

Full usage information is available using artifactory-cleaner help

The artifactory-cleaner CLI interface follows the same format as git: artifactory-cleaner command [options]

Commands available are:

  • artifactory-cleaner archive Given a specific set of criteria (and optionally a set of filters) download all artifacts from specified repos to the local filesystem. Note: this will cause the last_downloaded date of all the artifacts which are archived to be updated to the time the command is run, so they may no longer match your search criteria on a subsequent run
  • artifactory-cleaner clean delete old artifacts which meet a specific set of criteria (and optionally a set of filters) from a given set of repos, with the ability to archive them to the local filesystem. This is Artifactory::Cleaner's primry function: to reduce disk space usage by deleting old, unnecessary artifacts.
  • artifactory-cleaner list-repos provides information about available repositories in Artifactory. Can be used in pipelines with the -H flag, or can be used to query repository information in human-readable columns.
  • artifactory-cleaner usage-report analyze artifacts and produce a report detailing usage breakdown by date ranges, optionally producing a detailed YAML report of all artifacts meeting search criteria

Authentication and Configuration

In order for artifactory-cleaner to know which Artifactory server to communicate with and how to authenticate, either command-line arguments may be used, or (preferably) a configuration filr may be specified using the -c / --conf-file switch.

If using command line arguments, --endpoint can be used to specify the HTTPS URL of the Artifactory API, and --api-key can be used to specify the API key. Be aware

To use as a gem:

Add this line to your application's Gemfile:

gem 'artifactory-cleaner'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install artifactory-cleaner

Usage

Execute artifactory-cleaner help for a usage statement

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

artifactory-cleaner's People

Contributors

jgitlin-p21 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.