Automattic / pocket-casts-android

Pocket Casts Android 🎧
Mozilla Public License 2.0
2.53k stars 209 forks source link

[Dependency Analysis] Add Android Gradle Plugin #2433

Closed ParaskP7 closed 2 days ago

ParaskP7 commented 3 days ago

Project Thread: paaHJt-6yU-p2 Required By: BuildkiteCI#466

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 Instructions

  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 PCAndroid, 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/pocket-casts-android/builds?meta_data[pipeline_file]=schedules/dependency-analysis.yml

image

image

Checklist (N/A)

I have tested any UI changes... (N/A)

CLAassistant commented 3 days ago

CLA assistant check
All committers have signed the CLA.

dangermattic commented 3 days ago
1 Message
:book: This PR is still a Draft: some checks will be skipped.

Generated by :no_entry_sign: Danger