Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NT-424] Migrate HockeyApp to AppCenter #910

Merged
merged 12 commits into from
Oct 30, 2019
Merged
100 changes: 5 additions & 95 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ version: 2
xcode_version: &xcode_version 10.3.0
iphone_name: &iphone_name iPhone 8
fabric_sdk_version: &fabric_sdk_version 3.10.5
hockey_sdk_version: &hockey_sdk_version 5.1.4
store_hockey_sdk_version: &store_hockey_sdk_version echo "$HOCKEY_SDK_VERSION" > hockey_version.txt
store_fabric_sdk_version: &store_fabric_sdk_version echo "$FABRIC_SDK_VERSION" > fabric_version.txt
preload_simulator: &preload_simulator xcrun instruments -w "iPhone 8 (12.4) [" || true

Expand All @@ -19,7 +17,6 @@ base_job: &base_job
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
FABRIC_SDK_VERSION: *fabric_sdk_version
HOCKEY_SDK_VERSION: *hockey_sdk_version
IPHONE_NAME: *iphone_name
XCODE_VERSION: *xcode_version

Expand All @@ -44,15 +41,6 @@ jobs:
keys:
- fabric-sdk-cache-{{ checksum "fabric_version.txt" }}

- run:
name: Store Hockey SDK Version
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The AppCenter SDK is managed via Carthage, no need to cache this separately.

command: *store_hockey_sdk_version

- restore_cache:
name: Restore Hockey SDK
keys:
- hockey-sdk-cache-v1-{{ checksum "hockey_version.txt" }}

- run:
name: Store Xcode Version
command: xcodebuild -version > xcode_version.txt
Expand Down Expand Up @@ -84,12 +72,6 @@ jobs:
paths:
- "Frameworks/Fabric"

- save_cache:
name: Cache Hockey SDK
key: hockey-sdk-cache-v1-{{ checksum "hockey_version.txt" }}
paths:
- "Frameworks/HockeySDK"

- restore_cache:
name: Restore Bundler
keys:
Expand Down Expand Up @@ -132,15 +114,6 @@ jobs:
keys:
- fabric-sdk-cache-{{ checksum "fabric_version.txt" }}

- run:
name: Store Hockey SDK Version
command: *store_hockey_sdk_version

- restore_cache:
name: Restore Hockey SDK
keys:
- hockey-sdk-cache-v1-{{ checksum "hockey_version.txt" }}

- run:
name: Store Xcode Version
command: xcodebuild -version > xcode_version.txt
Expand Down Expand Up @@ -188,15 +161,6 @@ jobs:
keys:
- fabric-sdk-cache-{{ checksum "fabric_version.txt" }}

- run:
name: Store Hockey SDK Version
command: *store_hockey_sdk_version

- restore_cache:
name: Restore Hockey SDK
keys:
- hockey-sdk-cache-v1-{{ checksum "hockey_version.txt" }}

- run:
name: Store Xcode Version
command: xcodebuild -version > xcode_version.txt
Expand Down Expand Up @@ -242,15 +206,6 @@ jobs:
keys:
- fabric-sdk-cache-{{ checksum "fabric_version.txt" }}

- run:
name: Store Hockey SDK Version
command: *store_hockey_sdk_version

- restore_cache:
name: Restore Hockey SDK
keys:
- hockey-sdk-cache-v1-{{ checksum "hockey_version.txt" }}

- run:
name: Store Xcode Version
command: xcodebuild -version > xcode_version.txt
Expand Down Expand Up @@ -296,15 +251,6 @@ jobs:
keys:
- fabric-sdk-cache-{{ checksum "fabric_version.txt" }}

- run:
name: Store Hockey SDK Version
command: *store_hockey_sdk_version

- restore_cache:
name: Restore Hockey SDK
keys:
- hockey-sdk-cache-v1-{{ checksum "hockey_version.txt" }}

- run:
name: Store Xcode Version
command: xcodebuild -version > xcode_version.txt
Expand Down Expand Up @@ -347,7 +293,7 @@ jobs:
name: Deploy Beta
command: make beta

# Hockey and S3 bucket beta
# AppCenter and S3 bucket beta
beta:
<<: *base_job
steps:
Expand All @@ -367,15 +313,6 @@ jobs:
keys:
- fabric-sdk-cache-{{ checksum "fabric_version.txt" }}

- run:
name: Store Hockey SDK Version
command: *store_hockey_sdk_version

- restore_cache:
name: Restore Hockey SDK
keys:
- hockey-sdk-cache-v1-{{ checksum "hockey_version.txt" }}

- run:
name: Store Xcode Version
command: xcodebuild -version > xcode_version.txt
Expand Down Expand Up @@ -409,7 +346,7 @@ jobs:

- run:
name: Fastlane
command: bundle exec fastlane beta_match_gym_hockey_s3 --verbose
command: bundle exec fastlane beta_match_gym_appcenter_s3 --verbose
no_output_timeout: "30m" # 30 minutes

- run:
Expand All @@ -422,7 +359,7 @@ jobs:
- store_artifacts:
path: output

# Hockey Alpha
# AppCenter Alpha
alpha:
<<: *base_job
steps:
Expand All @@ -442,15 +379,6 @@ jobs:
keys:
- fabric-sdk-cache-{{ checksum "fabric_version.txt" }}

- run:
name: Store Hockey SDK Version
command: *store_hockey_sdk_version

- restore_cache:
name: Restore Hockey SDK
keys:
- hockey-sdk-cache-v1-{{ checksum "hockey_version.txt" }}

- run:
name: Store Xcode Version
command: xcodebuild -version > xcode_version.txt
Expand Down Expand Up @@ -484,7 +412,7 @@ jobs:

- run:
name: Fastlane
command: bundle exec fastlane alpha_match_gym_hockey --verbose
command: bundle exec fastlane alpha_match_gym_appcenter --verbose
no_output_timeout: "30m" # 30 minutes

- store_artifacts:
Expand Down Expand Up @@ -512,15 +440,6 @@ jobs:
keys:
- fabric-sdk-cache-{{ checksum "fabric_version.txt" }}

- run:
name: Store Hockey SDK Version
command: *store_hockey_sdk_version

- restore_cache:
name: Restore Hockey SDK
keys:
- hockey-sdk-cache-v1-{{ checksum "hockey_version.txt" }}

- run:
name: Store Xcode Version
command: xcodebuild -version > xcode_version.txt
Expand Down Expand Up @@ -571,15 +490,6 @@ jobs:
keys:
- fabric-sdk-cache-{{ checksum "fabric_version.txt" }}

- run:
name: Store Hockey SDK Version
command: *store_hockey_sdk_version

- restore_cache:
name: Restore Hockey SDK
keys:
- hockey-sdk-cache-v1-{{ checksum "hockey_version.txt" }}

- run:
name: Store Xcode Version
command: xcodebuild -version > xcode_version.txt
Expand Down Expand Up @@ -613,7 +523,7 @@ jobs:

- run:
name: Fastlane
command: bundle exec fastlane itunes_match_gym_deliver_hockey --verbose
command: bundle exec fastlane itunes_match_gym_deliver_appcenter --verbose
no_output_timeout: "30m" # 30 minutes

- store_artifacts:
Expand Down
62 changes: 26 additions & 36 deletions .fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ platform :ios do

### BETA

lane :beta_match_gym_hockey_s3 do
lane :beta_match_gym_appcenter_s3 do
match_all
beta_gym
beta_hockey
beta_appcenter
beta_s3
end

Expand All @@ -70,15 +70,16 @@ platform :ios do
build_the_app(
output_name: "KickBeta",
export_method: "enterprise",
configuration: "Hockey Beta"
configuration: "AppCenter Beta"
)
end

desc "Upload Beta to HockeyApp"
lane :beta_hockey do
upload_hockey(
desc "Upload Beta to AppCenter"
lane :beta_appcenter do
upload_appcenter(
app_name: "KickBeta",
ipa: "#{gym_dir}/KickBeta.ipa",
public_identifier: ENV["HOCKEY_BETA_APP_ID"]
dsym: "#{gym_dir}/KickBeta.app.dSYM.zip"
)

upload_dsyms(dsym: "#{gym_dir}/KickBeta.app.dSYM.zip")
Expand All @@ -89,7 +90,7 @@ platform :ios do
"beta",
get_version_number(xcodeproj: "Kickstarter.xcodeproj", target: "Kickstarter-iOS"),
get_build_number(xcodeproj: "Kickstarter.xcodeproj"),
"HockeyApp"
"AppCenter"
)
)
end
Expand All @@ -110,11 +111,10 @@ platform :ios do

### PRODUCTION

lane :itunes_match_gym_deliver_hockey do
lane :itunes_match_gym_deliver do
match_all
itunes_gym
itunes_deliver
itunes_hockey
end

desc "Build Production"
Expand All @@ -126,14 +126,6 @@ platform :ios do
)
end

desc "Upload Production to HockeyApp"
lane :itunes_hockey do
upload_hockey(
ipa: "#{gym_dir}/Kickstarter.ipa",
public_identifier: ENV["HOCKEY_RELEASE_APP_ID"]
)
end

desc "Upload to the App Store"
lane :itunes_deliver do

Expand Down Expand Up @@ -162,26 +154,27 @@ platform :ios do
end

### ALPHA
lane :alpha_match_gym_hockey do
lane :alpha_match_gym_appcenter do
match_all
alpha_gym
alpha_hockey
alpha_appcenter
end

desc "Build Alpha"
lane :alpha_gym do
build_the_app(
output_name: "KickAlpha",
export_method: "enterprise",
configuration: "Hockey Alpha"
configuration: "AppCenter Alpha"
)
end

desc "Upload Alpha to HockeyApp"
lane :alpha_hockey do
upload_hockey(
desc "Upload Alpha to AppCenter"
lane :alpha_appcenter do
upload_appcenter(
app_name: "KickAlpha",
ipa: "#{gym_dir}/KickAlpha.ipa",
public_identifier: ENV["HOCKEY_ALPHA_APP_ID"]
dsym: "#{gym_dir}/KickAlpha.app.dSYM.zip"
)

upload_dsyms(dsym: "#{gym_dir}/KickAlpha.app.dSYM.zip")
Expand All @@ -192,7 +185,7 @@ platform :ios do
"alpha",
get_version_number(xcodeproj: "Kickstarter.xcodeproj", target: "Kickstarter-iOS"),
get_build_number(xcodeproj: "Kickstarter.xcodeproj"),
"HockeyApp"
"AppCenter"
)
)
end
Expand Down Expand Up @@ -237,18 +230,15 @@ platform :ios do
)
end

private_lane :upload_hockey do |options|
private_lane :upload_appcenter do |options|
notes = changelog
hockey(
api_token: ENV["HOCKEY_APP_TOKEN"],
appcenter_upload(
api_token: ENV["APPCENTER_API_TOKEN"],
owner_name: ENV["APPCENTER_OWNER_NAME"],
app_name: options[:app_name],
ipa: options[:ipa],
public_identifier: options[:public_identifier],
repository_url: ENV["CIRCLE_REPOSITORY_URL"],
build_server_url: ENV["CIRCLE_BUILD_URL"],
commit_sha: ENV["CIRCLE_SHA1"],
notes: notes,
bypass_cdn: true,
notify: "1"
dsym: options[:dsym],
notify_testers: true
)
end

Expand Down
1 change: 1 addition & 0 deletions .fastlane/Pluginfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
# Ensure this file is checked in to source control!

gem 'fastlane-plugin-aws_s3'
gem 'fastlane-plugin-appcenter'
1 change: 1 addition & 0 deletions Cartfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ github "kickstarter/Kickstarter-ReactiveExtensions" "c3ce269fd2dd14b8d63ce1bc5b7
github "Alamofire/AlamofireImage" "8e635e6151212f8871a321bbdd980af7c31af73b"
github "AgileBits/onepassword-extension" == 1.8.4
github "facebook/facebook-objc-sdk" == 5.0.2
github "microsoft/appcenter-sdk-apple" == 2.5.0
github "ReactiveCocoa/ReactiveSwift" == 6.0.0
github "stripe/stripe-ios" == 18.0.0
github "uber/ios-snapshot-test-case" == 4.0.0
Expand Down
1 change: 1 addition & 0 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ github "ReactiveCocoa/ReactiveSwift" "6.0.0"
github "facebook/facebook-objc-sdk" "v5.0.2"
github "kickstarter/Kickstarter-Prelude" "d03f8831dcec9ad157db4f1c5f769ec17e1a3766"
github "kickstarter/Kickstarter-ReactiveExtensions" "c3ce269fd2dd14b8d63ce1bc5b78f7397c0c0753"
github "microsoft/appcenter-sdk-apple" "2.5.0"
github "stripe/stripe-ios" "v18.0.0"
github "thoughtbot/Argo" "39f06f089d25c111444e5a85eef64586e54756ac"
github "thoughtbot/Curry" "b6bf27ec9d711f607a8c7da9ca69ee9eaa201a22"
Expand Down
4 changes: 4 additions & 0 deletions Carthage-xcfilelist/app-output-files.xcfilelist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/Alamofire.framework
$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/AlamofireImage.framework
$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/AppCenter.framework
$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/AppCenterAnalytics.framework
$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/AppCenterCrashes.framework
$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/AppCenterDistribute.framework
$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/Argo.framework
$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/Curry.framework
$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/FBSDKCoreKit.framework
Expand Down
Loading