-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat(preprod): Add build distribution docs #15463
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
base: master
Are you sure you want to change the base?
Changes from all commits
4c5b21f
81f8bf5
f301514
5796a5b
aebf531
f37d88a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| --- | ||
| title: Build Distribution | ||
| sidebar_title: Build Distribution | ||
| sidebar_order: 5250 | ||
| description: Upload Android builds to Sentry for distribution to internal teams and beta testers. | ||
| --- | ||
|
|
||
| <Include name="build-distribution/ea" /> | ||
|
|
||
| [Build Distribution](/product/build-distribution) helps you securely distribute Android builds to your internal teams and beta testers. | ||
|
|
||
| ## Getting Started | ||
|
|
||
| **Accepted Formats**: AAB (preferred) | APK | ||
|
|
||
| **Upload Mechanisms**: [Gradle](#uploading-with-gradle) | [Sentry CLI](#uploading-with-the-sentry-cli) | ||
|
|
||
| ### Uploading With Gradle | ||
|
|
||
| <Include name="build-distribution/upload-gradle" /> | ||
|
|
||
| ### Uploading With the Sentry CLI | ||
|
|
||
| <Include name="size-analysis/upload-cli-android" /> | ||
|
|
||
| ## Upload Metadata | ||
|
|
||
| <Include name="size-analysis/upload-metadata" /> | ||
|
|
||
| ### Build Configuration | ||
|
|
||
| <Include name="size-analysis/upload-metadata" /> | ||
|
|
||
| <PageGrid /> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| --- | ||
| title: Build Distribution | ||
| sidebar_order: 5250 | ||
| description: Upload iOS builds to Sentry for distribution to internal teams and beta testers. | ||
| --- | ||
|
|
||
| <Include name="build-distribution/ea" /> | ||
|
|
||
| [Build Distribution](/product/build-distribution) helps you securely distribute iOS builds to your internal teams and beta testers. | ||
| Streamline your distribution workflow with automated uploads from CI. | ||
|
|
||
| ## Getting Started | ||
|
|
||
| **Accepted Formats**: XCArchive (preferred) | IPA | ||
|
|
||
| **Upload Mechanisms**: [Fastlane Plugin](#uploading-with-fastlane) (version 1.35.0 or higher) _or_ [Sentry CLI](#uploading-with-the-sentry-cli) | ||
|
|
||
| ### Uploading With Fastlane | ||
|
|
||
| <Include name="size-analysis/upload-fastlane" /> | ||
|
|
||
| ### Uploading with the Sentry CLI | ||
|
|
||
| <Include name="size-analysis/upload-cli-ios" /> | ||
|
|
||
| ## Upload Metadata | ||
|
|
||
| <Include name="size-analysis/upload-metadata" /> | ||
|
|
||
| ### Build Configuration | ||
|
|
||
| <Include name="size-analysis/build-configuration-ios" /> | ||
|
|
||
| ## Distribution Management | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is something missing here? It seems like there's no content for 'Distribution Management' under this header. |
||
|
|
||
| ## What's Next? | ||
|
|
||
| We strongly recommend integrating Build Distribution into your CI pipeline for automated distribution workflows. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I may be misinterpreting, but is this recommending what we've already done on this page as the 'next step'? Is there a recommended next step that can link to another place in docs? |
||
|
|
||
| <PageGrid /> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| --- | ||
| title: Build Distribution | ||
| sidebar_order: 137 | ||
| description: Distribute app builds to internal teams and beta testers. | ||
| --- | ||
|
|
||
| <Include name="build-distribution/ea" /> | ||
|
|
||
| Build Distribution enables you to securely distribute app builds to your internal teams and beta testers. Upload builds from CI to streamline your distribution workflow, manage access control, and track installation analytics. | ||
|
|
||
| ### CI Integration | ||
|
|
||
| Integrate Build Distribution into your CI pipeline to automatically distribute builds to your teams. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need to mention anything else? |
||
|
|
||
| ## Upload Guides | ||
|
|
||
| You can follow the platform guides to learn how to upload builds for distribution: | ||
|
|
||
| - [iOS](/platforms/apple/guides/ios/build-distribution/) | ||
| - [Android](/platforms/android/build-distribution/) | ||
|
|
||
| ### Upload Metadata | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this section is redundant since it also appears in the sections for each platform. |
||
|
|
||
| Below is the metadata included in your build, regardless of the platform. | ||
|
|
||
| <Include name="size-analysis/upload-metadata" /> | ||
|
|
||
| <PageGrid /> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| <Include name="feature-available-for-user-group-early-adopter" /> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| <GradleUploadInstructions feature="distribution" /> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,100 +1 @@ | ||
| The Gradle plugin automatically detects build metadata from your git repository. On GitHub Actions, all metadata is automatically detected. On other CI systems, you may need to manually set some values using the `vcsInfo` extension. | ||
|
|
||
| 1. Configure the [Sentry Android Gradle plugin](/platforms/android/configuration/gradle/) with at least version `6.0.0-beta1` | ||
|
|
||
| 2. Set the auth token as an environment variable to be used when running your release build. | ||
|
|
||
| <OrgAuthTokenNote /> | ||
|
|
||
| ```bash | ||
| export SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___ | ||
| ``` | ||
|
|
||
| 3. Enable uploading for size analysis for CI builds. | ||
|
|
||
| ```kotlin {filename:build.gradle.kts} | ||
| sentry { | ||
| sizeAnalysis { | ||
| enabled = providers.environmentVariable("GITHUB_ACTIONS").isPresent | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ```groovy {filename:build.gradle} | ||
| sentry { | ||
| sizeAnalysis { | ||
| enabled = providers.environmentVariable("GITHUB_ACTIONS").present | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| 4. Invoke the following Gradle tasks to build your app and trigger the upload. | ||
|
|
||
| ```aab {filename:aab} | ||
| ./gradlew bundleRelease | ||
| ``` | ||
|
|
||
| ```apk {filename:apk} | ||
| ./gradlew assembleRelease | ||
| ``` | ||
|
|
||
| 5. After an upload has successfully processed, confirm the metadata is correct in the Sentry UI | ||
|
|
||
|  | ||
|
|
||
| ### Overriding Metadata | ||
|
|
||
| The Gradle plugin automatically detects build metadata from your git repository. On GitHub Actions, all metadata is automatically detected. On other CI systems, you may need to manually set some values using the `vcsInfo` extension. | ||
|
|
||
| Configure overrides in your Gradle build configuration: | ||
|
|
||
| ```kotlin {filename:build.gradle.kts} | ||
| sentry { | ||
| sizeAnalysis { | ||
| enabled = providers.environmentVariable("GITHUB_ACTIONS").isPresent | ||
| } | ||
|
|
||
| vcsInfo { | ||
| headSha.set("abc123") | ||
| baseSha.set("def456") | ||
| vcsProvider.set("github") | ||
| headRepoName.set("organization/repository") | ||
| baseRepoName.set("organization/repository") | ||
| headRef.set("feature-branch") | ||
| baseRef.set("main") | ||
| prNumber.set(42) | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ```groovy {filename:build.gradle} | ||
| sentry { | ||
| sizeAnalysis { | ||
| enabled = providers.environmentVariable("GITHUB_ACTIONS").present | ||
| } | ||
|
|
||
| vcsInfo { | ||
| headSha = 'abc123' | ||
| baseSha = 'def456' | ||
| vcsProvider = 'github' | ||
| headRepoName = 'organization/repository' | ||
| baseRepoName = 'organization/repository' | ||
| headRef = 'feature-branch' | ||
| baseRef = 'main' | ||
| prNumber = 42 | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| Available `vcsInfo` properties: | ||
|
|
||
| | Property | Type | Description | | ||
| | -------------- | ------ | --------------------------------- | | ||
| | `headSha` | String | Current commit SHA | | ||
| | `baseSha` | String | Base commit SHA (for comparison) | | ||
| | `vcsProvider` | String | VCS provider (e.g., "github") | | ||
| | `headRepoName` | String | Repository name (org/repo format) | | ||
| | `baseRepoName` | String | Base repository name | | ||
| | `headRef` | String | Branch or tag name | | ||
| | `baseRef` | String | Base branch name | | ||
| | `prNumber` | Int | Pull request number | | ||
| <GradleUploadInstructions feature="sizeAnalysis" /> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| import {CodeBlock} from './codeBlock'; | ||
| import {CodeTabs} from './codeTabs'; | ||
| import {codeToJsx} from './highlightCode'; | ||
|
|
||
| type Props = { | ||
| feature: string; | ||
| }; | ||
|
|
||
| export function GradleFeatureConfig({feature}: Props) { | ||
| return ( | ||
| <CodeTabs> | ||
| <CodeBlock language="kotlin" filename="build.gradle.kts"> | ||
| <pre> | ||
| {codeToJsx( | ||
| `sentry { | ||
| ${feature} { | ||
| enabled = providers.environmentVariable("GITHUB_ACTIONS").isPresent | ||
| } | ||
| }`, | ||
| 'kotlin' | ||
| )} | ||
| </pre> | ||
| </CodeBlock> | ||
|
|
||
| <CodeBlock language="groovy" filename="build.gradle"> | ||
| <pre> | ||
| {codeToJsx( | ||
| `sentry { | ||
| ${feature} { | ||
| enabled = providers.environmentVariable("GITHUB_ACTIONS").present | ||
| } | ||
| }`, | ||
| 'groovy' | ||
| )} | ||
| </pre> | ||
| </CodeBlock> | ||
| </CodeTabs> | ||
| ); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Clean Up Android Build Configuration Duplication
The Build Configuration section duplicates the same
size-analysis/upload-metadatainclude that appears in the Upload Metadata section above. Based on the iOS documentation structure and the existing Android size-analysis page, this should besize-analysis/build-configuration-androidinstead.