fast_ci 1.0.11 → 1.1.0
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/Gemfile.lock +1 -1
- data/lib/fast_ci/version.rb +1 -1
- data/lib/fast_ci.rb +24 -14
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c198e20b22117ce90305fa7c2f82c512ef268097b46c63fcb9cdfaaa9c45aa1d
|
4
|
+
data.tar.gz: cede75f91ab2fad8ee74715660a273ed9a0f229f40beb0875b4edc6ae253d550
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04040e4fff496fe2065fc2f120160fc29f253322abe3f6f526f9516e88bd9feb98ddb1319ce161858f204eacc2c59d6dccd2390645b1f168e254a91ad1ccb89e
|
7
|
+
data.tar.gz: 168c07fddb1154357fa647d5d59e61a8a248206f933a96f437ff4ac8d2a485b56c8b15b0cecc05a9974ad181d8cff8cc999129767ae92de4993c6ea20fdbd40c
|
data/Gemfile.lock
CHANGED
data/lib/fast_ci/version.rb
CHANGED
data/lib/fast_ci.rb
CHANGED
@@ -54,8 +54,16 @@ module FastCI
|
|
54
54
|
minitest_ws.await
|
55
55
|
end
|
56
56
|
|
57
|
+
def error(msg)
|
58
|
+
STDERR.puts "\e[31m[FastCI] #{msg}\e[0m"
|
59
|
+
end
|
60
|
+
|
57
61
|
def debug(msg)
|
58
|
-
puts "\
|
62
|
+
puts "\e[36mDEBUG: \e[0m #{msg}\n" if ENV["FAST_CI_DEBUG"]
|
63
|
+
end
|
64
|
+
|
65
|
+
def log(msg)
|
66
|
+
puts "\e[0m[FastCI] #{msg}\e[0m"
|
59
67
|
end
|
60
68
|
|
61
69
|
def report_options(run_key, content)
|
@@ -138,13 +146,13 @@ module FastCI
|
|
138
146
|
rescue Async::WebSocket::ProtocolError => e
|
139
147
|
case e.message
|
140
148
|
when "Failed to negotiate connection: 401"
|
141
|
-
|
149
|
+
FastCI.error("Failed to connect: Invalid secret key!")
|
142
150
|
exit 2
|
143
151
|
when "Failed to negotiate connection: 403"
|
144
|
-
|
152
|
+
FastCI.error("Failed to connect: Invalid or disabled run key!")
|
145
153
|
exit 2
|
146
|
-
|
147
|
-
|
154
|
+
else
|
155
|
+
FastCI.error("Failed to connect: General connection error!")
|
148
156
|
exit 2
|
149
157
|
end
|
150
158
|
end
|
@@ -163,7 +171,7 @@ module FastCI
|
|
163
171
|
|
164
172
|
case response&.dig(:event) || message[:event]
|
165
173
|
when "phx_error"
|
166
|
-
raise("
|
174
|
+
raise("Unexpected server error")
|
167
175
|
when "join"
|
168
176
|
handle_join(response)
|
169
177
|
when "failed_join"
|
@@ -179,15 +187,12 @@ module FastCI
|
|
179
187
|
else
|
180
188
|
break
|
181
189
|
end
|
182
|
-
when "error"
|
183
|
-
raise(response.inspect)
|
184
190
|
else
|
185
|
-
|
191
|
+
raise(response.inspect)
|
186
192
|
end
|
187
193
|
end
|
188
194
|
rescue => e
|
189
|
-
|
190
|
-
puts e.backtrace.join("\n")
|
195
|
+
FastCI.error("Unexpected error: #{e.message}\n\t#{e.backtrace.join("\n\t")}")
|
191
196
|
task&.stop
|
192
197
|
end
|
193
198
|
end
|
@@ -227,8 +232,13 @@ module FastCI
|
|
227
232
|
end
|
228
233
|
|
229
234
|
def handle_join_fail(response)
|
230
|
-
|
231
|
-
|
235
|
+
if response[:state] == "passed"
|
236
|
+
FastCI.log("Can't join because of run's state being: #{response[:state]}")
|
237
|
+
exit 0
|
238
|
+
else
|
239
|
+
FastCI.error("Can't join because of run's state being: #{response[:state]}")
|
240
|
+
exit 1
|
241
|
+
end
|
232
242
|
end
|
233
243
|
|
234
244
|
def handle_deq_request(_response)
|
@@ -240,7 +250,7 @@ module FastCI
|
|
240
250
|
end
|
241
251
|
|
242
252
|
def topic
|
243
|
-
"test_orchestrator:#{run_key}-#{FastCI.configuration.build_id}"
|
253
|
+
"test_orchestrator:#{run_key}-#{FastCI.configuration.commit}-#{FastCI.configuration.build_id}"
|
244
254
|
end
|
245
255
|
|
246
256
|
def endpoint
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fast_ci
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nesha Zoric
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: console
|