You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(build): Track plugin versions from SENTRY_PIPELINE in build uploads (EME-606) (#2994)
## Summary
Automatically track Sentry plugin versions in build uploads by parsing
the existing `SENTRY_PIPELINE` environment variable. This enables size
analysis and build distribution tracking by storing plugin version
metadata in the PreprodArtifact database table.
## Changes
### Plugin Version Detection
- Reads the existing `SENTRY_PIPELINE` environment variable
- Parses format: `sentry-gradle-plugin/4.12.0` or
`sentry-fastlane-plugin/1.2.3`
- Only extracts versions for recognized Sentry plugins:
- `sentry-gradle-plugin`
- `sentry-fastlane-plugin`
### Metadata File Format
The `.sentry-cli-metadata.txt` file inside uploaded zips now includes
detected plugin info:
```
sentry-cli-version: 2.58.2
sentry-gradle-plugin: 4.12.0
```
Related PRs:
getsentry/launchpad#464getsentry/sentry#103062getsentry/sentry-android-gradle-plugin#1036getsentry/sentry-fastlane-plugin#365
---------
Co-authored-by: Claude <[email protected]>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,9 +9,11 @@
9
9
## 2.58.3
10
10
11
11
### Improvements
12
+
12
13
- For the `sentry-cli build upload` command, we now only auto-detect Git metadata when we detect we are running in a CI environment, unless the user manually overrides this behavior ([#2974](https://github.com/getsentry/sentry-cli/pull/2974)). This change prevents local development builds from triggiering GitHub status checks for size analysis.
13
14
- We can detect most common CI environments based on the environment variables these set.
14
15
- We introduced two new arguments, `--force-git-metadata` and `--no-git-metadata`, which force-enable and force-disable automatic Git data collection, respectively, overriding the default behavior.
16
+
- The `sentry-cli build upload` command now automatically tracks Sentry plugin versions from the `SENTRY_PIPELINE` environment variable ([#2994](https://github.com/getsentry/sentry-cli/pull/2994)). When `SENTRY_PIPELINE` contains a recognized Sentry plugin (e.g., `sentry-gradle-plugin/4.12.0` or `sentry-fastlane-plugin/1.2.3`), the plugin version is written to the `.sentry-cli-metadata.txt` file in uploaded build archives, enabling the backend to store metadata for size analysis and build distribution tracking.
15
17
- The `sentry-cli build upload` command now automatically detects the correct branch or tag reference in non-PR GitHub Actions workflows ([#2976](https://github.com/getsentry/sentry-cli/pull/2976)). Previously, `--head-ref` was only auto-detected for pull request workflows. Now it works for push, release, and other workflow types by using the `GITHUB_REF_NAME` environment variable.
0 commit comments