diff --git a/.buildkite/commands/load-pods.sh b/.buildkite/commands/load-pods.sh new file mode 100644 index 000000000000..c6ac9d6adc02 --- /dev/null +++ b/.buildkite/commands/load-pods.sh @@ -0,0 +1,7 @@ +#!/bin/bash -eu + +echo "--- :rubygems: Set up Gems" +install_gems + +echo "--- :cocoapods: Set up Pods and cache them if needed" +install_cocoapods diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 5953dbf28c42..bb444b68b732 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -13,6 +13,15 @@ common_params: # This is the default pipeline – it will build and test the app steps: + # Make sure there is a cached version of the pods avaialble before testing + # the app or deploying installable builds to avoid parallel steps wasting + # time building the same `Podfile.lock` from scratch. + - label: ':cocoapods: Pre-load Pods' + key: pods + command: .buildkite/commands/load-pods.sh + env: *common_env + plugins: *common_plugins + ################# # Create Installable Builds for WP and JP ################# @@ -20,6 +29,7 @@ steps: steps: - label: "🛠 WordPress Installable Build" command: ".buildkite/commands/installable-build-wordpress.sh" + depends_on: "pods" env: *common_env plugins: *common_plugins if: "build.pull_request.id != null || build.pull_request.draft" @@ -29,6 +39,7 @@ steps: - label: "🛠 Jetpack Installable Build" command: ".buildkite/commands/installable-build-jetpack.sh" + depends_on: "pods" env: *common_env plugins: *common_plugins if: "build.pull_request.id != null || build.pull_request.draft" @@ -42,6 +53,7 @@ steps: - label: "🛠 Build for Testing" key: "build" command: ".buildkite/commands/build-for-testing.sh" + depends_on: "pods" env: *common_env plugins: *common_plugins notify: diff --git a/.buildkite/release-builds.yml b/.buildkite/release-builds.yml index 935514191e35..33b9e8ed4a0a 100644 --- a/.buildkite/release-builds.yml +++ b/.buildkite/release-builds.yml @@ -14,8 +14,18 @@ common_params: steps: + # Make sure there is a cached version of the pods avaialble before testing + # the app or deploying installable builds to avoid parallel steps wasting + # time building the same `Podfile.lock` from scratch. + - label: ':cocoapods: Pre-load Pods' + key: pods + command: .buildkite/commands/load-pods.sh + env: *common_env + plugins: *common_plugins + - label: ":wordpress: :testflight: WordPress Release Build (App Store Connect)" command: ".buildkite/commands/release-build-wordpress.sh $BETA_RELEASE" + depends_on: "pods" env: *common_env plugins: *common_plugins notify: @@ -23,6 +33,7 @@ steps: - label: ":wordpress: :appcenter: WordPress Release Build (App Center)" command: ".buildkite/commands/release-build-wordpress-internal.sh" + depends_on: "pods" env: *common_env plugins: *common_plugins notify: @@ -30,6 +41,7 @@ steps: - label: ":jetpack: :testflight: Jetpack Release Build (App Store Connect)" command: ".buildkite/commands/release-build-jetpack.sh" + depends_on: "pods" env: *common_env plugins: *common_plugins notify: