A simple continuous integration for a Rails application. Enjoy it!
Get a new code from another team members, install new gems, run new migrations, run specs, send your new feature to the origin repository and deploy your application. At simplest way!
Add this line into your application's Gemfile:
gem 'shuttle'
Install the gem with Bundler:
$ bundle
And then configure default Shuttle Steps:
$ rails g shuttle:install
This will create a configuration file in config/shuttle.yml
who looks like this:
steps:
- shuttle:git:check
- shuttle:git:pull
- shuttle:bundle
- db:migrate
- shuttle:spec
- shuttle:git:push
# - log:clear
# - tmp:clear
# stages:
# staging: your@server.com:staging-repository.git
# production: your@server.com:production-repository.git
The steps are nothing more than Rake tasks, performed at the integration time. The array steps order will be the execution order. You have the freedom to rearrange, add or delete steps according to your need.
shuttle:git:check
checks for files to be commitedshuttle:git:pull
gives a pull from the origin repositoryshuttle:git:push
gives a push to the origin repositoryshuttle:bundle
install all the new gemsshuttle:spec
prepare and run all specs
Stages are repositories for deploy, usually a repository hosted on Heroku. You can configure multiple repositories representing different execution environments for their application, such as staging
or production
.
Just run this to integrate your app:
$ rake shuttle
If you wish to deploy your app in staging
, run this:
$ rake shuttle[staging]
Or, deploy to staging
, and then to production
, run this:
$ rake shuttle[staging:production]
You can deploy on how many repositories you want at once, as long as they are configured as Shuttle Stages.
Note: before deploy, it will integrate the app.
Anna Cruz for contributing in the README translation and revision.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request