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 +4 -4
- data/lib/build_buddy.rb +1 -1
- data/lib/build_buddy/recorder.rb +5 -4
- data/lib/build_buddy/scheduler.rb +2 -5
- data/lib/build_buddy/slacker.rb +2 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96abcbb3d97494bf58764afb274d6ca984bb733e
|
4
|
+
data.tar.gz: bad604376666183553e37a5ae3dc2255c8f59272
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b897835e9014316508518e51a48c12a11b836961589559573959db82704b106a7f05658f46111f7afa3d22867e2950dc29650c9278f571aa8d6cf2667a10d5d7
|
7
|
+
data.tar.gz: b5d0e85f7a661cf6fc8ccbcaad1dd422117289915dc9fa0a94a0c94f588338b6fb2d60e0c628afaf09f34c12766cf18082991744f36b9d651a4ced110b95a211
|
data/lib/build_buddy.rb
CHANGED
data/lib/build_buddy/recorder.rb
CHANGED
@@ -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
|
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
|
-
|
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.
|
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
|
data/lib/build_buddy/slacker.rb
CHANGED
@@ -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
|
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
|