views:

25

answers:

2

Hi,

I have a Continuous Integration / Continuous Deployment scenario where I want my build script to push a ruby gem directly from a public Build Server (teamcity.codebetter.com) to RubyGems.org.

The problem is: How can I specify my credentials? On my local machine I have them under ~/.gem/credentials and everything works fine but how can I tell the build server to push my gem?

Thanks and best regards, Steffen Forkmann

+1  A: 

I would guess if you manually pushed once from the continuous integration box as the user who runs the CI software it could push in the future.

Jason Noble
Yes. That's true, but as I said it is a public CI server. Adding the public CI user as a gem owner to my gem means every other project could possibly "update" my gem.
forki23
You could look at setting up a callback URL on a separate server, then have your build process access that URL on successful build.
Jason Noble
+1  A: 

You could just use the API itself to push the gems. See the POST /api/v1/gems endpoint: http://rubygems.org/pages/api_docs

qrush