capistrano3-idobata 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -5
- data/image/screenshot.png +0 -0
- data/lib/capistrano3/idobata/version.rb +1 -1
- data/lib/capistrano3/tasks/idobata.rake +19 -16
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b5b9cd0e91d22fb7c5da08582b8f3be6bebcb1f
|
4
|
+
data.tar.gz: 14590c27331c2eb50c6054c6f31bf74964eafceb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf8e184d86fcedae24b6e4f77c8804a2a1a82b0abe8da97b3ede17e78ddbdf24e68ab2f090a4ba13a63b934621bac699558f6c6b45ba18f76dd05f2da93098eb
|
7
|
+
data.tar.gz: c10062b49a572acf3341e014ab6707a91752004e367cafb7a108818dcda6d8573d948093384dbc94e6accc0ecbc9a8eaa01e16aa8fc9e002b4c8d7a34702ef29
|
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# Capistrano3::Idobata
|
2
2
|
|
3
|
-
Send deployment notification to Idobata :rocket:
|
3
|
+
Send deployment notification to [Idobata](https://idobata.io) :rocket:
|
4
|
+
|
5
|
+
![screenshot.png](image/screenshot.png)
|
4
6
|
|
5
7
|
## Installation
|
6
8
|
|
@@ -12,15 +14,15 @@ gem 'capistrano3-idobata'
|
|
12
14
|
require 'capistrano3/idobata'
|
13
15
|
|
14
16
|
# config/deploy.rb
|
15
|
-
set :idobata_hook_url, 'https://idobata.io/hook/generic/
|
16
|
-
set :repository_url, 'https://github.com/
|
17
|
+
set :idobata_hook_url, 'https://idobata.io/hook/generic/xxxxx'
|
18
|
+
set :repository_url, 'https://github.com/xxxxx/xxxxx'
|
17
19
|
```
|
18
20
|
|
19
|
-
## Adding
|
21
|
+
## Adding some labels
|
20
22
|
|
21
23
|
```ruby
|
22
24
|
# config/deploy.rb
|
23
|
-
set :idobata_additional_label,
|
25
|
+
set :idobata_additional_label, %w(NOOP)
|
24
26
|
```
|
25
27
|
|
26
28
|
## Contributing
|
Binary file
|
@@ -4,24 +4,24 @@ namespace :idobata do
|
|
4
4
|
end
|
5
5
|
|
6
6
|
namespace :notify do
|
7
|
-
task :
|
8
|
-
|
9
|
-
|
7
|
+
task :starting do
|
8
|
+
source = "#{deployer} started deployment"
|
9
|
+
send_notification(source: source, type: :info)
|
10
10
|
end
|
11
11
|
|
12
12
|
task :finished do
|
13
|
-
branch_url
|
14
|
-
revision_url
|
13
|
+
branch_url = "#{fetch(:repository_url)}/tree/#{fetch(:branch)}"
|
14
|
+
revision_url = "#{fetch(:repository_url)}/commit/#{fetch(:current_revision)}"
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
16
|
+
source = "Branch <a href='#{branch_url}'>#{fetch(:branch)}</a> "
|
17
|
+
source += "(at <a href='#{revision_url}'>#{fetch(:current_revision)}</a>) "
|
18
|
+
source += "was deployed by #{deployer}"
|
19
|
+
send_notification(source: source, type: :success)
|
20
20
|
end
|
21
21
|
|
22
22
|
task :failed do
|
23
|
-
|
24
|
-
|
23
|
+
source = "Deployment by #{deployer} has failed"
|
24
|
+
send_notification(source: source, type: :danger)
|
25
25
|
end
|
26
26
|
end
|
27
27
|
end
|
@@ -29,7 +29,7 @@ end
|
|
29
29
|
namespace :deploy do
|
30
30
|
before 'starting', 'idobata:setup'
|
31
31
|
|
32
|
-
after '
|
32
|
+
after 'starting', 'idobata:notify:starting'
|
33
33
|
after 'finished', 'idobata:notify:finished'
|
34
34
|
after 'failed', 'idobata:notify:failed'
|
35
35
|
end
|
@@ -38,8 +38,11 @@ def deployer
|
|
38
38
|
ENV['DEPLOYER'] || `git config user.name`.chomp
|
39
39
|
end
|
40
40
|
|
41
|
-
def
|
42
|
-
|
43
|
-
|
44
|
-
|
41
|
+
def send_notification(source:, type:)
|
42
|
+
label =
|
43
|
+
(['Deploy', fetch(:stage)] + Array(fetch(:idobata_additional_label))).collect do |text|
|
44
|
+
{ type: type, text: text }
|
45
|
+
end
|
46
|
+
Idobata::Message.create(format: :html, source: source, label: label)
|
47
|
+
rescue Faraday::ClientError
|
45
48
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano3-idobata
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kirikiriyamama
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -85,6 +85,7 @@ files:
|
|
85
85
|
- README.md
|
86
86
|
- Rakefile
|
87
87
|
- capistrano3-idobata.gemspec
|
88
|
+
- image/screenshot.png
|
88
89
|
- lib/capistrano3-idobata.rb
|
89
90
|
- lib/capistrano3/idobata.rb
|
90
91
|
- lib/capistrano3/idobata/version.rb
|
@@ -109,8 +110,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
110
|
version: '0'
|
110
111
|
requirements: []
|
111
112
|
rubyforge_project:
|
112
|
-
rubygems_version: 2.
|
113
|
+
rubygems_version: 2.5.1
|
113
114
|
signing_key:
|
114
115
|
specification_version: 4
|
115
116
|
summary: Send deployment notification to Idobata
|
116
117
|
test_files: []
|
118
|
+
has_rdoc:
|