Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Configuration Cache] Disable Configuration Cache on CI #21659

Draft
wants to merge 10 commits into
base: trunk
Choose a base branch
from
167 changes: 18 additions & 149 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,165 +1,34 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
---

# Nodes with values to reuse in the pipeline.
common_params:
- &test_collector_common_params
files: "buildkite-test-analytics/*.xml"
format: "junit"

agents:
queue: "android"

steps:
#################
# Gradle Wrapper Validation
#################
- label: "Gradle Wrapper Validation"
- label: "🛠 Assemble with CC [With Restore]"
command: |
validate_gradle_wrapper
plugins: [$CI_TOOLKIT]

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

#################
# Linters
#################
- 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"
echo "--- :rubygems: Setting up Gems"
install_gems

- label: "🕵️ checkstyle"
command: |
./gradlew checkstyle
plugins: [$CI_TOOLKIT]
artifact_paths:
- "**/build/reports/checkstyle/checkstyle.*"
echo "--- :closed_lock_with_key: Installing Secrets"
bundle exec fastlane run configure_apply

- label: "🕵️ detekt"
command: |
./gradlew detekt
plugins: [$CI_TOOLKIT]
artifact_paths:
- "**/build/reports/detekt/detekt.html"
.buildkite/commands/restore-cache.sh

- label: "🕵️ Lint WordPress"
command: ".buildkite/commands/lint.sh wordpress"
plugins: [$CI_TOOLKIT]
artifact_paths:
- "**/build/reports/lint-results*.*"
echo "--- 🛠 Build with CC [With Restore]"
./gradlew assembleJetpackJalapenoDebug
plugins: [ $CI_TOOLKIT ]

- label: "🕵️ Lint Jetpack"
command: ".buildkite/commands/lint.sh jetpack"
plugins: [$CI_TOOLKIT]
artifact_paths:
- "**/build/reports/lint-results*.*"

- label: "Dependency Tree Diff"
- label: "🛠 Assemble without CC [With Restore]"
command: |
comment_with_dependency_diff 'WordPress' 'wordpressVanillaReleaseRuntimeClasspath'
if: build.pull_request.id != null
plugins: [$CI_TOOLKIT]

#################
# Unit Tests
#################
- group: "🔬 Unit Tests"
steps:
- label: "🔬 Unit Test WordPress"
command: ".buildkite/commands/run-unit-tests.sh wordpress"
plugins:
- $CI_TOOLKIT
- $TEST_COLLECTOR :
<<: *test_collector_common_params
api-token-env-name: "BUILDKITE_ANALYTICS_TOKEN_UNIT_TESTS_WORDPRESS"
artifact_paths:
- "**/build/test-results/merged-test-results.xml"

- label: "🔬 Unit Test Processors"
command: ".buildkite/commands/run-unit-tests.sh processors"
plugins:
- $CI_TOOLKIT
- $TEST_COLLECTOR :
<<: *test_collector_common_params
api-token-env-name: "BUILDKITE_ANALYTICS_TOKEN_UNIT_TESTS_PROCESSORS"
artifact_paths:
- "**/build/test-results/merged-test-results.xml"

- label: "🔬 Unit Test Image Editor"
command: ".buildkite/commands/run-unit-tests.sh image-editor"
plugins:
- $CI_TOOLKIT
- $TEST_COLLECTOR :
<<: *test_collector_common_params
api-token-env-name: "BUILDKITE_ANALYTICS_TOKEN_UNIT_TESTS_IMAGE_EDITOR"
artifact_paths:
- "**/build/test-results/merged-test-results.xml"

- label: "🔬 Unit Test FluxC"
command: ".buildkite/commands/run-unit-tests.sh fluxc"
plugins:
- $CI_TOOLKIT
- $TEST_COLLECTOR:
<<: *test_collector_common_params
api-token-env-name: "BUILDKITE_ANALYTICS_TOKEN_UNIT_TESTS_FLUXC"
artifact_paths:
- "**/build/test-results/merged-test-results.xml"

- label: "🔬 Unit Test Login"
command: ".buildkite/commands/run-unit-tests.sh login"
plugins:
- $CI_TOOLKIT
- $TEST_COLLECTOR:
<<: *test_collector_common_params
api-token-env-name: "BUILDKITE_ANALYTICS_TOKEN_UNIT_TESTS_LOGIN"
artifact_paths:
- "**/build/test-results/merged-test-results.xml"

#################
# Instrumented (aka UI) Tests
#################
# - group: "🔬 Instrumented tests"
# steps:
# - label: ":wordpress: 🔬 Instrumented tests"
# command: ".buildkite/commands/run-instrumented-tests.sh wordpress"
# plugins:
# - $CI_TOOLKIT
# - $TEST_COLLECTOR :
# <<: *test_collector_common_params
# api-token-env-name: "BUILDKITE_ANALYTICS_TOKEN_INSTRUMENTED_TESTS_WORDPRESS"
# artifact_paths:
# - "**/build/instrumented-tests/**/*"
echo "--- :rubygems: Setting up Gems"
install_gems

# - label: ":jetpack: 🔬 Instrumented tests"
# command: ".buildkite/commands/run-instrumented-tests.sh jetpack"
# plugins:
# - $CI_TOOLKIT
# - $TEST_COLLECTOR :
# <<: *test_collector_common_params
# api-token-env-name: "BUILDKITE_ANALYTICS_TOKEN_INSTRUMENTED_TESTS_JETPACK"
# artifact_paths:
# - "**/build/instrumented-tests/**/*"
echo "--- :closed_lock_with_key: Installing Secrets"
bundle exec fastlane run configure_apply

#################
# Create Prototype Builds for WP and JP
#################
- group: "📲 Prototype Builds"
steps:
- label: ":wordpress: :android: Prototype Build"
command: ".buildkite/commands/prototype-build.sh wordpress"
if: build.pull_request.id != null
plugins: [$CI_TOOLKIT]
.buildkite/commands/restore-cache.sh

- label: ":jetpack: :android: Prototype Build"
command: ".buildkite/commands/prototype-build.sh jetpack"
if: build.pull_request.id != null
plugins: [$CI_TOOLKIT]
echo "--- 🛠 Build without CC [With Restore]"
./gradlew assembleJetpackJalapenoDebug --no-configuration-cache
plugins: [ $CI_TOOLKIT ]