fastlane-plugin-dynatrace 1.0.4 → 1.0.7

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: 99b5f6070d7eb68fccc4b912a89c4ae9a15814f041baa97c683a2f8c1b9e8590
4
- data.tar.gz: c547493757afd54cc2f256debbba3487dd73cfab0aa23c961b1a641220c18ab9
3
+ metadata.gz: 303492b26907fe0832d98d1216348562355deba9f8dd27172036c28647e82585
4
+ data.tar.gz: 7a1405e4547ca3780d113818969b23f469b67f635361bed1cbaf14aedeacc581
5
5
  SHA512:
6
- metadata.gz: 7b06bfc63cf1707d8e9d33d2c0f36046a848f43adfa1babac635e8dfb8a7d42dfc85cd19f25d49453de686c5577ab1910fe6f2a3fe77af885a97b926210d350d
7
- data.tar.gz: 594bd21d1c29fc5b59adda5307ba4a7b064fb345d4d984446ecc143732265757a1810db839c9dceb069f72d49c9cb2a19b7dbbc19d6fe54e1b3a9547c3e87e32
6
+ metadata.gz: 05a90824664bed687a50b8cf9c1bf8f737375a7160b2454788964cf483d81a1c2263ef0404da43824b9f614550405cd7227818b7a235850d58af515716008212
7
+ data.tar.gz: 226ea656e025793f328e840b65846c953f85194d96f22dbbfefd4bb76b94848e2a420917bbe342e98b5d4f5a31a7df2ef56eb3f4388f4ca346183e6c01fc4f19
data/README.md CHANGED
@@ -10,8 +10,6 @@ This project is a [_fastlane_](https://github.com/fastlane/fastlane) plugin. To
10
10
  fastlane add_plugin dynatrace
11
11
  ```
12
12
 
13
- ⚠️ The way Apple introduced the two-factor authentication interferes with a fully automated workflow. The workaround requires manual interaction. For more information, see **App Store Connect Two-Factor-Authentication** section below for details.
14
-
15
13
  ## About the Dynatrace fastlane plugin
16
14
  The Dynatrace fastlane plugin manages uploading symbol files (iOS, tvOS) or obfuscation mapping files (Android) to the Dynatrace cluster. Symbol and mapping files are used to make reported stack traces human-readable. The plugin also allows to download the latest dSYM files from App Store Connect, which enables full automation of the mobile app deployment, and the pre-processing of dSYM files, a step that is necessary for the Dynatrace cluster to be able to symbolicate.
17
15
 
@@ -38,22 +36,13 @@ Background: If your app is Bitcode-enabled, then the dSYMs that are generated du
38
36
 
39
37
  ### Automatically downloading dSYMs
40
38
 
41
- To fully automate the following five-step workflow, add the snippets below to the respective files and fill in the placeholders. Uploading the app the App Store Connect is a necessary prerequisite and either handled manually or by fastlane directly:
39
+ To fully automate the following five-step workflow, add the snippets below to the respective files and fill in the placeholders. Uploading the app to App Store Connect is a necessary prerequisite and either handled manually or by fastlane directly:
42
40
 
43
41
  1. Wait until the build is processed
44
42
  2. Download the resulting dSYM files
45
43
  3. Process dSYM files into the format that Dynatrace requires
46
44
  4. Upload processed dSYM files to Dynatrace
47
45
 
48
-
49
- #### AppFile
50
- Make sure the following information is present in `AppFile` to authenticate with App Store Connect.
51
-
52
- ```ruby
53
- app_identifier("com.yourcompany.yourappID") # bundle identifier of your app
54
- apple_id("user@email.com")
55
- ```
56
-
57
46
  #### Fastfile
58
47
  ```ruby
59
48
  dynatrace_process_symbols(
@@ -114,12 +103,10 @@ dynatrace_process_symbols(
114
103
  | version | The CFBundleVersion (iOS, tvOS) / versionCode (Android). Is also used for the dSYM download. | |
115
104
  | symbolsfile | Path to the dSYM file to be processed. If downloadDsyms is set, this is only a fallback. | |
116
105
  | server | The API endpoint for the Dynatrace environment (e.g. `https://environmentID.live.dynatrace.com` or `https://dynatrace-managed.com/e/environmentID`). | |
106
+ | cleanBuildArtifacts | Clean build artifacts after processing. | `true` |
107
+ | tempdir | (OPTIONAL) Custom temporary directory for the DTXDssClient. **The plugin does not take care of cleaning this directory.** | |
117
108
  | debugMode | Enable debug logging. | false |
118
109
 
119
- ## App Store Connect Two-Factor-Authentication
120
- When the plugin is used to download symbols from *App Store Connect* automatically (`downloadDsyms: true`), valid App Store Connect credentials with access to the dSYM files are required. The preferred method of doing so is by setting the `FASTLANE_USER` and `FASTLANE_PASSWORD` environment variables to their respective values.
121
-
122
- Apple started enforcing 2-Factor-Authentication for the *App Store Connect* API in February 2021. This [limits the ability to automate the symbol processing](https://github.com/fastlane/fastlane/discussions/17655), because it will most likely involve manual interaction, which is not suitable for CI automation. The only workaround at this point in time is to pre-generate a session and cache it in CI.
123
110
 
124
111
  ### Fastlane Session
125
112
  The full documentation for this can be found on the [fastlane docs](https://docs.fastlane.tools/best-practices/continuous-integration/#two-step-or-two-factor-auth
@@ -135,7 +122,7 @@ You can generate a session by running `fastlane spaceauth -u user@email.com` on
135
122
  Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.
136
123
 
137
124
  ## Tests
138
- This plugin includes a set of RSpec unit tests, which can be executed by running ` bundle exec rspec spec`.
125
+ This plugin includes a set of RSpec unit tests, which can be executed by running `bundle exec rspec spec`.
139
126
 
140
127
  ## Issues and Feedback
141
128
  For any other issues and feedback about this plugin, please submit it to this repository or contact [Dynatrace Support](https://support.dynatrace.com).
@@ -18,6 +18,7 @@ module Fastlane
18
18
  UI.message "Version string: #{params[:versionStr]}"
19
19
  UI.message "Version: #{params[:version]}"
20
20
  UI.message "Server URL: #{params[:server]}"
21
+ UI.message "Tempdir: #{params[:tempdir]}"
21
22
 
22
23
  UI.message "Checking AppFile for possible AppID"
23
24
  bundleId = CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier)
@@ -137,6 +138,7 @@ module Fastlane
137
138
  command << "server=\"#{Helper::DynatraceHelper.without_trailing_slash(params[:server])}\""
138
139
  command << "DTXLogLevel=ALL -verbose" if params[:debugMode] == true
139
140
  command << "forced=1" # if the file already exists
141
+ command << "tempdir=\"#{params[:tempdir]}\"" if params[:tempdir]
140
142
 
141
143
  # Create the full shell command to trigger the DTXDssClient
142
144
  shell_command = command.join(' ')
@@ -158,8 +160,10 @@ module Fastlane
158
160
  end
159
161
  })
160
162
 
161
- UI.message "Cleaning build artifacts"
162
- Fastlane::Actions::CleanBuildArtifactsAction.run(exclude_pattern: nil)
163
+ if params[:cleanBuildArtifacts]
164
+ UI.message "Cleaning build artifacts"
165
+ Fastlane::Actions::CleanBuildArtifactsAction.run(exclude_pattern: nil)
166
+ end
163
167
  end
164
168
 
165
169
  def self.description
@@ -266,6 +270,17 @@ module Fastlane
266
270
  UI.user_error!("Please provide your environment API endpoint. Pass using `server: 'server'`") unless (value and not value.empty?)
267
271
  end),
268
272
 
273
+ FastlaneCore::ConfigItem.new(key: :cleanBuildArtifacts,
274
+ env_name: "FL_UPLOAD_TO_DYNATRACE_CLEAN_BUILD_ARTIFACTS",
275
+ default_value: true,
276
+ is_string: false,
277
+ description: "Clean build artifacts after processing"),
278
+
279
+ FastlaneCore::ConfigItem.new(key: :tempdir,
280
+ env_name: "FL_UPLOAD_TO_DYNATRACE_TEMP_DIR",
281
+ description: "(OPTIONAL) Custom temporary directory for the DTXDssClient. The plugin does not take care of cleaning this directory",
282
+ optional: true),
283
+
269
284
  FastlaneCore::ConfigItem.new(key: :debugMode,
270
285
  env_name: "FL_UPLOAD_TO_DYNATRACE_DEBUG_MODE",
271
286
  description: "Enable debug logging",
@@ -2,7 +2,7 @@ require 'fastlane_core/ui/ui'
2
2
  require 'digest'
3
3
  require 'net/http'
4
4
  require 'tempfile'
5
- require 'uri'
5
+ require 'open-uri'
6
6
 
7
7
  module Fastlane
8
8
  UI = FastlaneCore::UI unless Fastlane.const_defined?("UI")
@@ -182,7 +182,7 @@ module Fastlane
182
182
 
183
183
  # for test mocking
184
184
  def self.save_to_tempfile(url)
185
- open(url)
185
+ URI.open(url)
186
186
  end
187
187
  end
188
188
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Dynatrace
3
- VERSION = "1.0.4"
3
+ VERSION = "1.0.7"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-dynatrace
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dynatrace LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-19 00:00:00.000000000 Z
11
+ date: 2022-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -167,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
167
167
  - !ruby/object:Gem::Version
168
168
  version: '0'
169
169
  requirements: []
170
- rubygems_version: 3.1.4
170
+ rubygems_version: 3.3.3
171
171
  signing_key:
172
172
  specification_version: 4
173
173
  summary: This action processes and uploads your symbol files to Dynatrace