-
Notifications
You must be signed in to change notification settings - Fork 304
DO NOT MERGE: verify Sentry upload on CI #5750
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: ainfra-2790-remove-sentryproperties-in-favor-of-public-values-and-env
Are you sure you want to change the base?
Changes from all commits
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 @@ | ||||||||||||||||||
| #!/bin/bash -eu | ||||||||||||||||||
|
|
||||||||||||||||||
| # Throwaway: proves the Sentry mapping upload works with the auth token coming from the | ||||||||||||||||||
| # environment rather than `secret.properties`. No other CI job uploads, because they all | ||||||||||||||||||
| # pass `-PskipSentryProguardMappingUpload=true`. | ||||||||||||||||||
| # Delete this script and its pipeline step once AINFRA-2790 is verified. | ||||||||||||||||||
|
|
||||||||||||||||||
| "$(dirname "${BASH_SOURCE[0]}")/restore-cache.sh" | ||||||||||||||||||
|
|
||||||||||||||||||
| echo "--- :rubygems: Setting up Gems" | ||||||||||||||||||
|
|
||||||||||||||||||
| install_gems | ||||||||||||||||||
|
|
||||||||||||||||||
| echo "--- :closed_lock_with_key: Installing Secrets" | ||||||||||||||||||
|
|
||||||||||||||||||
| bundle exec fastlane run configure_apply | ||||||||||||||||||
|
|
||||||||||||||||||
| echo "--- :key: Checking SENTRY_AUTH_TOKEN" | ||||||||||||||||||
|
|
||||||||||||||||||
| if [ -n "${SENTRY_AUTH_TOKEN:-}" ]; then | ||||||||||||||||||
| echo "SENTRY_AUTH_TOKEN is present" | ||||||||||||||||||
| else | ||||||||||||||||||
| echo "SENTRY_AUTH_TOKEN is absent" | ||||||||||||||||||
| fi | ||||||||||||||||||
|
|
||||||||||||||||||
| # Minifies with R8 to produce each mapping, then uploads it. Deliberately not `assembleRelease`: | ||||||||||||||||||
| # packaging and signing are not needed. All three modules run because each declares its own | ||||||||||||||||||
| # Sentry project slug, and the token has to authenticate against all of them. | ||||||||||||||||||
| echo "--- :sentry: Uploading ProGuard mappings" | ||||||||||||||||||
|
|
||||||||||||||||||
| ./gradlew \ | ||||||||||||||||||
| :app:uploadSentryProguardMappingsRelease \ | ||||||||||||||||||
| :automotive:uploadSentryProguardMappingsRelease \ | ||||||||||||||||||
| :wear:uploadSentryProguardMappingsRelease | ||||||||||||||||||
|
Comment on lines
+31
to
+34
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. Without
Suggested change
Two related notes on this invocation: The task name is unverified anywhere in the repo. The source-context upload is not exercised. |
||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -87,6 +87,11 @@ steps: | |
| artifact_paths: | ||
| - "**/build/outputs/apk/**/*" | ||
|
|
||
| # Throwaway, delete with `.buildkite/commands/verify-sentry-upload.sh`. | ||
| - label: ":sentry: Verify Sentry Upload" | ||
| command: ".buildkite/commands/verify-sentry-upload.sh" | ||
| plugins: [ $CI_TOOLKIT ] | ||
|
Comment on lines
+90
to
+93
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. Cosmetic, but it costs nothing to avoid: the step lands immediately above the The rest of the step is consistent with its neighbours — Omitting the |
||
|
|
||
| ########## | ||
| # Optional Prototype Builds | ||
| # | ||
|
|
||
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.
The token check itself is right:
${SENTRY_AUTH_TOKEN:-}keepsset -uhappy and the value is never echoed, only its presence.It's one variable short of covering the failure modes, though.
build.gradle.kts:484-486gatesincludeProguardMappingonSystem.getenv()["CI"].toBoolean(), and the plugin only registers the upload tasks when that is true — so ifCIis unset or not literallytrue, the run fails withTask ... not found, indistinguishable from a wrong task name and nothing to do with the token. Buildkite exportsCI=true, so this is about keeping the log self-diagnosing rather than a likely break, and it costs one line: