fastlane-plugin-android_reporter 0.1.32 → 0.1.33
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a4258c145bd5cdccc47f04bce44896d2e53b072c661442c6541fa4f8d719e4f
|
4
|
+
data.tar.gz: 0af6f30569fb8cbc194849295adb11e285beaed65971b8e6817aae2cd5306927
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6c4680f5188b2026e0642ba53848681be2e1edac86ca51aa6d603e6b2c4b67b3e6cc8b1dd23c9f43ee92eafdf04e8202d17b0d720569c837331655e5f6a1a5d
|
7
|
+
data.tar.gz: 3c9953eb4e494cda10b712bba5d32c34048fe4847419b2d49cfd5d19e3b0988641e5e8929590be4c31219bff6b3e50d82e44873e8b4dceb962d81f90db74150c
|
@@ -150,113 +150,117 @@ module Fastlane
|
|
150
150
|
UI.message("Slack Configuration Status : Disabled ...")
|
151
151
|
end
|
152
152
|
|
153
|
-
# 12. Upload Files to Slack
|
154
|
-
if
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
isLogcatFileUploaded = true
|
170
|
-
UI.message("Slack Step Upload [logcat.txt]")
|
171
|
-
else
|
172
|
-
isLogcatFileUploaded = false
|
173
|
-
UI.error("File does not exist [logcat.txt]")
|
174
|
-
end
|
175
|
-
rescue => error
|
176
|
-
if error
|
177
|
-
UI.error("Something Error with Slack Upload File : [Step Upload Logcat.txt File to Slack]")
|
178
|
-
end
|
179
|
-
puts error.message
|
180
|
-
puts error.backtrace
|
181
|
-
end
|
153
|
+
# 12. Upload Files to Slack if The Build Failed
|
154
|
+
if gradle_task_result == false
|
155
|
+
if is_slack_enabled
|
156
|
+
begin
|
157
|
+
UI.message("Slack Messages Bot Upload Files Tasks Started ....")
|
158
|
+
UI.message(__dir__)
|
159
|
+
if(File.exist?("logcat.txt"))
|
160
|
+
UI.message("logcat.txt File exists ...")
|
161
|
+
client.files_upload(
|
162
|
+
channels: "#" + params[:slack_channel_name],
|
163
|
+
as_user: true,
|
164
|
+
file: Faraday::UploadIO.new('logcat.txt', 'text/plain'),
|
165
|
+
title: "Android UI Testing (ADB Logcat Result)",
|
166
|
+
filename: "logcat.txt",
|
167
|
+
initial_comment: "Current UI Testing Build Result File Report [logcat.txt]"
|
168
|
+
)
|
182
169
|
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
filename: "android-logs.txt",
|
192
|
-
initial_comment: "Current UI Testing Build Result File Report [Gradle Debug Result]"
|
193
|
-
)
|
194
|
-
|
195
|
-
isGradleDebugFileUploaded = true
|
196
|
-
UI.message("Slack Step Upload [android-logs.txt]")
|
197
|
-
else
|
198
|
-
isGradleDebugFileUploaded = false
|
199
|
-
UI.error("File does not exist [android-logs.txt]")
|
200
|
-
end
|
201
|
-
rescue => error
|
202
|
-
if error
|
170
|
+
isLogcatFileUploaded = true
|
171
|
+
UI.message("Slack Step Upload [logcat.txt]")
|
172
|
+
else
|
173
|
+
isLogcatFileUploaded = false
|
174
|
+
UI.error("File does not exist [logcat.txt]")
|
175
|
+
end
|
176
|
+
rescue => error
|
177
|
+
if error
|
203
178
|
UI.error("Something Error with Slack Upload File : [Step Upload Logcat.txt File to Slack]")
|
204
|
-
|
179
|
+
end
|
205
180
|
puts error.message
|
206
181
|
puts error.backtrace
|
207
|
-
|
182
|
+
end
|
208
183
|
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
isGradleErrorFileUploaded = true
|
222
|
-
UI.message("Slack Step Upload [android-error-logs.txt]")
|
223
|
-
else
|
224
|
-
isGradleErrorFileUploaded = false
|
225
|
-
UI.error("File does not exist [android-error-logs.txt]")
|
226
|
-
end
|
227
|
-
rescue => error
|
228
|
-
if error
|
229
|
-
UI.error("Something Error with Slack Upload File : [Step Upload Logcat.txt File to Slack]")
|
230
|
-
end
|
231
|
-
puts error.message
|
232
|
-
puts error.backtrace
|
233
|
-
end
|
184
|
+
begin
|
185
|
+
if(File.exist?("android-logs.txt"))
|
186
|
+
UI.message("android-logs.txt File exists ...")
|
187
|
+
client.files_upload(
|
188
|
+
channels: "#" + params[:slack_channel_name],
|
189
|
+
as_user: true,
|
190
|
+
file: Faraday::UploadIO.new('android-logs.txt', 'text/plain'),
|
191
|
+
title: "Android UI Testing (Gradle Debug File Result)",
|
192
|
+
filename: "android-logs.txt",
|
193
|
+
initial_comment: "Current UI Testing Build Result File Report [Gradle Debug Result]"
|
194
|
+
)
|
234
195
|
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
196
|
+
isGradleDebugFileUploaded = true
|
197
|
+
UI.message("Slack Step Upload [android-logs.txt]")
|
198
|
+
else
|
199
|
+
isGradleDebugFileUploaded = false
|
200
|
+
UI.error("File does not exist [android-logs.txt]")
|
201
|
+
end
|
202
|
+
rescue => error
|
203
|
+
if error
|
204
|
+
UI.error("Something Error with Slack Upload File : [Step Upload Logcat.txt File to Slack]")
|
205
|
+
end
|
206
|
+
puts error.message
|
207
|
+
puts error.backtrace
|
208
|
+
end
|
240
209
|
|
241
|
-
|
242
|
-
|
243
|
-
|
210
|
+
begin
|
211
|
+
if(File.exist?("android-error-logs.txt"))
|
212
|
+
UI.message("android-error-logs.txt File exists ...")
|
213
|
+
client.files_upload(
|
214
|
+
channels: "#" + params[:slack_channel_name],
|
215
|
+
as_user: true,
|
216
|
+
file: Faraday::UploadIO.new('android-error-logs.txt', 'text/plain'),
|
217
|
+
title: "Android UI Testing (Gradle Error File Result)",
|
218
|
+
filename: "android-error-logs.txt",
|
219
|
+
initial_comment: "Current UI Testing Build Result File Report [Gradle Error Result]"
|
220
|
+
)
|
244
221
|
|
245
|
-
|
246
|
-
|
247
|
-
|
222
|
+
isGradleErrorFileUploaded = true
|
223
|
+
UI.message("Slack Step Upload [android-error-logs.txt]")
|
224
|
+
else
|
225
|
+
isGradleErrorFileUploaded = false
|
226
|
+
UI.error("File does not exist [android-error-logs.txt]")
|
227
|
+
end
|
228
|
+
rescue => error
|
229
|
+
if error
|
230
|
+
UI.error("Something Error with Slack Upload File : [Step Upload Logcat.txt File to Slack]")
|
231
|
+
end
|
232
|
+
puts error.message
|
233
|
+
puts error.backtrace
|
234
|
+
end
|
248
235
|
|
249
|
-
|
236
|
+
# 13. Send Message With Files Summery
|
237
|
+
slackFinalMessageContent = "Files Status : With Time : " + time + " : \n"
|
238
|
+
if isGradleDebugFileUploaded
|
239
|
+
slackFinalMessageContent += "Gradle Debug File Uploaded \n"
|
240
|
+
end
|
241
|
+
|
242
|
+
if isGradleErrorFileUploaded
|
243
|
+
slackFinalMessageContent += "Gradle Error File Uploaded \n"
|
244
|
+
end
|
250
245
|
|
251
|
-
|
252
|
-
|
253
|
-
if params[:target_lane_name].to_s.length > 0
|
254
|
-
sh("fastlane", params[:target_lane_name])
|
246
|
+
if isLogcatFileUploaded
|
247
|
+
slackFinalMessageContent += "Logcat ADB Logging File Uploaded \n"
|
255
248
|
end
|
256
|
-
|
257
|
-
|
258
|
-
|
249
|
+
|
250
|
+
client.chat_postMessage(channel: "#" + params[:slack_channel_name], text: slackFinalMessageContent, as_user: true)
|
251
|
+
|
259
252
|
end
|
253
|
+
|
254
|
+
end
|
255
|
+
|
256
|
+
# 14. If the Gradle Task Success Then Run Specific Lane Else Send Slack Message The Build Failed
|
257
|
+
if gradle_task_result
|
258
|
+
if params[:target_lane_name].to_s.length > 0
|
259
|
+
sh("fastlane", params[:target_lane_name])
|
260
|
+
end
|
261
|
+
else
|
262
|
+
UI.message("Gradle Task Result Failed ...")
|
263
|
+
client.chat_postMessage(channel: "#" + params[:slack_channel_name], text: "Gradle Testing Task Failed Logs File Should be Uploaded", as_user: true)
|
260
264
|
end
|
261
265
|
|
262
266
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-android_reporter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.33
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yazan Tarifi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|