fastlane-plugin-android_testlab_script_swit 0.1.35 → 0.1.36

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: d6d51c6fa24e37d820108bdd91abfd31b797ccf6536963fe29c08abc9ea32531
4
- data.tar.gz: 7ba826c9e0b4d72bf21bdd8cf9d9169b96bd1b7f79dec126e9e2a1004670c125
3
+ metadata.gz: 1a167646f0169a46f2c26740c662d7a3402e583097111f0c438167cfc46252da
4
+ data.tar.gz: 6e8ae6313cac3b15375898ccf34505ea7a2a270d71676e199a9f8284768e7c6f
5
5
  SHA512:
6
- metadata.gz: d64285bbb1b4dcdf2da02a4d39a123b500f3ed7d90045f947e86cdb1ec9c2c23fd620db3c4c96f722e4433924a9d97b91bcb11b87825437952df271f35ccfe3a
7
- data.tar.gz: a2b1cc415986e5cc8c90c918f593631848eaf505ae2506a26980afe1a06dc5fd9a3d373117aa476ec2ae631c1a8e31a3d82504f9f490924eca9bb6982f8f2658
6
+ metadata.gz: 0b8dd79b4caa957ca9cf6f0054d6937eae31059dc24849e6f3e0b2ff34e910dfb53f4ab47adf4ba3045b2a8ae36db86d6dca4c85427ef621c37c096789579bd1
7
+ data.tar.gz: 304c228be70e798930155911d4f0d514fa87e133798927186efad5c1229049776ab9fccec4a4204559c0991e76af7d6e1491b8217eefb96ae7f407869088e1af
@@ -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
@@ -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.35"
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.35
4
+ version: 0.1.36
5
5
  platform: ruby
6
6
  authors:
7
7
  - 나비이쁜이