solano_notify_and_deploy 0.0.4 → 0.0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 452aa1dafc665615f73ba814b540e9af40df70fc
4
- data.tar.gz: 10da2903fa341cdc736ddeda1a7c8e7936b9f1a0
3
+ metadata.gz: 8d1adc5e2b4bf21e6924fde2c3ae6be615a8c6cb
4
+ data.tar.gz: 325d7142a8c1d8dea231ebdaddfd0268e71fe982
5
5
  SHA512:
6
- metadata.gz: eb1d0de5a558fc6ec3e72b0656892df19e881e06305ad7ad0b91950975812f9d170e2ec3124102f0e3d084088edddd8619b7acb0da4fa5021ed139eec8aef2ae
7
- data.tar.gz: 4a81d61cda879f1bdebeba0b5419b8736becbbe31add43a5b054931244c3324b375f0869d749a0d8e80ff81ac30fafdd76800779fbc8e6c732934b1f320c3812
6
+ metadata.gz: 7dfee3905508cad82b0a6721f6d9ea04bed15110612ccc6b8c7c412778c8b0196ea7214abcaaae3d1e36e6ecdaea003080bd954d74c508ef2835647cbbef53d7
7
+ data.tar.gz: 3ea534a5188f5c9fcccef201b309e68f57b5e2d5ab7af29316d011e2e4ff2f4ad099ad39fc7f8005b4ab60046a3157bd268de85765667eefddbf9b2a7de65e71
@@ -1,17 +1,27 @@
1
1
  namespace :solano do
2
- desc 'notify hipchat on build events'
3
- task :notify do
4
- notify_build_status
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 on build events, deploy on successful build'
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 hipchat_api_key, hipchat_room_id, "Build succeeded", "green" and return if build_passed?
52
- notify hipchat_api_key, hipchat_room_id, "Build failed #{failed_message}", "yellow"
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 %>
@@ -1,3 +1,3 @@
1
1
  module SolanoNotifyAndDeploy
2
- VERSION = '0.0.4'
2
+ VERSION = '0.0.4.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solano_notify_and_deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nic Pillinger