Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,20 @@ steps:
- github_commit_status:
context: Prototype Build

- group: ":rocket: Prototype Build"
if: build.branch == "trunk"
steps:
- input: Deploy Prototype Build?
prompt: Share a Prototype Build via Firebase App Distribution?
key: prototype_triggered
- label: Prototype Build
depends_on: prototype_triggered
command: .buildkite/commands/prototype-build.sh
Copy link
Contributor Author

@mokagio mokagio Dec 4, 2025

Choose a reason for hiding this comment

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

I considered splitting build from upload as part of this PR, but decided to save it log it as a nice to have for a future date instead.

Doing so would have required updating the existing prototype build step and I didn't want to grow the scope.

plugins: [$CI_TOOLKIT]
notify:
- github_commit_status:
context: Prototype Build From Trunk
Copy link
Contributor Author

@mokagio mokagio Dec 4, 2025

Choose a reason for hiding this comment

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

Notice the different name for the check, just in case the same commit already run from a PR (impossible with merge commits and squashes, but one never knows... rebase and merge? cherry pick and force push bypassing checks?) and also to keep things tidy.

Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if it actually makes sense to have this notify at all. Given this step will only run on trunk, and not on PRs—while the github_commit_status are mostly (only?) used to report the status of CI steps on GitHub PRs' UI, right?

So maybe we might as well remove that notify attribute altogether on that one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think there's marginal value in keeping this. GitHub shows the commit checks outside PRs, too.

Here's from example in the repo's landing page:

image

If clicked, it shows:

image

It might be useful at some point to have the check -> CI job link accessible this way.

But... I don't feel strongly about it. Happy to delete if this doesn't sound like a strong enough reason.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah good point, completely forgot about that UI in GitHub to show checks on any commit even outside PRs 👍


#################
# Run Unit Tests
#################
Expand Down
11 changes: 4 additions & 7 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ WORKSPACE_PATH = File.join(PROJECT_ROOT_FOLDER, 'WooCommerce.xcworkspace')
FIREBASE_APP_ID = '1:124902176124:ios:02259de1e7c42b291620f9'
FIREBASE_TESTERS_GROUP = 'woocommerce-ios---prototype-builds'

# Buildkite sets this env var to the PR number if on a PR, but to 'false' (and not nil) if not on a PR
pull_request_number = ENV['BUILDKITE_PULL_REQUEST']&.then { |n| n == 'false' ? nil : Integer(n) }

BUILDKITE_RELEASE_PIPELINE = 'release-builds.yml'
IOS_LOCALES = %w[ar-SA de-DE en-US es-ES fr-FR he id it ja ko nl-NL pt-BR ru sv tr zh-Hans zh-Hant].freeze
SIMULATOR_VERSION = '18.5' # For screenshots
Expand Down Expand Up @@ -777,10 +780,10 @@ platform :ios do
build_for_prototype_build

release_notes = <<~NOTES
Pull Request: ##{pull_request_number || 'N/A'}
Branch: `#{ENV.fetch('BUILDKITE_BRANCH', 'N/A')}`
Commit: #{ENV.fetch('BUILDKITE_COMMIT', 'N/A')[0...7]}
NOTES
release_notes += "Pull Request: ##{pull_request_number}" unless pull_request_number.nil?

firebase_app_distribution(
app: FIREBASE_APP_ID,
Expand Down Expand Up @@ -1526,12 +1529,6 @@ TEST_ANALYTICS_ENVIRONMENT = %w[
# Release Management Utils
# -----------------------------------------------------------------------------------

def pull_request_number
# Buildkite sets this env var to the PR number if on a PR, but to 'false' (and not nil) if not on a PR
pr_num = ENV.fetch('BUILDKITE_PULL_REQUEST', 'false')
pr_num == 'false' ? nil : Integer(pr_num)
end

def create_backmerge_pr
version = release_version_current

Expand Down