允许 CI 运行快车道的download_dsyms操作?



我正在尝试在Circleci中运行计划的工作流,该工作流将从iTunes/appStore Connect下载我的应用程序的DSYMS,然后将其上传到Firebase的Crashlytics,但fastlane要求我的Apple密码 - 以及我的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,是这样定义的车道:

  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

我的(修剪(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?


edit :如果我将密码添加为FASTLANE_PASSWORD环境变量,则构建仍然失败,要求提供2FA令牌。

[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 URL的支持。和您现在可以使用版本 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"
)

您需要定义 fastlane_password 环境变量。这是Apple开发人员帐户密码。您的App Store Connect/Apple Developer Portal密码,通常还需要设置FastLane_user变量

upload_to_testflight - 这使用fastlane_apple_application_specific_passific_password上传二进制

lane: refresh_dsyms do
  download_dsyms                           
end

此操作在IPA被Apple重新编译后,从App Store Connect下载DSYM文件。此操作需要 fastlane_password

相关内容

  • 没有找到相关文章

最新更新