-
Notifications
You must be signed in to change notification settings - Fork 285
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
Split building for ASC from uploading to TestFlight and run as separate CI steps #1635
Conversation
Generated by 🚫 Danger |
📲 You can test the changes from this Pull Request in Simplenote Prototype Build by scanning the QR code below to install the corresponding build.
|
echo "--- :closed_lock_with_key: Installing Secrets" | ||
bundle exec fastlane run configure_apply |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will become unnecessary for ASC uploads once we'll move to using env vars.
|
||
version = beta_release ? ios_get_build_version : ios_get_app_version(public_version_xcconfig_file: VERSION_FILE_PATH) | ||
version = beta_release ? build_code_current : release_version_current | ||
create_release( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can see a further iteration where uploads to TestFlight and Sentry run in parallel, and we only create the release on GitHub when the TestFlight step has succeeded.
03e9135
to
daf3bc9
Compare
daf3bc9
to
3f504a0
Compare
|
||
lane :build_for_app_store_connect do |fetch_code_signing: true| | ||
appstore_code_signing if fetch_code_signing | ||
|
||
gym( | ||
scheme: 'Simplenote', | ||
workspace: WORKSPACE, | ||
configuration: 'Distribution AppStore', | ||
clean: true, | ||
export_method: 'app-store' | ||
) | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks deleted but you'll find a few lines above with some additional parameters.
fastlane/lanes/build.rb
Outdated
build_for_app_store_connect | ||
|
||
upload_to_app_store_connect( | ||
beta_release: beta_release, | ||
skip_prechecks: skip_prechecks, | ||
create_release: create_release | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The lane build_and_upload_to_app_store_connect
is now unused... I'd say we're better off deleting it. It sounds convenient for local usages, but we shouldn't do local builds unless in the most rare of occasions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, let's delete it.
In the rare cases where we might need to do an App Store build from our local machines to debug stuff or unblock an automation bug, we can always call fastlane build_for_app_store_connect
then fastlane upload_to_app_store_connect
separately manually anway.
PROJECT_ROOT_FOLDER = File.dirname(File.expand_path(__dir__)) | ||
VERSION_FILE_PATH = File.join(PROJECT_ROOT_FOLDER, 'config', 'Version.Public.xcconfig') | ||
OUTPUT_DIRECTORY_PATH = File.join(PROJECT_ROOT_FOLDER, 'build', 'results') | ||
APP_STORE_BUNDLE_IDENTIFIER = 'com.codality.NotationalFlow' | ||
DEFAULT_BRANCH = 'trunk' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All these consts at the top were previously later on in the file I grouped them for clarity and because of the new import
s that require them to be already defined.
This was prompted by the QR code being broken in recent PRs.
# @called_by CI — especially, relies on `BUILDKITE_PULL_REQUEST` being defined | ||
# | ||
def post_installable_build_pr_comment(app_name:, build_number:, url_slug:) | ||
UI.message("Successfully built and uploaded installable build `#{build_number}` to App Center.") | ||
def post_installable_build_pr_comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These installable builds changes are obviously unrelated to the TestFlight CI flow, but I noticed that the QR code was broken so I chucked them in here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
fastlane/lanes/build.rb
Outdated
build_for_app_store_connect | ||
|
||
upload_to_app_store_connect( | ||
beta_release: beta_release, | ||
skip_prechecks: skip_prechecks, | ||
create_release: create_release | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, let's delete it.
In the rare cases where we might need to do an App Store build from our local machines to debug stuff or unblock an automation bug, we can always call fastlane build_for_app_store_connect
then fastlane upload_to_app_store_connect
separately manually anway.
Co-authored-by: Olivier Halligon <[email protected]>
Fix
This will:
ipa
Test
I tested this by triggering a release build on this branch:
Review
Only one developer or infrastructure engineer required to review these changes, but anyone can perform the review.
Release
These changes do not require release notes.