Skip to content

Commit

Permalink
Merge branch 'trunk' into update/improve-image-blocks-processor
Browse files Browse the repository at this point in the history
# Conflicts:
#	WordPress/Classes/Services/PostCoordinator.swift
  • Loading branch information
fluiddot committed May 16, 2024
2 parents f73df72 + 1268953 commit ccffe5b
Show file tree
Hide file tree
Showing 464 changed files with 29,322 additions and 16,710 deletions.
48 changes: 0 additions & 48 deletions .buildkite/cache-builder.yml

This file was deleted.

24 changes: 0 additions & 24 deletions .buildkite/commands/release-build-wordpress-internal.sh

This file was deleted.

50 changes: 22 additions & 28 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
# Nodes with values to reuse in the pipeline.
common_params:
# Common plugin settings to use with the `plugins` key.
- &common_plugins
- automattic/a8c-ci-toolkit#3.1.0
# Common environment values to use with the `env` key.
- &common_env
# Be sure to also update the `.xcode-version` file when updating the Xcode image/version here
IMAGE_ID: xcode-15.1
env:
IMAGE_ID: $IMAGE_ID

# This is the default pipeline – it will build and test the app
steps:
Expand All @@ -18,17 +11,15 @@ steps:
steps:
- label: "🛠 WordPress Prototype Build"
command: ".buildkite/commands/prototype-build-wordpress.sh"
env: *common_env
plugins: *common_plugins
plugins: [$CI_TOOLKIT_PLUGIN]
if: "build.pull_request.id != null || build.pull_request.draft"
notify:
- github_commit_status:
context: "WordPress Prototype Build"

- label: "🛠 Jetpack Prototype Build"
command: ".buildkite/commands/prototype-build-jetpack.sh"
env: *common_env
plugins: *common_plugins
plugins: [$CI_TOOLKIT_PLUGIN]
if: "build.pull_request.id != null || build.pull_request.draft"
notify:
- github_commit_status:
Expand All @@ -42,17 +33,15 @@ steps:
- label: "🛠 :wordpress: Build for Testing"
key: "build_wordpress"
command: ".buildkite/commands/build-for-testing.sh wordpress"
env: *common_env
plugins: *common_plugins
plugins: [$CI_TOOLKIT_PLUGIN]
notify:
- github_commit_status:
context: "WordPress Build for Testing"

- label: "🛠 :jetpack: Build for Testing"
key: "build_jetpack"
command: ".buildkite/commands/build-for-testing.sh jetpack"
env: *common_env
plugins: *common_plugins
plugins: [$CI_TOOLKIT_PLUGIN]
notify:
- github_commit_status:
context: "Jetpack Build for Testing"
Expand All @@ -63,8 +52,7 @@ steps:
- label: "🔬 :wordpress: Unit Tests"
command: ".buildkite/commands/run-unit-tests.sh"
depends_on: "build_wordpress"
env: *common_env
plugins: *common_plugins
plugins: [$CI_TOOLKIT_PLUGIN]
artifact_paths:
- "build/results/*"
notify:
Expand All @@ -79,8 +67,7 @@ steps:
- label: "🔬 :jetpack: UI Tests (iPhone)"
command: .buildkite/commands/run-ui-tests.sh 'iPhone 15'
depends_on: "build_jetpack"
env: *common_env
plugins: *common_plugins
plugins: [$CI_TOOLKIT_PLUGIN]
artifact_paths:
- "build/results/*"
- "build/results/crashes/*"
Expand All @@ -91,8 +78,7 @@ steps:
- label: "🔬 :jetpack: UI Tests (iPad)"
command: .buildkite/commands/run-ui-tests.sh 'iPad Pro (12.9-inch) (6th generation)'
depends_on: "build_jetpack"
env: *common_env
plugins: *common_plugins
plugins: [$CI_TOOLKIT_PLUGIN]
artifact_paths:
- "build/results/*"
- "build/results/crashes/*"
Expand All @@ -105,14 +91,23 @@ steps:
#################
- group: "Linters"
steps:
- label: "☢️ Danger - PR Check"
command: danger
key: danger
if: "build.pull_request.id != null"
retry:
manual:
permit_on_passed: true
agents:
queue: "linter"

- label: ":swift: SwiftLint"
command: run_swiftlint --strict
plugins: *common_plugins
command: swiftlint
notify:
- github_commit_status:
context: "SwiftLint"
agents:
queue: "default"
queue: "linter"

- label: "🧹 Lint Translations"
command: "gplint /workdir/WordPress/Resources/AppStoreStrings.po"
Expand All @@ -127,5 +122,4 @@ steps:

- label: ":sleuth_or_spy: Lint Localized Strings Format"
command: .buildkite/commands/lint-localized-strings-format.sh
plugins: *common_plugins
env: *common_env
plugins: [$CI_TOOLKIT_PLUGIN]
32 changes: 4 additions & 28 deletions .buildkite/release-builds.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,18 @@
# This pipeline is meant to be run via the Buildkite API, and is only used for release builds

# Nodes with values to reuse in the pipeline.
common_params:
# Common plugin settings to use with the `plugins` key.
- &common_plugins
- automattic/a8c-ci-toolkit#3.1.0
- automattic/git-s3-cache#1.1.4:
bucket: "a8c-repo-mirrors"
repo: "automattic/wordpress-ios/"
# Common environment values to use with the `env` key.
- &common_env
# Be sure to also update the `.xcode-version` file when updating the Xcode image/version here
IMAGE_ID: xcode-15.1
env:
IMAGE_ID: $IMAGE_ID

steps:

- label: ":wordpress: :testflight: WordPress Release Build (App Store Connect)"
command: ".buildkite/commands/release-build-wordpress.sh $BETA_RELEASE"
# The TestFlight build has a priority of 2 so that it is higher than the AppCenter build
priority: 2
env: *common_env
plugins: *common_plugins
notify:
- slack: "#build-and-ship"

- label: ":wordpress: :appcenter: WordPress Release Build (App Center)"
command: ".buildkite/commands/release-build-wordpress-internal.sh"
priority: 1
env: *common_env
plugins: *common_plugins
plugins: [$CI_TOOLKIT_PLUGIN]
notify:
- slack: "#build-and-ship"

- label: ":jetpack: :testflight: Jetpack Release Build (App Store Connect)"
command: ".buildkite/commands/release-build-jetpack.sh"
# The TestFlight build has a priority of 2 so that it is higher than the AppCenter build
priority: 2
env: *common_env
plugins: *common_plugins
plugins: [$CI_TOOLKIT_PLUGIN]
notify:
- slack: "#build-and-ship"
2 changes: 1 addition & 1 deletion .buildkite/release-pipelines/code-freeze.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
steps:
- label: Code Freeze
plugins:
- automattic/a8c-ci-toolkit#3.1.0
- $CI_TOOLKIT_PLUGIN
# The first client to implement releases in CI was Android so the automation works in that queue.
# We might want to move it to a leaner one in the future.
agents:
Expand Down
25 changes: 8 additions & 17 deletions .buildkite/release-pipelines/complete-code-freeze.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
common_params:
# Common plugin settings to use with the `plugins` key.
- &common_plugins
- automattic/a8c-ci-toolkit#3.1.0
# Common environment values to use with the `env` key.
- &common_env
# Be sure to also update the `.xcode-version` file when updating the Xcode image/version here
IMAGE_ID: xcode-15.1
env:
IMAGE_ID: $IMAGE_ID

# The code freeze completion needs to run on macOS because it uses genstrings under the hood
agents:
queue: mac

steps:
- label: Complete Code Freeze
key: complete_code_freeze
plugins: *common_plugins
env: *common_env
# The code freeze completion needs to run on macOS because it uses genstrings under the hood
agents:
queue: mac
plugins: [$CI_TOOLKIT_PLUGIN]
command: ".buildkite/commands/complete-code-freeze.sh $RELEASE_VERSION"

- label: Log Outdated Pods
depends_on: complete_code_freeze
plugins: *common_plugins
env: *common_env
agents:
queue: mac
plugins: [$CI_TOOLKIT_PLUGIN]
command: ".buildkite/commands/log-outdated-pods.sh $RELEASE_VERSION"
4 changes: 2 additions & 2 deletions .buildkite/release-pipelines/finalize-hotfix.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
steps:
- label: Finalize Release
plugins:
- automattic/a8c-ci-toolkit#3.1.0
- $CI_TOOLKIT_PLUGIN
# The finalization needs to run on macOS because of localization linting
agents:
queue: mac
env:
IMAGE_ID: xcode-15.1
IMAGE_ID: $IMAGE_ID
command: ".buildkite/commands/finalize-hotfix.sh $VERSION"
4 changes: 2 additions & 2 deletions .buildkite/release-pipelines/finalize-release.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
steps:
- label: Finalize Release
plugins:
- automattic/a8c-ci-toolkit#3.1.0
- $CI_TOOLKIT_PLUGIN
# The finalization needs to run on macOS because of localization linting
agents:
queue: mac
env:
IMAGE_ID: xcode-15.1
IMAGE_ID: $IMAGE_ID
command: ".buildkite/commands/finalize-release.sh $RELEASE_VERSION"
4 changes: 2 additions & 2 deletions .buildkite/release-pipelines/new-beta-release.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
steps:
- label: New Beta Deployment
plugins:
- automattic/a8c-ci-toolkit#3.1.0
- $CI_TOOLKIT_PLUGIN
# The beta needs to run on macOS because it uses genstrings under the hood
agents:
queue: mac
env:
IMAGE_ID: xcode-15.1
IMAGE_ID: $IMAGE_ID
command: |
echo '--- :git: Configure Git for release management'
.buildkite/commands/configure-git-for-release-management.sh
Expand Down
6 changes: 3 additions & 3 deletions .buildkite/release-pipelines/new-hotfix.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
steps:
- label: New Hotfix Deployment
plugins:
- automattic/a8c-ci-toolkit#3.1.0
# The beta needs to run on macOS because it uses genstrings under the hood
- $CI_TOOLKIT_PLUGIN
# The hotfix needs to run on macOS because it uses genstrings under the hood
agents:
queue: mac
env:
IMAGE_ID: xcode-15.1
IMAGE_ID: $IMAGE_ID
command: |
echo '--- :git: Configure Git for release management'
.buildkite/commands/configure-git-for-release-management.sh
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/release-pipelines/update-app-store-strings.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
steps:
- label: Update App Store Strings
plugins:
- automattic/a8c-ci-toolkit#3.1.0
- $CI_TOOLKIT_PLUGIN
# The first client to implement releases in CI was Android so the automation works in that queue.
# We might want to move it to a leaner one in the future.
agents:
Expand Down
10 changes: 10 additions & 0 deletions .buildkite/shared-pipeline-vars
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh

# This file is `source`'d before calling `buildkite-agent pipeline upload`, and can be used
# to set up some variables that will be interpolated in the `.yml` pipeline before uploading it.

# The ~> modifier is not currently used, but we check for it just in case
XCODE_VERSION=$(sed -E -n 's/^(~> )?(.*)/xcode-\2/p' .xcode-version)
export IMAGE_ID="$XCODE_VERSION"

export CI_TOOLKIT_PLUGIN="automattic/a8c-ci-toolkit#3.3.0"
7 changes: 1 addition & 6 deletions .configure
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
{
"project_name": "WordPress-iOS",
"branch": "trunk",
"pinned_hash": "91e71c2268b4df54591ff9cedbfd03ac93ba865d",
"pinned_hash": "96b8f38f614556658c0cf5eb86a61027d48fd1de",
"files_to_copy": [
{
"file": "shared/google_cloud_keys.json",
"destination": "~/.configure/wordpress-ios/secrets/google_cloud_keys.json",
"encrypt": true
},
{
"file": "iOS/WPiOS/project.env",
"destination": "~/.configure/wordpress-ios/secrets/project.env",
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/run-danger.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
name: ☢️ Danger
name: ☢️ Trigger Danger On Buildkite

on:
pull_request:
types: [opened, reopened, ready_for_review, synchronize, edited, labeled, unlabeled, milestoned, demilestoned]
types: [labeled, unlabeled, milestoned, demilestoned]

jobs:
dangermattic:
# runs on draft PRs only for opened / synchronize events
if: ${{ (github.event.pull_request.draft == false) || (github.event.pull_request.draft == true && contains(fromJSON('["opened", "synchronize"]'), github.event.action)) }}
uses: Automattic/dangermattic/.github/workflows/reusable-run-danger.yml@v1.0.0
if: ${{ (github.event.pull_request.draft == false) }}
uses: Automattic/dangermattic/.github/workflows/reusable-retry-buildkite-step-on-events.yml@v1.1.0
with:
org-slug: "automattic"
pipeline-slug: "wordpress-ios"
retry-step-key: "danger"
build-commit-sha: "${{ github.event.pull_request.head.sha }}"
secrets:
github-token: ${{ secrets.DANGERMATTIC_GITHUB_TOKEN }}
buildkite-api-token: ${{ secrets.TRIGGER_BK_BUILD_TOKEN }}
Loading

0 comments on commit ccffe5b

Please sign in to comment.