Skip to content

Commit

Permalink
Use shared buildkite pipeline vars file
Browse files Browse the repository at this point in the history
  • Loading branch information
iangmaia committed Jul 1, 2024
1 parent d0c2719 commit 0e24931
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 63 deletions.
8 changes: 1 addition & 7 deletions .buildkite/code-freeze.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
---

# 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.4.2

agents:
queue: "android"

steps:
- label: "Code Freeze"
plugins: *common_plugins
plugins: [$CI_TOOLKIT]
command: |
.buildkite/commands/configure-git-for-release-management.sh
Expand Down
8 changes: 1 addition & 7 deletions .buildkite/complete-code-freeze.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
---

# 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.4.2

agents:
queue: "android"

steps:
- label: "Complete Code Freeze"
plugins: *common_plugins
plugins: [$CI_TOOLKIT]
command: |
.buildkite/commands/configure-git-for-release-management.sh
.buildkite/commands/checkout-release-branch.sh
Expand Down
8 changes: 1 addition & 7 deletions .buildkite/finalize-release.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
---

# 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.4.2

agents:
queue: "android"

steps:
- label: "Finalize release"
plugins: *common_plugins
plugins: [$CI_TOOLKIT]
command: |
.buildkite/commands/configure-git-for-release-management.sh
.buildkite/commands/checkout-release-branch.sh
Expand Down
8 changes: 1 addition & 7 deletions .buildkite/new-beta-release.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
---

# 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.4.2

agents:
queue: "android"

steps:
- label: "New Beta Release"
plugins: *common_plugins
plugins: [$CI_TOOLKIT]
command: |
.buildkite/commands/configure-git-for-release-management.sh
Expand Down
37 changes: 16 additions & 21 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@

# Nodes with values to reuse in the pipeline.
common_params:
# Common plugin settings to use with the `plugins` key.
- &ci_toolkit
automattic/a8c-ci-toolkit#3.4.2
- &test_collector
test-collector#v1.8.0
- &test_collector_common_params
files: "buildkite-test-analytics/*.xml"
format: "junit"
Expand All @@ -22,7 +17,7 @@ steps:
- label: "Gradle Wrapper Validation"
command: |
validate_gradle_wrapper
plugins: [*ci_toolkit]
plugins: [$CI_TOOLKIT]

# Wait for Gradle Wrapper to be validated before running any other jobs
- wait
Expand All @@ -46,15 +41,15 @@ steps:
command: |
cp gradle.properties-example gradle.properties
./gradlew checkstyle
plugins: [*ci_toolkit]
plugins: [$CI_TOOLKIT]
artifact_paths:
- "**/build/reports/checkstyle/checkstyle.*"

- label: "🕵️ detekt"
command: |
cp gradle.properties-example gradle.properties
./gradlew detekt
plugins: [*ci_toolkit]
plugins: [$CI_TOOLKIT]
artifact_paths:
- "**/build/reports/detekt/detekt.html"

Expand All @@ -73,7 +68,7 @@ steps:
cp gradle.properties-example gradle.properties
.buildkite/commands/dependency-tree-diff.sh
if: build.pull_request.id != null
plugins: [*ci_toolkit]
plugins: [$CI_TOOLKIT]

#################
# Unit Tests
Expand All @@ -83,8 +78,8 @@ steps:
- label: "🔬 Unit Test WordPress"
command: ".buildkite/commands/run-unit-tests.sh wordpress"
plugins:
- *ci_toolkit
- *test_collector :
- $CI_TOOLKIT
- $TEST_COLLECTOR :
<<: *test_collector_common_params
api-token-env-name: "BUILDKITE_ANALYTICS_TOKEN_UNIT_TESTS_WORDPRESS"
artifact_paths:
Expand All @@ -93,8 +88,8 @@ steps:
- label: "🔬 Unit Test Processors"
command: ".buildkite/commands/run-unit-tests.sh processors"
plugins:
- *ci_toolkit
- *test_collector :
- $CI_TOOLKIT
- $TEST_COLLECTOR :
<<: *test_collector_common_params
api-token-env-name: "BUILDKITE_ANALYTICS_TOKEN_UNIT_TESTS_PROCESSORS"
artifact_paths:
Expand All @@ -103,8 +98,8 @@ steps:
- label: "🔬 Unit Test Image Editor"
command: ".buildkite/commands/run-unit-tests.sh image-editor"
plugins:
- *ci_toolkit
- *test_collector :
- $CI_TOOLKIT
- $TEST_COLLECTOR :
<<: *test_collector_common_params
api-token-env-name: "BUILDKITE_ANALYTICS_TOKEN_UNIT_TESTS_IMAGE_EDITOR"
artifact_paths:
Expand All @@ -118,8 +113,8 @@ steps:
- label: ":wordpress: 🔬 Instrumented tests"
command: ".buildkite/commands/run-instrumented-tests.sh wordpress"
plugins:
- *ci_toolkit
- *test_collector :
- $CI_TOOLKIT
- $TEST_COLLECTOR :
<<: *test_collector_common_params
api-token-env-name: "BUILDKITE_ANALYTICS_TOKEN_INSTRUMENTED_TESTS_WORDPRESS"
artifact_paths:
Expand All @@ -128,8 +123,8 @@ steps:
- label: ":jetpack: 🔬 Instrumented tests"
command: ".buildkite/commands/run-instrumented-tests.sh jetpack"
plugins:
- *ci_toolkit
- *test_collector :
- $CI_TOOLKIT
- $TEST_COLLECTOR :
<<: *test_collector_common_params
api-token-env-name: "BUILDKITE_ANALYTICS_TOKEN_INSTRUMENTED_TESTS_JETPACK"
artifact_paths:
Expand All @@ -143,9 +138,9 @@ steps:
- label: ":wordpress: :android: Prototype Build"
command: ".buildkite/commands/prototype-build.sh wordpress"
if: build.pull_request.id != null
plugins: [*ci_toolkit]
plugins: [$CI_TOOLKIT]

- label: ":jetpack: :android: Prototype Build"
command: ".buildkite/commands/prototype-build.sh jetpack"
if: build.pull_request.id != null
plugins: [*ci_toolkit]
plugins: [$CI_TOOLKIT]
8 changes: 1 addition & 7 deletions .buildkite/schedules/dependency-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
---

# Nodes with values to reuse in the pipeline.
common_params:
# Common plugin settings to use with the `plugins` key.
- &ci_toolkit
automattic/a8c-ci-toolkit#3.4.2

agents:
queue: "android"

Expand All @@ -16,7 +10,7 @@ steps:
echo "--- 📊 Analyzing"
cp gradle.properties-example gradle.properties
./gradlew buildHealth
plugins: [*ci_toolkit]
plugins: [$CI_TOOLKIT]
artifact_paths:
- "build/reports/dependency-analysis/build-health-report.*"
notify:
Expand Down
7 changes: 7 additions & 0 deletions .buildkite/shared-pipeline-vars
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/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.

export CI_TOOLKIT="automattic/a8c-ci-toolkit#3.4.2"
export TEST_COLLECTOR="test-collector#v1.10.1"
8 changes: 1 addition & 7 deletions .buildkite/update-release-notes.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
---

# 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.4.2

agents:
queue: "android"

steps:
- label: "Update release notes"
plugins: *common_plugins
plugins: [$CI_TOOLKIT]
command: |
.buildkite/commands/configure-git-for-release-management.sh
.buildkite/commands/checkout-editorial-branch.sh
Expand Down

0 comments on commit 0e24931

Please sign in to comment.