Xcode cloud sentry tweaks (#1459)

* Increase the sentry log level used in debug symbol uploading

* Set sentry max http retries to 5

* Revert: set sentry max http retries to 5 as it doesn't work

* Implement automatic sentry_upload_dif retries
This commit is contained in:
Stefan Ceriu 2023-08-08 12:07:55 +03:00 committed by GitHub
parent dd6d1f6e63
commit 611baf194a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 23 deletions

View File

@ -6,6 +6,7 @@ before_all do
ENV["FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT"] = "180"
ENV["FASTLANE_XCODE_LIST_TIMEOUT"] = "180"
ENV["SENTRY_LOG_LEVEL"] = "DEBUG"
end
lane :alpha do
@ -183,6 +184,7 @@ lane :config_production do
xcodegen(spec: "project.yml")
end
$sentry_retry=0
lane :upload_dsyms_to_sentry do |options|
auth_token = ENV["SENTRY_AUTH_TOKEN"]
UI.user_error!("Invalid Sentry Auth token.") unless !auth_token.to_s.empty?
@ -190,6 +192,7 @@ lane :upload_dsyms_to_sentry do |options|
dsym_path = options[:dsym_path]
UI.user_error!("Invalid DSYM path.") unless !dsym_path.to_s.empty?
begin
sentry_upload_dif(
auth_token: auth_token,
org_slug: 'element',
@ -197,6 +200,16 @@ lane :upload_dsyms_to_sentry do |options|
url: 'https://sentry.tools.element.io/',
path: dsym_path,
)
rescue => exception
$sentry_retry += 1
if $sentry_retry <= 5
UI.message "Sentry failed, retrying."
upload_dsyms_to_sentry options
else
raise exception
end
end
end
lane :release_to_github do

View File

@ -21,22 +21,6 @@ For _fastlane_ installation instructions, see [Installing _fastlane_](https://do
### app_store_release
```sh
[bundle exec] fastlane app_store_release
```
### build_release
```sh
[bundle exec] fastlane build_release
```
### unit_tests
```sh