fastlane-plugin-android_testlab_script_swit 0.1.34 → 0.1.36

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: b6a3f487bafb69e74668a67bd34c756870f37e53c44481eb913f56e6d044de94
4
- data.tar.gz: 2fc7999c98012d8b637020bc7edaf12031102f0eb0fa35f4aa0eaded7327caec
3
+ metadata.gz: 1a167646f0169a46f2c26740c662d7a3402e583097111f0c438167cfc46252da
4
+ data.tar.gz: 6e8ae6313cac3b15375898ccf34505ea7a2a270d71676e199a9f8284768e7c6f
5
5
  SHA512:
6
- metadata.gz: e0f9b19385ae2fea40a5291e1ae4c901364c16d36aba6d7ca97ad602508616553d9f0a499edf2d3657f65dcb68d96a4083a7ad726b4bac0b290c33f6bb3530cb
7
- data.tar.gz: de5d8f2e8439d16bc3a9fdbc895a9a0297e13a4cc8c571aee1f33ea72c93a9d7dd429e0eb466b026c2c6a7ac8eef3cdb1a2c815c52ec07caa56b2ceff0528adc
6
+ metadata.gz: 0b8dd79b4caa957ca9cf6f0054d6937eae31059dc24849e6f3e0b2ff34e910dfb53f4ab47adf4ba3045b2a8ae36db86d6dca4c85427ef621c37c096789579bd1
7
+ data.tar.gz: 304c228be70e798930155911d4f0d514fa87e133798927186efad5c1229049776ab9fccec4a4204559c0991e76af7d6e1491b8217eefb96ae7f407869088e1af
@@ -17,7 +17,7 @@ module Fastlane
17
17
  Helper.config(params[:project_id])
18
18
 
19
19
  # Activate service account
20
- Helper.authenticate(params[:gcloud_service_key_file])
20
+ Helper.authenticate(params[:gcloud_key_file])
21
21
 
22
22
  # RoboScriptOption Add
23
23
  robo_script_option = params[:robo_script_path].nil? ? "" : "--robo-script #{params[:robo_script_path]} "
@@ -36,20 +36,25 @@ module Fastlane
36
36
  "--format=json 1>#{Helper.if_need_dir(params[:console_log_file_name])}"
37
37
  )
38
38
 
39
- json = JSON.parse(File.read(params[:console_log_file_name]))
40
- UI.message("Test status: #{json}")
41
-
42
- # Fetch results
43
- download_dir = params[:download_dir]
44
- if download_dir
45
- UI.message("Fetch results from Firebase Test Lab results bucket")
46
- json.each do |status|
47
- axis = status["axis_value"]
48
- Helper.if_need_dir("#{download_dir}/#{axis}")
49
- Helper.copy_from_gcs("#{results_bucket}/#{results_dir}/#{axis}", download_dir)
50
- Helper.set_public("#{results_bucket}/#{results_dir}/#{axis}")
51
- end
52
- end
39
+ swit_webhook_url = params[:swit_webhook_url]
40
+ swit_webhook_payload = params[:swit_webhook_payload]
41
+
42
+ HTTParty.post(swit_webhook_url, body: swit_webhook_payload.to_json, headers: { 'Content-Type' => 'application/json' })
43
+
44
+ # json = JSON.parse(File.read(params[:console_log_file_name]))
45
+ # UI.message("Test status: #{json}")
46
+ #
47
+ # # Fetch results
48
+ # download_dir = params[:download_dir]
49
+ # if download_dir
50
+ # UI.message("Fetch results from Firebase Test Lab results bucket")
51
+ # json.each do |status|
52
+ # axis = status["axis_value"]
53
+ # Helper.if_need_dir("#{download_dir}/#{axis}")
54
+ # Helper.copy_from_gcs("#{results_bucket}/#{results_dir}/#{axis}", download_dir)
55
+ # Helper.set_public("#{results_bucket}/#{results_dir}/#{axis}")
56
+ # end
57
+ # end
53
58
 
54
59
  UI.message("Finish Action")
55
60
  end
@@ -87,7 +92,7 @@ module Fastlane
87
92
 
88
93
  # gcloud_key_file (true)
89
94
  FastlaneCore::ConfigItem.new(key: :gcloud_key_file,
90
- env_name: "GCLOUD_SERVICE_KEY_FILE",
95
+ env_name: "GCLOUD_KEY_FILE",
91
96
  description: "File path containing the gcloud auth key. Default: Created from GCLOUD_SERVICE_KEY environment variable",
92
97
  is_string: true,
93
98
  optional: false),
@@ -146,6 +151,20 @@ module Fastlane
146
151
  type: String,
147
152
  optional: false),
148
153
 
154
+ # swit_webhook url (true)
155
+ FastlaneCore::ConfigItem.new(key: :swit_webhook_url,
156
+ env_name: "SWIT_WEBHOOK_URL",
157
+ description: "The Swit WebHOOK URL",
158
+ type: String,
159
+ optional: true),
160
+
161
+ # swit_webhook payload (false)
162
+ FastlaneCore::ConfigItem.new(key: :swit_webhook_payload,
163
+ env_name: "SWIT_WEBHOOK_PAYLOAD",
164
+ description: "The Swit WebHOOK PAYLOAD",
165
+ type: String,
166
+ optional: true),
167
+
149
168
  # test apk (false)
150
169
  FastlaneCore::ConfigItem.new(key: :app_test_apk,
151
170
  env_name: "APP_TEST_APK",
@@ -105,6 +105,10 @@ module Fastlane
105
105
  return success, body
106
106
  end
107
107
 
108
+ def self.swit_body_text(body_text)
109
+
110
+ end
111
+
108
112
  def self.make_github_text(json, project_id, bucket, dir, test_type)
109
113
  prefix = "<img src=\"https://github.com/cats-oss/fastlane-plugin-firebase_test_lab_android/blob/master/art/firebase_test_lab_logo.png?raw=true\" width=\"65%\" loading=\"lazy\" />"
110
114
  cells = json.map { |data|
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module AndroidTestlabScriptSwit
3
- VERSION = "0.1.34"
3
+ VERSION = "0.1.36"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-android_testlab_script_swit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.34
4
+ version: 0.1.36
5
5
  platform: ruby
6
6
  authors:
7
7
  - 나비이쁜이