Skip to content

Commit

Permalink
CI: Use shared buildkite pipeline vars file
Browse files Browse the repository at this point in the history
  • Loading branch information
ParaskP7 committed Jul 12, 2024
1 parent 35e17ad commit 9e96462
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 20 deletions.
23 changes: 9 additions & 14 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
---

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: "Gradle Wrapper Validation"
command: |
validate_gradle_wrapper
plugins: *common_plugins
plugins: [$CI_TOOLKIT]

# Wait for Gradle Wrapper to be validated before running any other jobs
- wait
Expand All @@ -22,12 +17,12 @@ steps:
key: "detekt"
command: |
./gradlew detekt
plugins: *common_plugins
plugins: [$CI_TOOLKIT]
artifact_paths:
- "**/build/reports/detekt/detekt.html"
- label: "lint"
key: "lint"
plugins: *common_plugins
plugins: [$CI_TOOLKIT]
command: |
./gradlew lintRelease
artifact_paths:
Expand All @@ -39,36 +34,36 @@ steps:
depends_on:
- "detekt"
- "lint"
plugins: *common_plugins
plugins: [$CI_TOOLKIT]
command: |
.buildkite/publish-mediapicker-domain.sh
- label: "Publish :mediapicker:source-device"
depends_on:
- "publish-mediapicker-domain"
plugins: *common_plugins
plugins: [$CI_TOOLKIT]
command: |
.buildkite/publish-mediapicker-source-device.sh
- label: "Publish :mediapicker:source-camera"
depends_on:
- "publish-mediapicker-domain"
plugins: *common_plugins
plugins: [$CI_TOOLKIT]
command: |
.buildkite/publish-mediapicker-source-camera.sh
- label: "Publish :mediapicker:source-gif"
depends_on:
- "publish-mediapicker-domain"
plugins: *common_plugins
plugins: [$CI_TOOLKIT]
command: |
.buildkite/publish-mediapicker-source-gif.sh
- label: "Publish :mediapicker:source-wordpress"
depends_on:
- "publish-mediapicker-domain"
plugins: *common_plugins
plugins: [$CI_TOOLKIT]
command: |
.buildkite/publish-mediapicker-source-wordpress.sh
- label: "Publish :mediapicker"
depends_on:
- "publish-mediapicker-domain"
plugins: *common_plugins
plugins: [$CI_TOOLKIT]
command: |
.buildkite/publish-mediapicker.sh
7 changes: 1 addition & 6 deletions .buildkite/schedules/dependency-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
---

common_params:
# Common plugin settings to use with the `plugins` key.
- &common_plugins
- automattic/a8c-ci-toolkit#3.4.2

agents:
queue: "android"

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

0 comments on commit 9e96462

Please sign in to comment.