fastlane-plugin-firebase_test_lab 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/fastlane/plugin/firebase_test_lab/actions/firebase_test_lab_ios_xctest.rb +6 -3
- data/lib/fastlane/plugin/firebase_test_lab/helper/storage.rb +3 -2
- data/lib/fastlane/plugin/firebase_test_lab/module.rb +1 -1
- data/lib/fastlane/plugin/firebase_test_lab/options.rb +3 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3aff51d27711e97c7fcf6bbcf5f0bb043d9736bfba007b475f341087be5f618
|
4
|
+
data.tar.gz: debb4bf7b7f1982383ac0edc0c4e1e53d3e511c7a34a4bcca4245a10de030498
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b21741fa6d9239822db61503673c65590e537021d0c3671216d9b5f849a7dcff0b3ef33d6556f8c0acb9c59a22b328e41db96d789713f9494dbf7c45059f1e8
|
7
|
+
data.tar.gz: b709f16e7190584969ee73940d6d0b483b9a24a118009853e2ebf42e71ab2dff50d4e2a8c0e6fd0b6026b44f74f8a9fcd228967992e10ed7f222c7921db0beb0
|
data/README.md
CHANGED
@@ -87,6 +87,7 @@ firebase_test_lab_ios_xctest(
|
|
87
87
|
|
88
88
|
- `app_path`: You may provide a different path in the local filesystem (e.g: `/path/to/app-bundle.zip`) or on Google Cloud Storage (`gs://your-bucket/path/to/app-bundle.zip`) that points to an app bundle as specified [here](https://firebase.google.com/docs/test-lab/ios/command-line#build_xctests_for_your_app). If a Google Cloud Storage path is used, the service account must have read access to such file.
|
89
89
|
- `gcp_project`: The Google Cloud project name for Firebase Test Lab to run on.
|
90
|
+
- `gcp_requests_timeout`: The timeout, in seconds, to use for all requests to the Google Cloud platform (e.g. uploading your app bundle ZIP). If this parameter is omitted, Google Cloud SDK's default requests timeout value will be used. If you are finding that your ZIP uploads are timing out due to the ZIP file being large and not completing within the set timeout time, increase this value.
|
90
91
|
- `oauth_key_file_path`: The path to the Google Cloud service account key. If not set, the Google application default credential will be used.
|
91
92
|
- `devices`: An array of devices for your app to be tested on. Each device is represented as a ruby hash, with `ios_model_id`, `ios_version_id`, `locale` and `orientation` properties, the first two of which are required. If not set, it will default to iPhone X on iOS 11.2. This array cannot be empty.
|
92
93
|
- `async`: If set to true, the action will not wait for the test results but exit immediately.
|
@@ -23,6 +23,7 @@ module Fastlane
|
|
23
23
|
|
24
24
|
def self.run(params)
|
25
25
|
gcp_project = params[:gcp_project]
|
26
|
+
gcp_requests_timeout = params[:gcp_requests_timeout]
|
26
27
|
oauth_key_file_path = params[:oauth_key_file_path]
|
27
28
|
gcp_credential = Fastlane::FirebaseTestLab::Credential.new(key_file_path: oauth_key_file_path)
|
28
29
|
|
@@ -42,11 +43,13 @@ module Fastlane
|
|
42
43
|
upload_spinner = TTY::Spinner.new("[:spinner] Uploading the app to GCS...", format: :dots)
|
43
44
|
upload_spinner.auto_spin
|
44
45
|
upload_bucket_name = ftl_service.get_default_bucket(gcp_project)
|
46
|
+
timeout = gcp_requests_timeout ? gcp_requests_timeout.to_i : nil
|
45
47
|
app_gcs_link = upload_file(params[:app_path],
|
46
48
|
upload_bucket_name,
|
47
49
|
"#{gcs_workfolder}/#{DEFAULT_APP_BUNDLE_NAME}",
|
48
50
|
gcp_project,
|
49
|
-
gcp_credential
|
51
|
+
gcp_credential,
|
52
|
+
timeout)
|
50
53
|
upload_spinner.success("Done")
|
51
54
|
end
|
52
55
|
|
@@ -71,9 +74,9 @@ module Fastlane
|
|
71
74
|
wait_for_test_results(ftl_service, gcp_project, matrix_id, params[:async])
|
72
75
|
end
|
73
76
|
|
74
|
-
def self.upload_file(app_path, bucket_name, gcs_path, gcp_project, gcp_credential)
|
77
|
+
def self.upload_file(app_path, bucket_name, gcs_path, gcp_project, gcp_credential, gcp_requests_timeout)
|
75
78
|
file_name = "gs://#{bucket_name}/#{gcs_path}"
|
76
|
-
storage = Fastlane::FirebaseTestLab::Storage.new(gcp_project, gcp_credential)
|
79
|
+
storage = Fastlane::FirebaseTestLab::Storage.new(gcp_project, gcp_credential, gcp_requests_timeout)
|
77
80
|
storage.upload_file(File.expand_path(app_path), bucket_name, gcs_path)
|
78
81
|
return file_name
|
79
82
|
end
|
@@ -8,10 +8,11 @@ module Fastlane
|
|
8
8
|
|
9
9
|
private_constant :GCS_OAUTH_SCOPES
|
10
10
|
|
11
|
-
def initialize(gcp_project, credential)
|
11
|
+
def initialize(gcp_project, credential, gcp_requests_timeout)
|
12
12
|
credentials = credential.get_google_credential(GCS_OAUTH_SCOPES)
|
13
13
|
@client = Google::Cloud::Storage.new(project_id: gcp_project,
|
14
|
-
credentials: credentials
|
14
|
+
credentials: credentials,
|
15
|
+
timeout: gcp_requests_timeout)
|
15
16
|
end
|
16
17
|
|
17
18
|
def upload_file(source_path, destination_bucket, destination_path)
|
@@ -8,6 +8,9 @@ module Fastlane
|
|
8
8
|
FastlaneCore::ConfigItem.new(key: :gcp_project,
|
9
9
|
description: "Google Cloud Platform project name",
|
10
10
|
optional: false),
|
11
|
+
FastlaneCore::ConfigItem.new(key: :gcp_requests_timeout,
|
12
|
+
description: "The timeout (in seconds) to use for all Google Cloud requests (such as uploading your tests ZIP)",
|
13
|
+
optional: true),
|
11
14
|
FastlaneCore::ConfigItem.new(key: :app_path,
|
12
15
|
description: "Path to the app, either on the filesystem or GCS address (gs://)",
|
13
16
|
default_value:
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-firebase_test_lab
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shihua Zheng
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-03-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|