Update JIRA issues automatically after deployment.
Add this line to your application's Gemfile:
gem 'capistrano-jira'
And then execute:
$ bundle
Or install it yourself as:
$ gem install capistrano-jira
- Require library in
Capfile
require 'capistrano/jira'
- Set general parameters in
config/deploy.rb
set :jira_username, '[email protected]' # default: ENV['CAPISTRANO_JIRA_USERNAME']
set :jira_password, 'p@55w0rD' # default: ENV['CAPISTRANO_JIRA_PASSWORD']
set :jira_site, 'https://example.atlassian.net' # default: ENV['CAPISTRANO_JIRA_SITE']
set :jira_project_key, 'PROJ' # required
When an error occurs (for example HTTP Error) it will inform you but NOT fail whole deployment.
To check if setup is proper or diagnose a problem run for your environment
cap staging jira:check
Proper output will be similar to this:
=> Required params
jira_username = [email protected]
jira_password = **********
jira_site = https://example.atlassian.net
jira_project_key = PROJ
<= OK
=> Checking connection
<= OK
=> Checking for given project key
<= OK
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/capistrano-jira.