fastlane-plugin-android_testlab_script_swit 0.1.68 → 0.1.70
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de8233bdc8f198d8b8223f3fd4ec74eb841905ab172f18d0a2420da477fdb83d
|
4
|
+
data.tar.gz: 7ad6f0835dd7996187f52978c5431fd3e475c5ccca339ca11d122b21df8a9ba8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55eee9a591b067d06841c0f252ffcd76d59eb218bc200e4c7d223f58e3d9a38655aa2a239ac0769311a46a75a61dc79917265df7c457abe4ca1c759060b12288
|
7
|
+
data.tar.gz: 95376f74c419056f37a3bf5e8fb25d8395b29a08991ea98d1a6a48a9d149b81f897109e29718a99a7db4171c2c3c7b1456d98e4664ef9a9c53854ee203367f0a
|
data/lib/fastlane/plugin/android_testlab_script_swit/actions/android_testlab_script_swit_action.rb
CHANGED
@@ -12,19 +12,19 @@ module Fastlane
|
|
12
12
|
def self.run(params)
|
13
13
|
UI.message("Start Action")
|
14
14
|
|
15
|
-
results_bucket = params[:firebase_test_lab_results_bucket] || "#{params[:project_id]}_test_results"
|
16
|
-
results_dir = params[:firebase_test_lab_results_dir] || "firebase_test_result_#{DateTime.now.strftime('%Y-%m-%d-%H:%M:%S')}"
|
15
|
+
# results_bucket = params[:firebase_test_lab_results_bucket] || "#{params[:project_id]}_test_results"
|
16
|
+
# results_dir = params[:firebase_test_lab_results_dir] || "firebase_test_result_#{DateTime.now.strftime('%Y-%m-%d-%H:%M:%S')}"
|
17
17
|
|
18
18
|
# Set target project
|
19
|
-
Helper.config(params[:project_id])
|
19
|
+
# Helper.config(params[:project_id])
|
20
20
|
|
21
21
|
# Activate service account
|
22
|
-
Helper.authenticate(params[:gcloud_key_file])
|
22
|
+
# Helper.authenticate(params[:gcloud_key_file])
|
23
23
|
|
24
24
|
# RoboScriptOption Add
|
25
|
-
robo_script_option = params[:robo_script_path].nil? ? "" : "--robo-script #{params[:robo_script_path]} "
|
25
|
+
# robo_script_option = params[:robo_script_path].nil? ? "" : "--robo-script #{params[:robo_script_path]} "
|
26
26
|
|
27
|
-
UI.message(params[:gcloud_components_channel])
|
27
|
+
# UI.message(params[:gcloud_components_channel])
|
28
28
|
|
29
29
|
# Run Firebase Test Lab
|
30
30
|
# Helper.run_tests(params[:gcloud_components_channel], "--type #{params[:type]} "\
|
@@ -43,8 +43,6 @@ module Fastlane
|
|
43
43
|
# json = JSON.parse(File.read(params[:console_log_file_name]))
|
44
44
|
# UI.message("Test status: #{json}")
|
45
45
|
|
46
|
-
#
|
47
|
-
payload_string = params[:swit_webhook_payload]
|
48
46
|
|
49
47
|
# 각 JSON 객체에 대해 반복
|
50
48
|
# json.each do |item|
|
@@ -87,10 +85,27 @@ module Fastlane
|
|
87
85
|
# Helper.set_public("#{results_bucket}/#{results_dir}/#{axis}")
|
88
86
|
# end
|
89
87
|
# end
|
90
|
-
|
88
|
+
|
89
|
+
payload_string = +{
|
90
|
+
{"type" => "rt_section", "indent" => 1, "elements" => [{"type" => "rt_text", "content" => "Device#{index + 1}"}]},
|
91
|
+
{"type" => "rt_section", "indent" => 2, "elements" => [{"type" => "rt_text", "content" => "model : #{device[:model]}"}]},
|
92
|
+
{"type" => "rt_section", "indent" => 2, "elements" => [{"type" => "rt_text", "content" => "model : #{device[:version]}"}]},
|
93
|
+
{"type" => "rt_section", "indent" => 2, "elements" => [{"type" => "rt_text", "content" => "model : #{device[:locale]}"}]},
|
94
|
+
{"type" => "rt_section", "indent" => 2, "elements" => [{"type" => "rt_text", "content" => "model : #{device[:orientation]}"}]},
|
95
|
+
{"type" => "rt_section", "indent" => 2, "elements" => [{"type" => "rt_text", "content" => "model : #{outcome}"}]}
|
96
|
+
}
|
97
|
+
|
98
|
+
# 원래 받아오는 값
|
99
|
+
# payload_string = params[:swit_webhook_payload]
|
100
|
+
|
101
|
+
# Remove the closing square bracket from the original payload and add a comma
|
102
|
+
swit_webhook_payload = params[:swit_webhook_payload][0..-2] + ','
|
103
|
+
|
104
|
+
# Add the additional payload and close the square bracket
|
105
|
+
swit_webhook_payload += payload_string[1..-1]
|
91
106
|
|
92
107
|
# Swit Message
|
93
|
-
HTTParty.post(params[:swit_webhook_url], body: { body_text:
|
108
|
+
HTTParty.post(params[:swit_webhook_url], body: { body_text: params[:swit_webhook_payload] }.to_json, headers: { 'Content-Type' => 'application/json' })
|
94
109
|
|
95
110
|
UI.message("Finish Action")
|
96
111
|
end
|