Skip to content

Commit

Permalink
Adopt shared vars and omit unnecessary quotes in Buildkite pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
mokagio committed Sep 9, 2024
1 parent 39871eb commit a9a7e74
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 21 deletions.
33 changes: 12 additions & 21 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,35 @@
# 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#2.13.0

agents:
queue: "android"
queue: android

# This is the default pipeline – it will build and test the app
steps:
- label: "Gradle Wrapper Validation"
command: |
validate_gradle_wrapper
plugins: *common_plugins
- label: ":gradle: Gradle Wrapper Validation"
command: validate_gradle_wrapper
plugins: [$CI_TOOLKIT_PLUGIN]

# Wait for Gradle Wrapper to be validated before running any other jobs
- wait

- label: "🛠 Build and Test"
- label: ":hammer_and_pick: Build and Test"
command: ./gradlew --stacktrace testRelease
plugins: *common_plugins
plugins: [$CI_TOOLKIT_PLUGIN]

- label: "☢️ Danger - PR Check"
- label: ":radioactive_sign: Danger - PR Check"
command: danger
key: danger
if: "build.pull_request.id != null"
retry:
manual:
permit_on_passed: true
agents:
queue: "linter"
queue: linter

- label: "🔬 Lint"
- label: ":microscope: Lint"
command: ./gradlew --stacktrace lintRelease
plugins: *common_plugins
plugins: [$CI_TOOLKIT_PLUGIN]

- label: "🛠 Prototype Build"
- label: ":hammer_and_pick: Prototype Build"
command: .buildkite/commands/build-prototype.sh
plugins: *common_plugins
plugins: [$CI_TOOLKIT_PLUGIN]
if: "build.pull_request.id != null || build.pull_request.draft"
8 changes: 8 additions & 0 deletions .buildkite/shared-pipeline-vars
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/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_PLUGIN_VERSION="3.5.1"

export CI_TOOLKIT_PLUGIN="automattic/a8c-ci-toolkit#$CI_TOOLKIT_PLUGIN_VERSION"

0 comments on commit a9a7e74

Please sign in to comment.