diff --git a/.buildkite/commands/release-build-jetpack.sh b/.buildkite/commands/release-build-jetpack.sh old mode 100644 new mode 100755 diff --git a/.buildkite/commands/release-build-wordpress-internal.sh b/.buildkite/commands/release-build-wordpress-internal.sh old mode 100644 new mode 100755 diff --git a/.buildkite/commands/release-build-wordpress.sh b/.buildkite/commands/release-build-wordpress.sh old mode 100644 new mode 100755 index f82acbe8b2e5..f05f86f65253 --- a/.buildkite/commands/release-build-wordpress.sh +++ b/.buildkite/commands/release-build-wordpress.sh @@ -19,4 +19,7 @@ echo "--- :closed_lock_with_key: Installing Secrets" bundle exec fastlane run configure_apply echo "--- :hammer_and_wrench: Building" -bundle exec fastlane build_and_upload_app_store_connect skip_confirm:true create_gh_release:true +bundle exec fastlane build_and_upload_app_store_connect \ + skip_confirm:true \ + create_gh_release:true \ + beta_release:${1:-true} # use first call param, default to true for safety diff --git a/.buildkite/release-builds.yml b/.buildkite/release-builds.yml index 0fa25a6f7742..4638aebe612c 100644 --- a/.buildkite/release-builds.yml +++ b/.buildkite/release-builds.yml @@ -15,7 +15,7 @@ common_params: steps: - label: "🛠 WordPress Release Build (App Store Connect)" - command: ".buildkite/commands/release-build-wordpress.sh" + command: ".buildkite/commands/release-build-wordpress.sh $BETA_RELEASE" env: *common_env plugins: *common_plugins notify: diff --git a/Gemfile.lock b/Gemfile.lock index eea70de2c368..936daeaadd76 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,3 +1,23 @@ +GIT + remote: git@github.com:wordpress-mobile/release-toolkit + revision: c198441d2050c52714d40c8791d0020bd1c4f752 + branch: trunk + specs: + fastlane-plugin-wpmreleasetoolkit (2.3.0) + activesupport (~> 5) + bigdecimal (~> 1.4) + buildkit (~> 1.4) + chroma (= 0.2.0) + diffy (~> 3.3) + git (~> 1.3) + jsonlint (~> 0.3) + nokogiri (~> 1.11) + octokit (~> 4.18) + parallel (~> 1.14) + progress_bar (~> 1.3) + rake (>= 12.3, < 14.0) + rake-compiler (~> 1.0) + GEM remote: https://rubygems.org/ specs: @@ -33,6 +53,8 @@ GEM aws-eventstream (~> 1, >= 1.0.2) babosa (1.0.4) bigdecimal (1.4.4) + buildkit (1.4.5) + sawyer (>= 0.6) chroma (0.2.0) claide (1.1.0) cocoapods (1.11.2) @@ -161,19 +183,6 @@ GEM xcpretty-travis-formatter (>= 0.0.3) fastlane-plugin-appcenter (1.11.0) fastlane-plugin-sentry (1.8.1) - fastlane-plugin-wpmreleasetoolkit (2.3.0) - activesupport (~> 5) - bigdecimal (~> 1.4) - chroma (= 0.2.0) - diffy (~> 3.3) - git (~> 1.3) - jsonlint (~> 0.3) - nokogiri (~> 1.11) - octokit (~> 4.18) - parallel (~> 1.14) - progress_bar (~> 1.3) - rake (>= 12.3, < 14.0) - rake-compiler (~> 1.0) ffi (1.15.5) fourflusher (2.3.1) fuzzy_match (2.0.4) @@ -245,7 +254,7 @@ GEM nokogiri (1.13.1) mini_portile2 (~> 2.7.0) racc (~> 1.4) - octokit (4.21.0) + octokit (4.22.0) faraday (>= 0.9) sawyer (~> 0.8.0, >= 0.5.3) oj (3.13.11) @@ -331,7 +340,7 @@ DEPENDENCIES fastlane (~> 2.174) fastlane-plugin-appcenter (~> 1.8) fastlane-plugin-sentry - fastlane-plugin-wpmreleasetoolkit (~> 2.3) + fastlane-plugin-wpmreleasetoolkit! octokit (~> 4.0) rake rmagick (~> 3.2.0) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 5add429f81aa..722d469df8b1 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -467,47 +467,6 @@ platform :ios do download_jetpack_localized_app_store_metadata end - ##################################################################################### - # build_and_upload_beta_release - # ----------------------------------------------------------------------------------- - # This lane builds a beta release of the app and optionally uploads - # it for both internal and external distribution - # ----------------------------------------------------------------------------------- - # Usage: - # bundle exec fastlane build_and_upload_beta_release [skip_confirm:] - # [create_gh_release:] - # - # Example: - # bundle exec fastlane build_and_upload_beta_release - # bundle exec fastlane build_and_upload_beta_release skip_confirm:true - # bundle exec fastlane build_and_upload_beta_release create_gh_release:true - ##################################################################################### - desc 'Builds and uploads a beta release for distribution' - lane :build_and_upload_beta_release do |options| - build_and_upload_app_center(options) - build_and_upload_app_store_connect(options) - end - - ##################################################################################### - # build_and_upload_stable_release - # ----------------------------------------------------------------------------------- - # This lane builds a stable release of the app and optionally uploads - # it for distribution - # ----------------------------------------------------------------------------------- - # Usage: - # bundle exec fastlane build_and_upload_stable_release [skip_confirm:] - # [create_gh_release:] - # - # Example: - # bundle exec fastlane build_and_upload_stable_release - # bundle exec fastlane build_and_upload_stable_release skip_confirm:true - # bundle exec fastlane build_and_upload_stable_release create_gh_release:true - ##################################################################################### - desc 'Builds and uploads a stable release for distribution' - lane :build_and_upload_stable_release do |options| - build_and_upload_app_store_connect(options) - end - ##################################################################################### # build_and_upload_app_store_connect # ----------------------------------------------------------------------------------- @@ -817,12 +776,7 @@ platform :ios do # ##################################################################################### lane :trigger_beta_build do |options| - buildkite_trigger_build( - buildkite_organization: 'automattic', - buildkite_pipeline: 'wordpress-ios', - branch: options[:branch_to_build], - pipeline_file: 'release-builds.yml' - ) + trigger_buildkite_release_build(branch: options[:branch_to_build], beta: true) end ##################################################################################### @@ -835,12 +789,7 @@ platform :ios do # ##################################################################################### lane :trigger_release_build do |options| - buildkite_trigger_build( - buildkite_organization: 'automattic', - buildkite_pipeline: 'wordpress-ios', - branch: options[:branch_to_build], - pipeline_file: 'release-builds.yml' - ) + trigger_buildkite_release_build(branch: options[:branch_to_build], beta: false) end ######################################################################## @@ -1019,6 +968,16 @@ def generate_installable_build_number end end +def trigger_buildkite_release_build(branch:, beta:) + buildkite_trigger_build( + buildkite_organization: 'automattic', + buildkite_pipeline: 'wordpress-ios', + branch: branch, + environment: { BETA_RELEASE: beta }, + pipeline_file: 'release-builds.yml' + ) +end + # Application-agnostic settings for the `upload_to_app_store` action, also # known as `deliver`. UPLOAD_TO_APP_STORE_COMMON_PARAMS = { diff --git a/fastlane/Pluginfile b/fastlane/Pluginfile index bb5c3d1e3d20..4c78f66c4ba9 100644 --- a/fastlane/Pluginfile +++ b/fastlane/Pluginfile @@ -7,8 +7,8 @@ group :screenshots, optional: true do end # This comment avoids typing to switch to a development version for testing. -# gem 'fastlane-plugin-wpmreleasetoolkit', git: 'git@github.com:wordpress-mobile/release-toolkit', branch: 'trunk' -gem 'fastlane-plugin-wpmreleasetoolkit', '~> 2.3' +gem 'fastlane-plugin-wpmreleasetoolkit', git: 'git@github.com:wordpress-mobile/release-toolkit', branch: 'trunk' +# gem 'fastlane-plugin-wpmreleasetoolkit', '~> 2.3' gem 'fastlane-plugin-sentry' gem 'fastlane-plugin-appcenter', '~> 1.8'