capistrano-ci is extension for capistrano that allows you to check status of your repository before deployment. Currently it supports:
- Travis CI: Open Source and Pro versions (https://travis-ci.org or https://travis-ci.com)
- CircleCi: https://circleci.com
- Semaphore: https://semaphoreapp.com
Add this line to your application's Gemfile:
gem 'capistrano-ci'
And then execute:
$ bundle
Or install it yourself as:
$ gem install capistrano-ci
Add to your Capfile:
require 'capistrano/ci/recipies'
Variables list:
- :ci_client (required) - supports
travis
,travis_pro
,circle
, orsemaphore
- :ci_repository (required) - organization or user name and repository name on github
- :ci_access_token(required for
travis_pro
,circle
, orsemaphore
) - access token specific to the service
Setup ci_client and ci_repository variables in your deployment script:
set(:ci_client){ "travis" }
set(:ci_repository){ "organisation-or-user/repository-name" }
Additional to ci_client and ci_repository setup ci_access_token:
set(:ci_client){ "travis_pro" }
set(:ci_repository){ "organisation-or-user/repository-name" }
set(:ci_access_token){ "your-pro-access-token" }
Read explaination how to obtain Travis-CI access token. To have more information about Travis-CI access token follow this blog post.
Setup ci_client, ci_repository and ci_access_token in your deployment script:
set(:ci_client){ "circle" }
set(:ci_repository){ "organisation-or-user/repository-name" }
set(:ci_access_token){ "your-circle-access-token" }
Setup ci_client, ci_repository and ci_access_token in your deployment script:
set(:ci_client){ "semaphore" }
set(:ci_repository){ "organisation-or-user/repository-name" }
set(:ci_access_token){ "your-semaphore-access-token" }
before 'deploy' do
ci.verify
end
# or in case of using capistrano-patch:
before 'patch:create' do
ci.verify
end
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Copyright (c) 2013 Railsware LLC. See LICENSE.txt for further details.