Skip to content

Commit 9fc374b

Browse files
authored
Merge pull request #17862 from wordpress-mobile/add/buildkite-release-builds
Add Buildkite Release Builds
2 parents f2f1239 + 9680da1 commit 9fc374b

File tree

5 files changed

+165
-7
lines changed

5 files changed

+165
-7
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash -eu
2+
3+
# FIXIT-13.1: Temporary fix until we're on the Xcode 13.1 VM
4+
echo "--- :rubygems: Fixing Ruby Setup"
5+
gem install bundler
6+
7+
echo "--- :arrow_down: Installing Release Dependencies"
8+
brew update # Update homebrew to temporarily fix a bintray issue
9+
brew install imagemagick
10+
brew install ghostscript
11+
12+
echo "--- :rubygems: Setting up Gems"
13+
install_gems
14+
15+
echo "--- :cocoapods: Setting up Pods"
16+
install_cocoapods
17+
18+
echo "--- :closed_lock_with_key: Installing Secrets"
19+
bundle exec fastlane run configure_apply
20+
21+
echo "--- :hammer_and_wrench: Building"
22+
bundle exec fastlane build_and_upload_jetpack_for_app_store
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash -eu
2+
3+
# FIXIT-13.1: Temporary fix until we're on the Xcode 13.1 VM
4+
echo "--- :rubygems: Fixing Ruby Setup"
5+
gem install bundler
6+
7+
echo "--- :arrow_down: Installing Release Dependencies"
8+
brew update # Update homebrew to temporarily fix a bintray issue
9+
brew install imagemagick
10+
brew install ghostscript
11+
12+
echo "--- :rubygems: Setting up Gems"
13+
install_gems
14+
15+
echo "--- :cocoapods: Setting up Pods"
16+
install_cocoapods
17+
18+
echo "--- :closed_lock_with_key: Installing Secrets"
19+
bundle exec fastlane run configure_apply
20+
21+
echo "--- :hammer_and_wrench: Building"
22+
bundle exec fastlane build_and_upload_app_center skip_confirm:true
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash -eu
2+
3+
# FIXIT-13.1: Temporary fix until we're on the Xcode 13.1 VM
4+
echo "--- :rubygems: Fixing Ruby Setup"
5+
gem install bundler
6+
7+
echo "--- :arrow_down: Installing Release Dependencies"
8+
brew update # Update homebrew to temporarily fix a bintray issue
9+
brew install imagemagick
10+
brew install ghostscript
11+
12+
echo "--- :rubygems: Setting up Gems"
13+
install_gems
14+
15+
echo "--- :cocoapods: Setting up Pods"
16+
install_cocoapods
17+
18+
echo "--- :closed_lock_with_key: Installing Secrets"
19+
bundle exec fastlane run configure_apply
20+
21+
echo "--- :hammer_and_wrench: Building"
22+
bundle exec fastlane build_and_upload_app_store_connect skip_confirm:true create_gh_release:true

.buildkite/release-builds.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# This pipeline is meant to be run via the Buildkite API, and is only used for release builds
2+
3+
# Nodes with values to reuse in the pipeline.
4+
common_params:
5+
# Common plugin settings to use with the `plugins` key.
6+
- &common_plugins
7+
- automattic/bash-cache#v1.5.0
8+
- automattic/git-s3-cache#v1.1.0:
9+
bucket: "a8c-repo-mirrors"
10+
repo: "wordpress-mobile/wordpress-ios/"
11+
# Common environment values to use with the `env` key.
12+
- &common_env
13+
IMAGE_ID: xcode-13
14+
15+
steps:
16+
17+
- label: "🛠 WordPress Release Build (App Store Connect)"
18+
command: ".buildkite/commands/release-build-wordpress.sh"
19+
env: *common_env
20+
plugins: *common_plugins
21+
notify:
22+
- slack: "#build-and-ship"
23+
24+
- label: "🛠 WordPress Release Build (App Center)"
25+
command: ".buildkite/commands/release-build-wordpress-internal.sh"
26+
env: *common_env
27+
plugins: *common_plugins
28+
notify:
29+
- slack: "#build-and-ship"
30+
31+
- label: "🛠 Jetpack Release Build (App Store Connect)"
32+
command: ".buildkite/commands/release-build-jetpack.sh"
33+
env: *common_env
34+
plugins: *common_plugins
35+
notify:
36+
- slack: "#build-and-ship"

fastlane/Fastfile

Lines changed: 63 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ platform :ios do
518518
end
519519

520520
#####################################################################################
521-
# build_and_upload_release
521+
# build_and_upload_release [Deprecated - Can be removed once CircleCI is no longer in use]
522522
# -----------------------------------------------------------------------------------
523523
# This lane builds the app and uploads it for both internal and external distribution
524524
# -----------------------------------------------------------------------------------
@@ -534,14 +534,70 @@ platform :ios do
534534
#####################################################################################
535535
desc 'Builds and uploads for distribution'
536536
lane :build_and_upload_release do |options|
537-
ios_build_prechecks(skip_confirm: options[:skip_confirm],
538-
internal: options[:beta_release],
539-
external: true)
537+
build_and_upload_app_center(options) if options[:beta_release]
538+
build_and_upload_app_store_connect(options)
539+
end
540+
541+
#####################################################################################
542+
# build_and_upload_app_store_connect
543+
# -----------------------------------------------------------------------------------
544+
# This lane builds the app and uploads it for App Store Connect
545+
# -----------------------------------------------------------------------------------
546+
# Usage:
547+
# bundle exec fastlane build_and_upload_app_store_connect [skip_confirm:<skip confirm>]
548+
# [create_gh_release:<create release on GH>] [beta_release:<is a beta release>]
549+
#
550+
# Example:
551+
# bundle exec fastlane build_and_upload_app_store_connect
552+
# bundle exec fastlane build_and_upload_app_store_connect skip_confirm:true
553+
# bundle exec fastlane build_and_upload_app_store_connect create_gh_release:true
554+
# bundle exec fastlane build_and_upload_app_store_connect beta_release:true
555+
#####################################################################################
556+
desc 'Builds and uploads for distribution to App Store Connect'
557+
lane :build_and_upload_app_store_connect do |options|
558+
ios_build_prechecks(
559+
skip_confirm: options[:skip_confirm],
560+
internal: options[:beta_release],
561+
external: true
562+
)
563+
540564
ios_build_preflight
541565

542-
build_and_upload_internal(skip_prechecks: true, skip_confirm: options[:skip_confirm]) if options[:beta_release]
543-
build_and_upload_itc(skip_prechecks: true, skip_confirm: options[:skip_confirm],
544-
beta_release: options[:beta_release], create_release: options[:create_gh_release])
566+
build_and_upload_itc(
567+
skip_prechecks: true,
568+
skip_confirm: options[:skip_confirm],
569+
beta_release: options[:beta_release],
570+
create_release: options[:create_gh_release]
571+
)
572+
573+
end
574+
575+
#####################################################################################
576+
# build_and_upload_app_center
577+
# -----------------------------------------------------------------------------------
578+
# This lane builds the app and uploads it for App Center
579+
# -----------------------------------------------------------------------------------
580+
# Usage:
581+
# bundle exec fastlane build_and_upload_app_center [skip_confirm:<skip confirm>]
582+
#
583+
# Example:
584+
# bundle exec fastlane build_and_upload_app_center
585+
# bundle exec fastlane build_and_upload_app_center skip_confirm:true
586+
#####################################################################################
587+
desc 'Builds and uploads for distribution to App Center'
588+
lane :build_and_upload_app_center do |options|
589+
ios_build_prechecks(
590+
skip_confirm: options[:skip_confirm],
591+
internal: true,
592+
external: true
593+
)
594+
595+
ios_build_preflight
596+
597+
build_and_upload_internal(
598+
skip_prechecks: true,
599+
skip_confirm: options[:skip_confirm]
600+
)
545601
end
546602

547603
#####################################################################################

0 commit comments

Comments
 (0)