wordpress-mobile / AztecEditor-Android

A reusable native Android rich text editor component.
Mozilla Public License 2.0
700 stars 115 forks source link

[Dependency Analysis] Add Android Gradle Plugin #1084

Closed ParaskP7 closed 4 months ago

ParaskP7 commented 4 months ago

Project Thread: paaHJt-6yU-p2 Required By: BuildkiteCI#478 Depends On:

This PR adds the dependency analysis Android Gradle plugin to this project, for dependency analysis purposes.

Description

For now, only the main buildHealth task is going to be utilized and produce data once every week on CI (see this commit and this PR). Amongst other, this data will include the following:

Afterward, this data will get collected from CI and uploaded to our Apps Metrics infrastructure, for visualization and alerting purposes.

Testing Steps

  1. Local: Run the ./gradlew buildHealth task and verify that under the root level build/reports/dependency-analysis folder you get the below 2 reports both, in JSON and text format:
    • build-health-report.json
    • build-health-report.txt
  2. CI: Using the New Build 🟢 CI button for AztecAndroid, test this standalone dependency analysis job (see form below). Then:
    • When CI starts, make sure that adding /meta-data to that CI build's URL (example) will give you one extra meta-data, the pipeline_file one, with a value of schedules/dependency-analysis.yml (see screenshot below):
    • When CI completes, make sure that the below 2 CI artifacts are available both, in JSON and text format:
      • build/reports/dependency-analysis/build-health-report.json
      • build/reports/dependency-analysis/build-health-report.txt
  3. REST: Using the Buildkite's REST API you could query for this type of builds, using the meta-data query parameter, and see that the result is the expect one. Use this query: https://api.buildkite.com/v2/organizations/automattic/pipelines/azteceditor-android/builds?meta_data[pipeline_file]=schedules/dependency-analysis.yml

image

image