Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
alejdg committed Feb 4, 2016
1 parent d401aff commit f0818fd
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 5 deletions.
95 changes: 92 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# lita-capistrano

TODO: Add a description of the plugin.
[![Gem Version](https://badge.fury.io/rb/lita-capistrano.png)](http://badge.fury.io/rb/lita-capistrano)

**lita-capistrano** is a hanlder for [Lita](https://www.lita.io/) that allows you to use make deploys through your robot.

## Requirements

In order to **lita-capistrano** to identify a good deploy from a failed one, you capistrano script should always end with a message.

## Installation

Expand All @@ -12,8 +18,91 @@ gem "lita-capistrano"

## Configuration

TODO: Describe any configuration attributes the plugin exposes.
### Required attributes

* `server` (String) – The deploy server host.

* `server_user` (String) – The deploy server host ssh user.

* `server_password` (String) – The deploy server host ssh password.

* `deploy_tree` (String) – A json configuration of how deploys work.

### Example

``` ruby
Lita.configure do |config|
config.handlers.capistrano.server = "capistrano-deploy.com"
config.handlers.capistrano.server_user = "lita"
config.handlers.capistrano.server_password = "secret"
end

config.handlers.capistrano.deploy_tree = {
first_app: {
qa: {
dir: "/capistrano/first_app/qa",
auth_group: "first_app_qa", # auth_group required to be able to deploy
channel: "first_app_channel", # not required, if configured limits deploys to this channel
envs: [
"qa1",
"qa2"
]
},
staging: {
dir: "/capistrano/fist_app/staging",
auth_group: "first_app_staging",
envs: [
"stagin1",
"staging2",
"staging3"
]
}
},
second_app: {
prod: {
dir: "/capistrano/second_app/production",
auth_group: "second_app_staging",
channel: "second_app_prod_channel",
envs: [
"dc1",
"dc2"
]
}
}
```

## Usage

TODO: Describe the plugin's features and how to use them.
List available apps for deploy:

```
Lita: deploy list
```

List available app areas for deploy:

```
Lita: deploy list [APP]
```

List required auth groups to deploy:

```
Lita: deploy auth list [APP]
```

Deploy a tag or branch:

```
Lita: deploy [APP] [AREA] [ENV] [TAG]
```

Rollback last tag or branch:

```
Lita: deploy [APP] [AREA] [ENV] rollback
```

## License

[MIT](http://opensource.org/licenses/MIT)
2 changes: 1 addition & 1 deletion lib/lita/handlers/capistrano.rb
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def define_static_routes
%r{^deploy\s+auth\s+list},
:deploy_auth_list,
command: false,
help: { "deploy auth list [APP] " => "List available apps for deploy"}
help: { "deploy auth list [APP] " => "List required auth groups to deploy"}
)
end

Expand Down
2 changes: 1 addition & 1 deletion lita-capistrano.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |spec|
spec.name = "lita-capistrano"
spec.version = "0.1.4"
spec.version = "0.2.0"
spec.authors = ["Alexandre Gomes"]
spec.email = ["[email protected]"]
spec.summary = "A Lita handler to integrate with Capistrano.rb"
Expand Down

0 comments on commit f0818fd

Please sign in to comment.