build-buddy 1.14.2 → 1.14.3

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: 14eca58f4d3f477090e879ccc9daa6c2e6cd4ed7
4
- data.tar.gz: 3f8b38b895cb96d779792147621e9531cad37a40
3
+ metadata.gz: 96abcbb3d97494bf58764afb274d6ca984bb733e
4
+ data.tar.gz: bad604376666183553e37a5ae3dc2255c8f59272
5
5
  SHA512:
6
- metadata.gz: 3969cc949092d261451d018c8e76611990d1c33a1ebc2592c553a4fb57b7742062ca3645539e8a1e1c416993474bd37fc0a181e8b367e380cfe02cd13a6e69d4
7
- data.tar.gz: 51abbb4a39671b7f381b4cdf50c66fc731ed6f6effc693931ae9a45c230591552c0bf36ce5741c36509ce86b6ebda497f6bcd654d9ddd766fe0fbe59920c9cb8
6
+ metadata.gz: b897835e9014316508518e51a48c12a11b836961589559573959db82704b106a7f05658f46111f7afa3d22867e2950dc29650c9278f571aa8d6cf2667a10d5d7
7
+ data.tar.gz: b5d0e85f7a661cf6fc8ccbcaad1dd422117289915dc9fa0a94a0c94f588338b6fb2d60e0c628afaf09f34c12766cf18082991744f36b9d651a4ced110b95a211
data/lib/build_buddy.rb CHANGED
@@ -9,5 +9,5 @@ require 'build_buddy/recorder'
9
9
  require 'build_buddy/build_data'
10
10
 
11
11
  module BuildBuddy
12
- VERSION = "1.14.2"
12
+ VERSION = "1.14.3"
13
13
  end
@@ -22,7 +22,7 @@ module BuildBuddy
22
22
  @mongo[:builds].indexes.create_one({:create_time => -1}, :name => "reverse_order")
23
23
  end
24
24
 
25
- def record_build_data(build_data)
25
+ def record_build_data_and_start_build(build_data)
26
26
  builds = @mongo[:builds]
27
27
  begin
28
28
  # Do this to prevent build _id's from being sequential and so reduce risk
@@ -32,6 +32,8 @@ module BuildBuddy
32
32
  rescue Mongo::Error::OperationFailure => e
33
33
  retry if e.to_s.start_with?('E11000') # Duplicate key error
34
34
  end
35
+
36
+ Celluloid::Actor[:builder].async.start_build(build_data)
35
37
  end
36
38
 
37
39
  def update_build_data(build_data)
@@ -39,8 +41,7 @@ module BuildBuddy
39
41
  return
40
42
  end
41
43
 
42
- builds = @mongo[:builds]
43
- builds.replace_one({ :_id => build_data._id }, build_data.to_h)
44
+ @mongo[:builds].replace_one({ :_id => build_data._id }, build_data.to_h)
44
45
  end
45
46
 
46
47
  def get_build_data(id)
@@ -69,4 +70,4 @@ module BuildBuddy
69
70
  uri
70
71
  end
71
72
  end
72
- end
73
+ end
@@ -78,8 +78,6 @@ module BuildBuddy
78
78
  if i != nil
79
79
  build_data = @build_queue[i]
80
80
  @build_queue.delete_at(i)
81
- build_data.stopped_by = slack_user_name
82
- Celluloid::Actor[:recorder].async.record_build_data(build_data)
83
81
  return :in_queue
84
82
  end
85
83
 
@@ -96,8 +94,7 @@ module BuildBuddy
96
94
  elsif @build_queue.length > 0 # Then, check if there are any builds waiting to go
97
95
  build_data = @build_queue.pop()
98
96
  @active_build = build_data
99
- Celluloid::Actor[:recorder].async.record_build_data(build_data)
100
- Celluloid::Actor[:builder].async.start_build(build_data)
97
+ Celluloid::Actor[:recorder].async.record_build_data_and_start_build(build_data)
101
98
  else # Otherwise, stop the timer until we get a build queued.
102
99
  @build_timer.cancel
103
100
  @build_timer = nil
@@ -122,4 +119,4 @@ module BuildBuddy
122
119
  @build_queue.clone
123
120
  end
124
121
  end
125
- end
122
+ end
@@ -105,8 +105,9 @@ module BuildBuddy
105
105
  when :not_found
106
106
  "I could not find a queued or active build with that identifier"
107
107
  end
108
+ info "Build #{bb_id} was stopped by #{slack_user_name}"
108
109
  else
109
- response = "You must specify the 24 digit hexadecimal build identifier. It can be an active build or a build in the queue."
110
+ response = "You must specify the build identifier. It can be an active build or a build in the queue."
110
111
  end
111
112
 
112
113
  response
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: build-buddy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.14.2
4
+ version: 1.14.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Lyon-smith