gpt4 book ai didi

continuous-integration - 允许 CI 运行 faSTLane 的 download_dsyms 操作?

转载 作者:行者123 更新时间:2023-12-05 02:11:36 28 4
gpt4 key购买 nike

我正在尝试在 CircleCI 中运行计划的工作流,该工作流将从 iTunes/AppStore Connect 下载我的应用程序的 DSyms 并将它们上传到 Firebase 的 Crashlytics,但是 faSTLane 要求我的 Apple 密码 - 以及构建摊位:

[⠋] 🚀 [⠙] 🚀 [⠹] 🚀 [⠸] 🚀 [⠼] 🚀 [⠴] 🚀 [⠦] 🚀 [⠧] 🚀 [⠇] 🚀 [✔] 🚀 
[14:32:26]: Sending anonymous analytics information
[14:32:26]: Learn more at https://docs.fastlane.tools/#metrics
[14:32:26]: No personal or sensitive data is sent.
[14:32:26]: You can disable this by adding `opt_out_usage` at the top of your Fastfile
[14:32:26]: ------------------------------
[14:32:26]: --- Step: default_platform ---
[14:32:26]: ------------------------------
[14:32:26]: Driving the lane 'ios dsyms' 🚀
[14:32:26]: -----------------------------
[14:32:26]: --- Step: setup_circle_ci ---
[14:32:26]: -----------------------------
[14:32:26]: Creating temporary keychain: "fastlane_tmp_keychain".
[14:32:26]: Enabling match readonly mode.
[14:32:26]: -----------------------------------
[14:32:26]: --- Step: clean_build_artifacts ---
[14:32:26]: -----------------------------------
[14:32:26]: Cleaned up build artifacts 🐙
[14:32:26]: ----------------------------
[14:32:26]: --- Step: download_dsyms ---
[14:32:26]: ----------------------------
[14:32:26]: Login to App Store Connect (MY_APPLE_ID)
-------------------------------------------------------------------------------------
Please provide your Apple Developer Program account credentials
The login information you enter will be stored in your macOS Keychain
You can also pass the password using the `FASTLANE_PASSWORD` environment variable
See more information about it on GitHub: https://github.com/fastlane/fastlane/tree/master/credentials_manager
-------------------------------------------------------------------------------------
Password (for MY_APPLE_ID): **

我正在定义 FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORDFASTLANE_USERMATCH_PASSWORDPILOT_APPLE_ID 环境变量。

这足以运行 upload_to_testflight(skip_waiting_for_build_processing: true),但不能使 download_dsyms 工作。

我的.circleci/config.yml(复制在下面)基本上只运行faSTLane dsyms,一个 channel 定义如下:

  desc "Upload latest debug symbols to Crashlytics"
lane :dsyms do
clean_build_artifacts
download_dsyms(version: 'latest')
upload_symbols_to_crashlytics
clean_build_artifacts
end

我的.circleci/config.yml:

version: 2
jobs:
dsyms:
macos:
xcode: "10.2.1"
working_directory: /Users/distiller/project
environment:
FL_OUTPUT_DIR: output
FASTLANE_LANE: dsyms
shell: /bin/bash --login -o pipefail
steps:
- checkout
- restore_cache:
key: 1-gems-{{ checksum "Gemfile.lock" }}
- run: bundle check || bundle install --path vendor/bundle
- save_cache:
key: 1-gems-{{ checksum "Gemfile.lock" }}
paths:
- vendor/bundle
- run:
name: fastlane
command: bundle exec fastlane $FASTLANE_LANE
- store_artifacts:
path: output

workflows:
version: 2
scheduled-workflow:
triggers:
- schedule:
cron: "* 0 * * *"
filters:
branches:
only:
- testflight
jobs:
- dsyms

我的(其他 channel 被修剪)faSTLane/Fastfile:

default_platform(:ios)

platform :ios do
before_all do
setup_circle_ci
end

desc "Upload latest debug symbols to Crashlytics"
lane :dsyms do
clean_build_artifacts
download_dsyms(version: 'latest')
upload_symbols_to_crashlytics
clean_build_artifacts
end
end

如何让 CI 从 Apple 下载 DSyms?


编辑:如果我将我的密码添加为 FASTLANE_PASSWORD 环境变量,那么构建仍然无法请求 2FA token 。

[07:04:08]: Sending anonymous analytics information
[07:04:08]: Learn more at https://docs.fastlane.tools/#metrics
[07:04:08]: No personal or sensitive data is sent.
[07:04:08]: You can disable this by adding `opt_out_usage` at the top of your Fastfile
[07:04:08]: ------------------------------
[07:04:08]: --- Step: default_platform ---
[07:04:08]: ------------------------------
[07:04:08]: Driving the lane 'ios dsyms' 🚀
[07:04:08]: -----------------------------
[07:04:08]: --- Step: setup_circle_ci ---
[07:04:08]: -----------------------------
[07:04:08]: Creating temporary keychain: "fastlane_tmp_keychain".
[07:04:08]: Enabling match readonly mode.
[07:04:08]: -----------------------------------
[07:04:08]: --- Step: clean_build_artifacts ---
[07:04:08]: -----------------------------------
[07:04:08]: Cleaned up build artifacts 🐙
[07:04:08]: ----------------------------
[07:04:08]: --- Step: download_dsyms ---
[07:04:08]: ----------------------------
[07:04:08]: Login to App Store Connect (xxxxxxxx@example.com)
Two-factor Authentication (6 digits code) is enabled for account 'xxxxxxxx@example.com'
More information about Two-factor Authentication: https://support.apple.com/en-us/HT204915

If you're running this in a non-interactive session (e.g. server or CI)
check out https://github.com/fastlane/fastlane/tree/master/spaceship#2-step-verification

(Input `sms` to escape this prompt and select a trusted phone number to send the code as a text message)

(You can also set the environment variable `SPACESHIP_2FA_SMS_DEFAULT_PHONE_NUMBER` to automate this)
(Read more at: https://github.com/fastlane/fastlane/blob/master/spaceship/docs/Authentication.md#auto-select-sms-via-spaceship-2fa-sms-default-phone-number)

Please enter the 6 digit code:
+---------------------------+--------------------------------------------------------+
| Lane Context |
+---------------------------+--------------------------------------------------------+
| DEFAULT_PLATFORM | ios |
| PLATFORM_NAME | ios |
| LANE_NAME | ios dsyms |
| ORIGINAL_DEFAULT_KEYCHAIN | "/Users/distiller/Library/Keychains/login.keychain-db" |
+---------------------------+--------------------------------------------------------+

+------+-----------------------+-------------+
| fastlane summary |
+------+-----------------------+-------------+
| Step | Action | Time (in s) |
+------+-----------------------+-------------+
| 1 | default_platform | 0 |
| 2 | setup_circle_ci | 0 |
| 3 | clean_build_artifacts | 0 |
| 💥 | download_dsyms | 0 |
+------+-----------------------+-------------+

[07:04:09]: fastlane finished with errors

最佳答案

最后更新App Store Connect API 版本 1.6 添加了对获取 dSYM 网址的支持。和您现在可以使用 2.197.0 版本的 faSTLane 通过 AppStore Connect API 下载 dsyms

app_store_connect_api_key(
key_id: "D383SF739",
issuer_id: "6053b7fe-68a8-4acb-89be-165aa6465141",
key_filepath: "./AuthKey_D383SF739.p8"
)

download_dsyms(
app_identifier: "com.joshdholtz.example"
)

关于continuous-integration - 允许 CI 运行 faSTLane 的 download_dsyms 操作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57297176/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com