Skip to content

Commit 8db8fd3

Browse files
authored
Merge pull request #17893 from wordpress-mobile/remove/circle-ci-and-fix-beta-builds
Allow for discriminating between beta and stable when building releases on Buildkite
2 parents b9ad258 + ac42081 commit 8db8fd3

File tree

7 files changed

+43
-72
lines changed

7 files changed

+43
-72
lines changed

.buildkite/commands/release-build-jetpack.sh

100644100755
File mode changed.

.buildkite/commands/release-build-wordpress-internal.sh

100644100755
File mode changed.

.buildkite/commands/release-build-wordpress.sh

100644100755
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,7 @@ echo "--- :closed_lock_with_key: Installing Secrets"
1919
bundle exec fastlane run configure_apply
2020

2121
echo "--- :hammer_and_wrench: Building"
22-
bundle exec fastlane build_and_upload_app_store_connect skip_confirm:true create_gh_release:true
22+
bundle exec fastlane build_and_upload_app_store_connect \
23+
skip_confirm:true \
24+
create_gh_release:true \
25+
beta_release:${1:-true} # use first call param, default to true for safety

.buildkite/release-builds.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ common_params:
1515
steps:
1616

1717
- label: "🛠 WordPress Release Build (App Store Connect)"
18-
command: ".buildkite/commands/release-build-wordpress.sh"
18+
command: ".buildkite/commands/release-build-wordpress.sh $BETA_RELEASE"
1919
env: *common_env
2020
plugins: *common_plugins
2121
notify:

Gemfile.lock

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
GIT
2+
remote: git@github.com:wordpress-mobile/release-toolkit
3+
revision: c198441d2050c52714d40c8791d0020bd1c4f752
4+
branch: trunk
5+
specs:
6+
fastlane-plugin-wpmreleasetoolkit (2.3.0)
7+
activesupport (~> 5)
8+
bigdecimal (~> 1.4)
9+
buildkit (~> 1.4)
10+
chroma (= 0.2.0)
11+
diffy (~> 3.3)
12+
git (~> 1.3)
13+
jsonlint (~> 0.3)
14+
nokogiri (~> 1.11)
15+
octokit (~> 4.18)
16+
parallel (~> 1.14)
17+
progress_bar (~> 1.3)
18+
rake (>= 12.3, < 14.0)
19+
rake-compiler (~> 1.0)
20+
121
GEM
222
remote: https://rubygems.org/
323
specs:
@@ -33,6 +53,8 @@ GEM
3353
aws-eventstream (~> 1, >= 1.0.2)
3454
babosa (1.0.4)
3555
bigdecimal (1.4.4)
56+
buildkit (1.4.5)
57+
sawyer (>= 0.6)
3658
chroma (0.2.0)
3759
claide (1.1.0)
3860
cocoapods (1.11.2)
@@ -161,19 +183,6 @@ GEM
161183
xcpretty-travis-formatter (>= 0.0.3)
162184
fastlane-plugin-appcenter (1.11.0)
163185
fastlane-plugin-sentry (1.8.1)
164-
fastlane-plugin-wpmreleasetoolkit (2.3.0)
165-
activesupport (~> 5)
166-
bigdecimal (~> 1.4)
167-
chroma (= 0.2.0)
168-
diffy (~> 3.3)
169-
git (~> 1.3)
170-
jsonlint (~> 0.3)
171-
nokogiri (~> 1.11)
172-
octokit (~> 4.18)
173-
parallel (~> 1.14)
174-
progress_bar (~> 1.3)
175-
rake (>= 12.3, < 14.0)
176-
rake-compiler (~> 1.0)
177186
ffi (1.15.5)
178187
fourflusher (2.3.1)
179188
fuzzy_match (2.0.4)
@@ -245,7 +254,7 @@ GEM
245254
nokogiri (1.13.1)
246255
mini_portile2 (~> 2.7.0)
247256
racc (~> 1.4)
248-
octokit (4.21.0)
257+
octokit (4.22.0)
249258
faraday (>= 0.9)
250259
sawyer (~> 0.8.0, >= 0.5.3)
251260
oj (3.13.11)
@@ -331,7 +340,7 @@ DEPENDENCIES
331340
fastlane (~> 2.174)
332341
fastlane-plugin-appcenter (~> 1.8)
333342
fastlane-plugin-sentry
334-
fastlane-plugin-wpmreleasetoolkit (~> 2.3)
343+
fastlane-plugin-wpmreleasetoolkit!
335344
octokit (~> 4.0)
336345
rake
337346
rmagick (~> 3.2.0)

fastlane/Fastfile

Lines changed: 12 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -467,47 +467,6 @@ platform :ios do
467467
download_jetpack_localized_app_store_metadata
468468
end
469469

470-
#####################################################################################
471-
# build_and_upload_beta_release
472-
# -----------------------------------------------------------------------------------
473-
# This lane builds a beta release of the app and optionally uploads
474-
# it for both internal and external distribution
475-
# -----------------------------------------------------------------------------------
476-
# Usage:
477-
# bundle exec fastlane build_and_upload_beta_release [skip_confirm:<skip confirm>]
478-
# [create_gh_release:<create release on GH>]
479-
#
480-
# Example:
481-
# bundle exec fastlane build_and_upload_beta_release
482-
# bundle exec fastlane build_and_upload_beta_release skip_confirm:true
483-
# bundle exec fastlane build_and_upload_beta_release create_gh_release:true
484-
#####################################################################################
485-
desc 'Builds and uploads a beta release for distribution'
486-
lane :build_and_upload_beta_release do |options|
487-
build_and_upload_app_center(options)
488-
build_and_upload_app_store_connect(options)
489-
end
490-
491-
#####################################################################################
492-
# build_and_upload_stable_release
493-
# -----------------------------------------------------------------------------------
494-
# This lane builds a stable release of the app and optionally uploads
495-
# it for distribution
496-
# -----------------------------------------------------------------------------------
497-
# Usage:
498-
# bundle exec fastlane build_and_upload_stable_release [skip_confirm:<skip confirm>]
499-
# [create_gh_release:<create release on GH>]
500-
#
501-
# Example:
502-
# bundle exec fastlane build_and_upload_stable_release
503-
# bundle exec fastlane build_and_upload_stable_release skip_confirm:true
504-
# bundle exec fastlane build_and_upload_stable_release create_gh_release:true
505-
#####################################################################################
506-
desc 'Builds and uploads a stable release for distribution'
507-
lane :build_and_upload_stable_release do |options|
508-
build_and_upload_app_store_connect(options)
509-
end
510-
511470
#####################################################################################
512471
# build_and_upload_app_store_connect
513472
# -----------------------------------------------------------------------------------
@@ -817,12 +776,7 @@ platform :ios do
817776
#
818777
#####################################################################################
819778
lane :trigger_beta_build do |options|
820-
buildkite_trigger_build(
821-
buildkite_organization: 'automattic',
822-
buildkite_pipeline: 'wordpress-ios',
823-
branch: options[:branch_to_build],
824-
pipeline_file: 'release-builds.yml'
825-
)
779+
trigger_buildkite_release_build(branch: options[:branch_to_build], beta: true)
826780
end
827781

828782
#####################################################################################
@@ -835,12 +789,7 @@ platform :ios do
835789
#
836790
#####################################################################################
837791
lane :trigger_release_build do |options|
838-
buildkite_trigger_build(
839-
buildkite_organization: 'automattic',
840-
buildkite_pipeline: 'wordpress-ios',
841-
branch: options[:branch_to_build],
842-
pipeline_file: 'release-builds.yml'
843-
)
792+
trigger_buildkite_release_build(branch: options[:branch_to_build], beta: false)
844793
end
845794

846795
########################################################################
@@ -1019,6 +968,16 @@ def generate_installable_build_number
1019968
end
1020969
end
1021970

971+
def trigger_buildkite_release_build(branch:, beta:)
972+
buildkite_trigger_build(
973+
buildkite_organization: 'automattic',
974+
buildkite_pipeline: 'wordpress-ios',
975+
branch: branch,
976+
environment: { BETA_RELEASE: beta },
977+
pipeline_file: 'release-builds.yml'
978+
)
979+
end
980+
1022981
# Application-agnostic settings for the `upload_to_app_store` action, also
1023982
# known as `deliver`.
1024983
UPLOAD_TO_APP_STORE_COMMON_PARAMS = {

fastlane/Pluginfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ group :screenshots, optional: true do
77
end
88

99
# This comment avoids typing to switch to a development version for testing.
10-
# gem 'fastlane-plugin-wpmreleasetoolkit', git: 'git@github.com:wordpress-mobile/release-toolkit', branch: 'trunk'
11-
gem 'fastlane-plugin-wpmreleasetoolkit', '~> 2.3'
10+
gem 'fastlane-plugin-wpmreleasetoolkit', git: 'git@github.com:wordpress-mobile/release-toolkit', branch: 'trunk'
11+
# gem 'fastlane-plugin-wpmreleasetoolkit', '~> 2.3'
1212

1313
gem 'fastlane-plugin-sentry'
1414
gem 'fastlane-plugin-appcenter', '~> 1.8'

0 commit comments

Comments
 (0)