-
Notifications
You must be signed in to change notification settings - Fork 304
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adopt shared vars and omit unnecessary quotes in Buildkite pipeline
See also woocommerce/woocommerce-ios#13872
- Loading branch information
Showing
2 changed files
with
20 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |