Skip to content

Latest commit

 

History

History
51 lines (44 loc) · 1.5 KB

RUBYGEMS.md

File metadata and controls

51 lines (44 loc) · 1.5 KB

Rubygems

./n3dr configRepository \
  -u admin \
  -p $(docker exec -it nexus3-n3dr-src cat /nexus-data/admin.password) \
  -n localhost:8081 \
  --https=false \
  --configRepoName some-rubygems \
  --configRepoType gem
  • Populate it with artifacts:
downloadDir=/tmp/some-dir/some-rubygems && \
mkdir -p ${downloadDir} && \
for f in chef-17.4.25 chef-18.1.0 puppet-7.23.0 rack-3.0.4.1; do
curl -L https://rubygems.org/downloads/${f}.gem > ${downloadDir}/${f}.gem
curl -X 'POST' \
  localhost:8081/service/rest/v1/components?repository=some-rubygems \
  -s \
  -f \
  -u "admin:$(docker exec -it nexus3-n3dr-src cat /nexus-data/admin.password)" \
  -H 'accept: application/json' \
  -H 'Content-Type: multipart/form-data' \
  -F "rubygems.asset=@${downloadDir}/${f}.gem;type=application/x-tar"
done
./n3dr configRepository \
  -u admin \
  -p $(docker exec -it nexus3-n3dr-dest cat /nexus-data/admin.password) \
  -n localhost:9000 \
  --https=false \
  --configRepoName some-rubygems \
  --configRepoType gem