This gem contains a Capistrano :task, which allows to update the Redmine issues statuses when you do deploy with Capistrano. For example, to change issues status from "Waiting for deploy" to "Waiting for review."
Add this line to your application's Gemfile:
gem 'capistrano-redmine', :require => false
or
gem 'capistrano-redmine', :git => 'git://github.com/foxweb/capistrano-redmine.git', :require => false
And then execute:
$ bundle install
Or install it yourself as:
$ gem install capistrano-redmine
-
Install and config you Capistrano utility.
-
Install capistrano-redmine.
-
Change directory to RAILS_ROOT of your app.
-
Add this variables in
config/deploy.rb
:# settings for capistrano-redmine set :redmine_site, "http://localhost:3000" # Redmine app host and port set :redmine_token, "376ba30fca80867d10a0ec0b505e5c97834901e3" # Redmine API key set :redmine_options, {} set :redmine_projects, "test-project" # you project identifier or array of. set :redmine_from_status, 1 # Redmine status ID "from" set :redmine_to_status, 3 # Redmine status ID "to" require "capistrano-redmine"
and
after "deploy", "redmine:update"
Specify the necessary settings for your Redmine.
If you want to use specific options of ActiveResource (some HTTP of SSL options), you can add the following settings. Specify
:ssl
options if you use HTTPS connection to Redmine. Specify:proxy
URL if you use HTTP-proxy.set :redmine_options, { :ssl => { :cert => OpenSSL::X509::Certificate.new(File.read("cert.pem")), :key => OpenSSL::PKey::RSA.new(File.read("key.pem")) }, :proxy => 'http://user:password@proxy.people.com:8080' }
-
Check installation with command
bundle exec cap -T redmine
You should see line:
cap redmine:update # Update Redmine issues statuses.
-
Start
bundle exec cap deploy
orbundle exec cap redmine:update
. -
Check your Redmine issues and enjoy it!
- To enable the API-style authentication, you have to check Enable REST API in Administration → Settings → Authentication.
- Create new user named like 'deploy' (or other) and login with this.
- You can find your API key on your account page ( /my/account ) when logged in, on the right-hand pane of the default layout.
- Copy and paste API key to the
config/deploy.rb
onset :redmine_token
.
- 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.