fastlane-plugin-android_reporter 0.1.33 → 0.1.34
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: b11bd5afc304d64317d63d89038f5aa5f4ea685a713fecb6b3e742e5adbc4b66
|
4
|
+
data.tar.gz: 82c87575e9ec8e988abd5ed535d3e8260896a8a3577239160457946e88239a05
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7aab5363f08ccc2b0953ec3c7fcb098230eaa7c0c6150f921d7db6aa0259e4445b96db137ec27d3f95820e85249e51ea991ca17d2899c0c855ccfb525b4f8eed
|
7
|
+
data.tar.gz: be4ad6bdd4bc014428deca6b8fb4bccfd5cbd3c228165b671601e89f05ef6fd1ef39d9a6efa28103877e19b86238d9f0b0a194492b1cda738cc9df4f6bc98fd1
|
@@ -112,23 +112,51 @@ module Fastlane
|
|
112
112
|
if gradle_task_result
|
113
113
|
UI.message("Gradle Task Finished Successfully ...")
|
114
114
|
if params[:generate_adb_file]
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
end
|
115
|
+
UI.message([
|
116
|
+
"Android Reporter Started to Save Logcat Logs From ADB Connection Server",
|
117
|
+
"ADB Reporting File : [logcat.txt]"
|
118
|
+
])
|
119
|
+
else
|
120
|
+
UI.message("Gradle Task Tests Failed ...")
|
122
121
|
end
|
123
122
|
end
|
123
|
+
|
124
|
+
Thread.new do
|
125
|
+
Process.fork do
|
126
|
+
sh("adb logcat -d > logcat.txt kill-server")
|
127
|
+
begin
|
128
|
+
UI.message("Slack Messages Bot Upload Files Tasks Started ....")
|
129
|
+
if(File.exist?("logcat.txt"))
|
130
|
+
UI.message("logcat.txt File exists ...")
|
131
|
+
client.files_upload(
|
132
|
+
channels: "#" + params[:slack_channel_name],
|
133
|
+
as_user: true,
|
134
|
+
file: Faraday::UploadIO.new('logcat.txt', 'text/plain'),
|
135
|
+
title: "Android UI Testing (ADB Logcat Result)",
|
136
|
+
filename: "logcat.txt",
|
137
|
+
initial_comment: "Current UI Testing Build Result File Report [logcat.txt]"
|
138
|
+
)
|
139
|
+
|
140
|
+
isLogcatFileUploaded = true
|
141
|
+
UI.message("Slack Step Upload [logcat.txt]")
|
142
|
+
else
|
143
|
+
isLogcatFileUploaded = false
|
144
|
+
UI.error("File does not exist [logcat.txt]")
|
145
|
+
end
|
146
|
+
rescue => error
|
147
|
+
if error
|
148
|
+
UI.error("Something Error with Slack Upload File : [Step Upload Logcat.txt File to Slack]")
|
149
|
+
end
|
150
|
+
puts error.message
|
151
|
+
puts error.backtrace
|
152
|
+
end
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
124
156
|
end
|
125
|
-
rescue
|
157
|
+
rescue => error
|
126
158
|
UI.error("Gradle Task Finished With Error ...")
|
127
|
-
|
128
|
-
Process.fork do
|
129
|
-
sh("adb logcat -e > logcat.txt kill-server")
|
130
|
-
end
|
131
|
-
end
|
159
|
+
puts error.backtrace
|
132
160
|
end
|
133
161
|
|
134
162
|
# 10. Generate Gradle Tasks (Failed and Success Files)
|
@@ -153,34 +181,6 @@ module Fastlane
|
|
153
181
|
# 12. Upload Files to Slack if The Build Failed
|
154
182
|
if gradle_task_result == false
|
155
183
|
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
|
-
)
|
169
|
-
|
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
|
178
|
-
UI.error("Something Error with Slack Upload File : [Step Upload Logcat.txt File to Slack]")
|
179
|
-
end
|
180
|
-
puts error.message
|
181
|
-
puts error.backtrace
|
182
|
-
end
|
183
|
-
|
184
184
|
begin
|
185
185
|
if(File.exist?("android-logs.txt"))
|
186
186
|
UI.message("android-logs.txt File exists ...")
|
@@ -256,11 +256,12 @@ module Fastlane
|
|
256
256
|
# 14. If the Gradle Task Success Then Run Specific Lane Else Send Slack Message The Build Failed
|
257
257
|
if gradle_task_result
|
258
258
|
if params[:target_lane_name].to_s.length > 0
|
259
|
+
client.chat_postMessage(channel: "#" + params[:slack_channel_name], text: "Testing Result Success : [Fastlane Will Execute this Lane (" + params[:target_lane_name] + ") To Send Build]", as_user: true)
|
259
260
|
sh("fastlane", params[:target_lane_name])
|
260
261
|
end
|
261
262
|
else
|
262
263
|
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)
|
264
|
+
client.chat_postMessage(channel: "#" + params[:slack_channel_name], text: "Testing Result Failed : Gradle Testing Task Failed Logs File Should be Uploaded", as_user: true)
|
264
265
|
end
|
265
266
|
|
266
267
|
end
|