Low commit activity in last 3 years
Artifactory Gem Import for importing gems from existing Gem Repo into a new Artifactory Gem Repo.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 0.18
~> 1.0
 Project Readme

Artifactory::GemImport

A command line tool for importing gems into a JFrog Artifactory gem repository server.

If you just want to copy gems from your existing GemServer to the Artifactory you might want to have a look at the gem mirror command and the jfrog command line utility that is able to upload your files too.

If you want to migrate you local gem repository over time and if you want to keep your old GemServer kind of "mirrored" to the Artifactory, this tool might be useful to you e.g. as part of the CI/CD pipeline when releasing gems.

How it works

  • it diffs the specs.4.8.gz of both repositories
  • it down- and uploads the missing gems only
  • it verifies the MD5 hash of the uploaded gem file with the cached one
  • it deletes the uploaded gem if the checksums do not match

Installation

gem 'artifactory-gem_import'

Usage

Show gems not already present in the Artifactory.

$ artifactory-gem-import show-missing --source-repo https://your-repo.local/private --target-repo https://your-artifactory.local/gems-local --target-repo-api-key <api-key> [--only "+."]

Import gems into the Artifactory.

$ artifactory-gem-import import --source-repo https://your-repo.local/private --target-repo https://your-artifactory.local/gems-local --target-repo-api-key <api-key>  [--only "+."]

Delete gems from the Artifactory. It will NOT remove the rubygems-update gem as it seems to be needed to keep the gem repository working.

$ artifactory-gem-import delete --target-repo https://your-artifactory.local/gems-local --target-repo-api-key <api-key>  [--only "+."]

Keep in mind that Artifactory needs some time to apply your changes.

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.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/artifactory-gem_import. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

Code of Conduct

Everyone interacting in the Artifactory::GemImport project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.