0

I created a website (a Ruby on Rails application) that I would like to make open-source so that the community can make improvements. The source code is already publicly available on GitHub. However, I'd like to set up my server so that when I accept a pull request, the code is automatically deployed to production.

I doubt that I'm the first person to think of such a thing, so maybe a tool already exists to handle this. Currently I use Capistrano to deploy my application. Maybe there is a plugin available to add this sort of behavior. I also want to avoid publicizing the production API keys which currently only exist on the server.

If a tool/plugin does not already exist, what do I need to do in order to implement this type of behavior.

Andrew
  • 227,796
  • 193
  • 515
  • 708
  • 1
    try jenkins, you can poll the master branch and run deployment every time it changes. – BroiSatse Jul 09 '14 at 19:44
  • travis can do this ( http://blog.travis-ci.com/2013-07-09-introducing-continuous-deployment-to-heroku/ post is about heroku but travis isn't limited to that) – Frederick Cheung Jul 09 '14 at 20:20
  • @FrederickCheung That looked promising...looked like you might be able to configure your own `provider`, but the documentation is so specific to Heroku that it's hard to figure out how to use it outside of Heroku. Essentially, I need to know how to poll master and switch the ref on production, then update the pull request with a comment. I'm assuming GitHub hooks will be involved. – Andrew Jul 09 '14 at 20:42
  • I can't help you with a solution, but the phrase we use for this is "Continuous delivery" http://en.wikipedia.org/wiki/Continuous_delivery – Taryn East Jul 10 '14 at 08:04
  • @TarynEast thanks for applying the right terminology to this. – Andrew Jul 10 '14 at 19:58

1 Answers1

0

After some research, I wasn't able to find an open-source tool or tutorial on how to do this yourself. However, I came across some services which provide this functionality.

Travis CI

Travis CI is a continuous integration service which runs your test suite on every commit. They offer a "Continuous Deployment" feature which allows you to deploy on a successful build. When a GitHub pull request is merged into master, this triggers a Travis build and will deploy if all your tests pass. However, they have a limited list of hosting providers that they support.

http://docs.travis-ci.com/user/deployment/

Ninefold

Ninefold is a hosting provider and on the list Travis CI supported services. However, Ninefold has their own built-in support for automatic deployments which do not require you to use Travis. https://help.ninefold.com/hc/en-us/articles/200847214-How-to-deploy-an-app

I ended up migrating to Ninefold and using Travis CI to deploy.

Andrew
  • 227,796
  • 193
  • 515
  • 708