diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index a3e9f2d9153..8351872b7f4 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -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 + plugins: [$CI_TOOLKIT] + notify: + - github_commit_status: + context: Prototype Build From Trunk + ################# # Run Unit Tests ################# diff --git a/fastlane/Fastfile b/fastlane/Fastfile index b681784c356..f77b4391920 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -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 @@ -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, @@ -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