CircleCIのWEB設定
環境変数
- FASTLANE_ITC_TEAM_ID
- FASTLANE_PASSWORD
- DEPLOYGATE_API_TOKEN
- DEPLOYGATE_USER
- DEPLOYGATE_DISTRIBUTION_KEY
Keychain
iPhone DistributionのKeychainを設定する
設定ファイル
Gemfile
source "https://rubygems.org"
gem "cocoapods", "1.1.0.rc.2"
gem "fastlane"
circle.yml
machine:
timezone: Asia/Tokyo
xcode:
version: '8.0'
dependencies:
cache_directories:
- "/Users/distiller/.cocoapods/"
test:
override:
- echo 'no test'
deployment:
develop:
branch: develop
commands:
- bundle exec fastlane adhoc --verbose
master:
branch: master
commands:
- bundle exec fastlane adhoc --verbose
- bundle exec fastlane beta --verbose
- git push git@github.com:dessart/insta-app.git master -f
Fastfile
fastlane_version "1.104.0"
default_platform :ios
platform :ios do
lane :adhoc do
cert
sigh(force: true)
gym(scheme: "Techinsight", configuration: "AdHoc")
deploygate
end
lane :beta do
cert
sigh(force: true)
gym(scheme: "Techinsight", configuration: "Release")
pilot(skip_waiting_for_build_processing: true)
end
lane :release do
cert
sigh(force: true)
gym(scheme: "Techinsight", configuration: "Release")
deliver(skip_screenshots: true, skip_metadata: true)
end
lane :refresh_dsyms do
download_dsyms # Download dSYM files from iTC
upload_symbols_to_crashlytics # Upload them to Crashlytics
clean_build_artifacts # Delete the local dSYM files
end
end
circle.ymlのCocoapodsのキャッシュ設定はこちらを参考にしました。
https://lebedev.cc/speeding-up-ios-builds-on-circleci/
ハマリポイント
Automatically manage signingのチェックを外す
https://docs.fastlane.tools/codesigning/getting-started/ を参考に以下の作業を行ったほうがいい場合がある。
mobileprovisionをプロジェクトに含める
CircleCIはmobileprovisionを参考にInstall Code Signing Credentialsを実地するためsighで生成されるmobileprovisionがプロジェクトに含まれる必要がある。
$ sigh --development
$ sigh --adhoc
$ sigh
mobileprovisionが3つなのにConfigurationsが2つだと困るため、Configurationsを増やす。