solano_notify_and_deploy 0.0.4 → 0.0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d1adc5e2b4bf21e6924fde2c3ae6be615a8c6cb
|
4
|
+
data.tar.gz: 325d7142a8c1d8dea231ebdaddfd0268e71fe982
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7dfee3905508cad82b0a6721f6d9ea04bed15110612ccc6b8c7c412778c8b0196ea7214abcaaae3d1e36e6ecdaea003080bd954d74c508ef2835647cbbef53d7
|
7
|
+
data.tar.gz: 3ea534a5188f5c9fcccef201b309e68f57b5e2d5ab7af29316d011e2e4ff2f4ad099ad39fc7f8005b4ab60046a3157bd268de85765667eefddbf9b2a7de65e71
|
@@ -1,17 +1,27 @@
|
|
1
1
|
namespace :solano do
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
|
3
|
+
namespace :notify do
|
4
|
+
|
5
|
+
desc 'build start - notify hipchat'
|
6
|
+
task :build_start do
|
7
|
+
notify 'CI starting', 'green'
|
8
|
+
end
|
9
|
+
|
10
|
+
desc 'build complete - notify hipchat'
|
11
|
+
task :build_complete do
|
12
|
+
notify_build_status
|
13
|
+
end
|
14
|
+
|
5
15
|
end
|
6
16
|
|
7
|
-
desc 'notify hipchat
|
17
|
+
desc 'build complete - notify hipchat and deploy on successful build'
|
8
18
|
task :notify_and_deploy do
|
9
19
|
notify_build_status "- will not deploy, to deploy manually try rake solano:deploy"
|
10
20
|
next unless build_passed?
|
11
21
|
deploy
|
12
22
|
end
|
13
23
|
|
14
|
-
desc 'run the deploy (notify on failure)'
|
24
|
+
desc 'run the deploy (notify hipchat on failure)'
|
15
25
|
task :deploy do
|
16
26
|
deploy
|
17
27
|
end
|
@@ -48,8 +58,8 @@ namespace :solano do
|
|
48
58
|
end
|
49
59
|
|
50
60
|
def notify_build_status(failed_message = '')
|
51
|
-
notify
|
52
|
-
notify
|
61
|
+
notify "CI succeeded", "green" and return if build_passed?
|
62
|
+
notify "CI failed #{failed_message}", "yellow"
|
53
63
|
end
|
54
64
|
|
55
65
|
def notify(message, colour)
|
@@ -1,8 +1,9 @@
|
|
1
1
|
---
|
2
2
|
:hooks:
|
3
3
|
:worker_setup: RAILS_ENV=test bundle exec rake db:test:prepare
|
4
|
+
:pre_setup: bundle exec rake solano:notify:build_start
|
4
5
|
<%- if deploy_hook_url.nil? %>
|
5
|
-
:post_build: bundle exec rake solano:notify
|
6
|
+
:post_build: bundle exec rake solano:notify:build_complete
|
6
7
|
<%- else %>
|
7
8
|
:post_build: bundle exec rake solano:notify_and_deploy
|
8
9
|
<%- end %>
|