fastlane-plugin-aws_device_farm 0.3.16.pre.alpha.pre.126 → 0.3.18

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: 3592492dc92fa15371839ee16fcf46571f98bb6c414bfbb6502df51c19acfa3a
4
- data.tar.gz: c0439e45075f4306f284de74c4cbe00c8575fe9ee94394d338b36e7dc26d6181
3
+ metadata.gz: fdfb6b44f19b68eca5ba5cddee91a4137577776a04b8b91f961c5adc03fb1065
4
+ data.tar.gz: 0f5ed264ae3df7e3936513124085113f2c822280387f723f3221dfd734143b25
5
5
  SHA512:
6
- metadata.gz: 9de7694004d8d0097a5af6e26088d0699daf0fe6ca0f939ce4c5b23a3a6044585dd174a328a42fc0fbd0966d02adeb34e09a997fa3ea92a6381c0173e8cd5952
7
- data.tar.gz: ae83104a17eaf3aa51980a3c6debbaabd9ae21e55b2757a0e43c90c48ac18bdc2dc6ec855fc53b0b602f84ad060c66d7a81c7e77e7e06086c763ffd2024f1538
6
+ metadata.gz: df50e1343e228c337fdc7eb1de8ef41a7f688e8bca5dc04c1667fd3585866001c15269fcabb9014461725187918b2ef3838a37db0e0ff087d46c904ad21a8783
7
+ data.tar.gz: 8ff8df8f266d85128b9e27de1eb5964db568333925edb71f7a75c11a7d555a1600327be60ca077e0682e70ee723b68723be2b97d5a30acaba4ca143d5539e7c7
@@ -18,7 +18,6 @@ module Fastlane
18
18
  # Fetch the device pool.
19
19
  device_pool = fetch_device_pool project, params[:device_pool]
20
20
  raise "Device pool '#{params[:device_pool]}' not found. 🙈" if device_pool.nil?
21
-
22
21
  # Create the upload.
23
22
  path = File.expand_path(params[:binary_path])
24
23
  type = File.extname(path) == '.apk' ? 'ANDROID_APP' : 'IOS_APP'
@@ -86,6 +85,12 @@ module Fastlane
86
85
 
87
86
  run
88
87
  end
88
+
89
+ # Get the network profile from params if value is provided
90
+ if params[:network_profile_arn]
91
+ configuration[:network_profile_arn] = params[:network_profile_arn]
92
+ end
93
+
89
94
  # rubocop:enable Metrics/BlockNesting
90
95
  #
91
96
  #####################################################
@@ -224,6 +229,15 @@ module Fastlane
224
229
  is_string: true,
225
230
  optional: false
226
231
  ),
232
+ FastlaneCore::ConfigItem.new(
233
+ key: :network_profile_arn,
234
+ env_name: 'FL_AWS_DEVICE_FARM_NETWORK_PROFILE_ARN',
235
+ description: 'Network profile arn you want to use for running the applications',
236
+ default_value: nil,
237
+ optional: false
238
+ is_string: true,
239
+ optional: false
240
+ ),
227
241
  FastlaneCore::ConfigItem.new(
228
242
  key: :wait_for_completion,
229
243
  env_name: 'FL_AWS_DEVICE_FARM_WAIT_FOR_COMPLETION',
@@ -310,6 +324,36 @@ module Fastlane
310
324
  is_string: false,
311
325
  optional: true,
312
326
  default_value: false
327
+ ),
328
+ FastlaneCore::ConfigItem.new(
329
+ key: :artifact,
330
+ env_name: 'FL_ALLOW_ARTIFACT',
331
+ description: 'Do you download Artifact?',
332
+ is_string: false,
333
+ optional: true,
334
+ default_value: false
335
+ ),
336
+ FastlaneCore::ConfigItem.new(
337
+ key: :artifact_output_dir,
338
+ env_name: 'FL_ARTIFACT_OUTPUT_DIR',
339
+ description: 'Artifact output directory',
340
+ is_string: true,
341
+ optional: true,
342
+ default_value: "./test_outputs"
343
+ ),
344
+ FastlaneCore::ConfigItem.new(
345
+ key: :artifact_types,
346
+ env_name: 'FL_ARTIFACT_TYPES',
347
+ description: 'Download Artifact types',
348
+ is_string: false,
349
+ type: Array,
350
+ optional: true,
351
+ default_value: [],
352
+ verify_block: proc do |value|
353
+ valid_values = ['LOG',
354
+ 'SCREENSHOT']
355
+ raise "Artifact type concludes invalid values are: '#{(value - valid_values)}'. 🙈".red unless (value - valid_values).empty?
356
+ end
313
357
  )
314
358
  ]
315
359
  end
@@ -375,7 +419,6 @@ module Fastlane
375
419
  })
376
420
  device_pools.device_pools.detect { |p| p.name == device_pool }
377
421
  end
378
-
379
422
  def self.schedule_run(name, project, device_pool, upload, test_upload, type, params)
380
423
  # Prepare the test hash depening if you passed the test apk.
381
424
  test_hash = { type: 'BUILTIN_FUZZ' }
@@ -401,7 +444,8 @@ module Fastlane
401
444
 
402
445
  configuration_hash = {
403
446
  billing_method: params[:billing_method],
404
- locale: params[:locale]
447
+ locale: params[:locale],
448
+ network_profile_arn: params[:network_profile_arn]
405
449
  }
406
450
 
407
451
  @client.schedule_run({
@@ -456,6 +500,30 @@ module Fastlane
456
500
  end
457
501
  rows << [status, j.name, j.device.form_factor, j.device.platform, j.device.os]
458
502
 
503
+ # artifact
504
+ artifact_support_types = %w(LOG SCREENSHOT)
505
+ params[:artifact_types].each do |type|
506
+ next unless artifact_support_types.include?(type) && params[:artifact]
507
+
508
+ artifact = @client.list_artifacts({
509
+ arn: j.arn,
510
+ type: type
511
+ })
512
+
513
+ artifact.artifacts.each do |artifact|
514
+ case type
515
+ when "LOG"
516
+ file_name = "#{artifact.name}.#{artifact.extension}"
517
+ when "SCREENSHOT"
518
+ file_name = "#{artifact.name}.#{artifact.extension}"
519
+ end
520
+
521
+ file_dir_path = "#{params[:artifact_output_dir]}/#{j.name}/#{j.device.os}"
522
+ Helper::AwsDeviceFarmHelper.get_artifact(url: artifact.url, file_dir_path: file_dir_path, file_name: file_name)
523
+ end
524
+ end
525
+
526
+ # test suites
459
527
  suite = @client.list_suites({
460
528
  arn: j.arn
461
529
  })
@@ -1,5 +1,6 @@
1
1
  require 'rexml/document'
2
2
  require 'fileutils'
3
+ require 'open-uri'
3
4
 
4
5
  module Fastlane
5
6
  module Helper
@@ -46,6 +47,17 @@ module Fastlane
46
47
  end
47
48
  end
48
49
 
50
+ # get Artifact
51
+ def self.get_artifact(url:, file_dir_path:, file_name:)
52
+ file_path = "#{file_dir_path}/#{file_name}"
53
+ FileUtils.mkdir_p(File.dirname(file_path))
54
+
55
+ open(url) do |file|
56
+ open(file_path, "w+b") do |out|
57
+ out.write(file.read)
58
+ end
59
+ end
60
+ end
49
61
  end
50
62
  end
51
63
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module AwsDeviceFarm
3
- VERSION = "0.3.16"
3
+ VERSION = "0.3.18"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-aws_device_farm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.16.pre.alpha.pre.126
4
+ version: 0.3.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Helmut Januschka
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-04 00:00:00.000000000 Z
11
+ date: 2020-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk
@@ -108,7 +108,7 @@ dependencies:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
- description:
111
+ description:
112
112
  email: helmut@januschka.com
113
113
  executables: []
114
114
  extensions: []
@@ -125,7 +125,7 @@ homepage: https://github.com/hjanuschka/fastlane-plugin-aws_device_farm
125
125
  licenses:
126
126
  - MIT
127
127
  metadata: {}
128
- post_install_message:
128
+ post_install_message:
129
129
  rdoc_options: []
130
130
  require_paths:
131
131
  - lib
@@ -136,13 +136,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
136
136
  version: '0'
137
137
  required_rubygems_version: !ruby/object:Gem::Requirement
138
138
  requirements:
139
- - - ">"
139
+ - - ">="
140
140
  - !ruby/object:Gem::Version
141
- version: 1.3.1
141
+ version: '0'
142
142
  requirements: []
143
- rubyforge_project:
144
- rubygems_version: 2.7.7
145
- signing_key:
143
+ rubygems_version: 3.0.8
144
+ signing_key:
146
145
  specification_version: 4
147
146
  summary: Run UI Tests on AWS Devicefarm
148
147
  test_files: []