Supported continuous integration services:

Travis CI: Open Source and Pro versions (https://travis-ci.org or https://travis-ci.com)

CircleCi: https://circleci.com

Semaphore: https://semaphoreapp.com

Installation

gem 'capistrano-ci'

$ bundle

$ gem install capistrano-ci

require 'capistrano/ci/recipes'

Configuration

:ci_client (required) – supports travis , travis_pro , circle , or semaphore

, , , or :ci_repository (required) – organization or user name and repository name on github

:ci_access_token(required for travis_pro , circle , or semaphore ) – access token specific to the service

Open Source Projects

set(:ci_client){ "travis" } set(:ci_repository){ "organisation-or-user/repository-name" }

Pro Account of Travis-CI:

set(:ci_client){ "travis_pro" } set(:ci_repository){ "organisation-or-user/repository-name" } set(:ci_access_token){ "your-pro-access-token" }

CircleCi:

set(:ci_client){ "circle" } set(:ci_repository){ "organisation-or-user/repository-name" } set(:ci_access_token){ "your-circle-access-token" }

Semaphore:

set(:ci_client){ "semaphore" } set(:ci_repository){ "organisation-or-user/repository-name" } set(:ci_access_token){ "your-semaphore-access-token" }

Enable ci:verify task:

before 'deploy' do ci.verify end # or in case of using capistrano-patch: before 'patch:create' do ci.verify end

Summary

The quality of features going to production is very important; and to guarantee the highest quality we use Continuous Integration in our everyday workflow. In one of his recent posts Sergii Boiko has described how to check Travis CI build status before delivering new code to production. Afterwards, we’ve also decided to extract this recipe to capistrano-ci gem and this article will explain how to setup this gem in your deployment process.Add the following line to your application’s Gemfile:And then execute:Or install it yourself as:Add to your Capfile:Variables list:Setup ci_client and ci_repository variables in your deployment script:Additional to ci_client and ci_repository setup ci_access_token:To have more information about Travis-CI access token, you can follow this blog post Setup ci_client, ci_repository and ci_access_token in your deployment script:Setup ci_client, ci_repository and ci_access_token in your deployment script:That’s it, and in case your CI system isn’t supported by our gem, ask us to add it or make pull-requests by yourself!