Hardcode Sentry crash endpoint for PR builds

This commit is contained in:
Dale Glass 2023-06-11 01:53:15 +02:00
parent 258e1de181
commit 2780f375ea
2 changed files with 11 additions and 5 deletions

View file

@ -19,7 +19,7 @@ env:
UPLOAD_BUCKET: overte-public
UPLOAD_REGION: fra1
UPLOAD_ENDPOINT: "https://fra1.digitaloceanspaces.com"
CMAKE_BACKTRACE_URL: ${{ secrets.SENTRY_MINIDUMP_ENDPOINT || vars.SENTRY_PR_MINIDUMP_ENDPOINT }}
CMAKE_BACKTRACE_URL: ${{ secrets.SENTRY_MINIDUMP_ENDPOINT }}
CMAKE_BACKTRACE_TOKEN: server_${{ github.event.number }}_${{ github.sha }}
jobs:
@ -210,7 +210,14 @@ jobs:
- name: Configure CMake
working-directory: build
shell: bash
run: cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DVCPKG_BUILD_TYPE=release $CMAKE_EXTRA
run: |
if [ -z "$CMAKE_BACKTRACE_URL" ] ; then
# We're building a PR, default to the PR endpoint
export CMAKE_BACKTRACE_URL="https://o4504831972343808.ingest.sentry.io/api/4504832427950080/minidump/?sentry_key=f511de295975461b8f92a36f4a4a4f32"
export CMAKE_BACKTRACE_TOKEN="server_pr_${{ github.event.number }}_${{ github.sha }}"
fi
cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DVCPKG_BUILD_TYPE=release $CMAKE_EXTRA
- name: Compress cmake logs
if: always()

View file

@ -21,9 +21,8 @@ env:
RELEASE_NUMBER: ${{ github.event.number }}
VERSION_CODE: ${{ github.event.number }}
# Sentry Crash Reporting
# We use a variable rather than a secret here -- this makes the URL more exposed, so there's some risk of somebody
# using it for no good. But then the secret can also be extracted from a binary.
CMAKE_BACKTRACE_URL: ${{ vars.SENTRY_PR_MINIDUMP_ENDPOINT }}
# We can't use secrets or actions here, so the actual value has to be hardcoded.
CMAKE_BACKTRACE_URL: "https://o4504831972343808.ingest.sentry.io/api/4504832427950080/minidump/?sentry_key=f511de295975461b8f92a36f4a4a4f32"
CMAKE_BACKTRACE_TOKEN: PR_${{ github.event.number }}_${{ github.sha }}
UPLOAD_BUCKET: overte-public