mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 15:12:02 +00:00
github-actions: report run failures to sentry (#59060)
* github-actions: report run failures to sentry * report job name as well * make buildchecker action consistent
This commit is contained in:
parent
73e3500f0d
commit
836271fddf
4
.github/workflows/buildchecker.yml
vendored
4
.github/workflows/buildchecker.yml
vendored
@ -27,11 +27,11 @@ jobs:
|
||||
SLACK_ANNOUNCE_WEBHOOK: ${{ secrets.AUTOBUILDSHERRIF_SLACK_WEBHOOK }}
|
||||
SLACK_DEBUG_WEBHOOK: ${{ secrets.AUTOBUILDSHERRIF_SLACK_DEBUG_WEBHOOK }}
|
||||
SLACK_TOKEN: ${{ secrets.AUTOBUILDSHERRIF_SLACK_TOKEN }}
|
||||
- name: report failure to sentry
|
||||
- name: Report failure to sentry
|
||||
if: ${{ failure() }}
|
||||
run: |
|
||||
npm i -g @sentry/cli
|
||||
sentry-cli send-event -m 'buildchecker action failure - see run for exact failure' \
|
||||
sentry-cli send-event -m "Job '$GITHUB_JOB' in the $GITHUB_WORKFLOW action has failed - see run for exact failure" \
|
||||
-t "github-action:$GITHUB_WORKFLOW" \
|
||||
-t "branch:$GITHUB_REF_NAME" \
|
||||
-t "repository:$GITHUB_REPOSITORY" \
|
||||
|
||||
14
.github/workflows/licenses-update.yml
vendored
14
.github/workflows/licenses-update.yml
vendored
@ -57,3 +57,17 @@ jobs:
|
||||
token: ${{ secrets.GH_REPO_TOKEN }}
|
||||
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
|
||||
merge-method: squash
|
||||
|
||||
- name: Report failure to sentry
|
||||
if: ${{ failure() }}
|
||||
run: |
|
||||
npm i -g @sentry/cli
|
||||
sentry-cli send-event -m "Job '$GITHUB_JOB' in the $GITHUB_WORKFLOW action has failed - see run for exact failure" \
|
||||
-t "github-action:$GITHUB_WORKFLOW" \
|
||||
-t "branch:$GITHUB_REF_NAME" \
|
||||
-t "repository:$GITHUB_REPOSITORY" \
|
||||
-t "workflow-run:$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
|
||||
env:
|
||||
SENTRY_DSN: ${{ secrets.SENTRY_DEV_INFRA_DSN }}
|
||||
SENTRY_ORG: sourcegraph
|
||||
SENTRY_PROJECT: dev-infra
|
||||
|
||||
13
.github/workflows/pr-auditor.yml
vendored
13
.github/workflows/pr-auditor.yml
vendored
@ -20,3 +20,16 @@ jobs:
|
||||
GITHUB_EVENT_PATH: ${{ env.GITHUB_EVENT_PATH }}
|
||||
GITHUB_TOKEN: ${{ secrets.PR_AUDITOR_TOKEN }}
|
||||
GITHUB_RUN_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||
- name: Report failure to sentry
|
||||
if: ${{ failure() }}
|
||||
run: |
|
||||
npm i -g @sentry/cli
|
||||
sentry-cli send-event -m "Job $GITHUB_JOB in the $GITHUB_WORKFLOW action has failed - see run for exact failure" \
|
||||
-t "github-action:$GITHUB_WORKFLOW" \
|
||||
-t "branch:$GITHUB_REF_NAME" \
|
||||
-t "repository:$GITHUB_REPOSITORY" \
|
||||
-t "workflow-run:$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
|
||||
env:
|
||||
SENTRY_DSN: ${{ secrets.SENTRY_DEV_INFRA_DSN }}
|
||||
SENTRY_ORG: sourcegraph
|
||||
SENTRY_PROJECT: dev-infra
|
||||
|
||||
14
.github/workflows/sg-binary-release.yml
vendored
14
.github/workflows/sg-binary-release.yml
vendored
@ -125,3 +125,17 @@ jobs:
|
||||
env:
|
||||
repo: sourcegraph/sg
|
||||
GITHUB_TOKEN: ${{ secrets.SG_RELEASE_TOKEN }}
|
||||
|
||||
- name: Report failure to sentry
|
||||
if: ${{ failure() }}
|
||||
run: |
|
||||
npm i -g @sentry/cli
|
||||
sentry-cli send-event -m "Job '$GITHUB_JOB' in the $GITHUB_WORKFLOW action has failed - see run for exact failure" \
|
||||
-t "github-action:$GITHUB_WORKFLOW" \
|
||||
-t "branch:$GITHUB_REF_NAME" \
|
||||
-t "repository:$GITHUB_REPOSITORY" \
|
||||
-t "workflow-run:$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
|
||||
env:
|
||||
SENTRY_DSN: ${{ secrets.SENTRY_DEV_INFRA_DSN }}
|
||||
SENTRY_ORG: sourcegraph
|
||||
SENTRY_PROJECT: dev-infra
|
||||
|
||||
14
.github/workflows/tracking-issue.yml
vendored
14
.github/workflows/tracking-issue.yml
vendored
@ -10,3 +10,17 @@ jobs:
|
||||
- uses: docker://sourcegraph/tracking-issue:latest
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.TRACKING_ISSUE_SYNCER_TOKEN_DEVX_BOT }}
|
||||
- name: Report failure to sentry
|
||||
if: ${{ failure() }}
|
||||
run: |
|
||||
npm i -g @sentry/cli
|
||||
sentry-cli send-event -m "Job '$GITHUB_JOB' in the $GITHUB_WORKFLOW action has failed - see run for exact failure" \
|
||||
-t "github-action:$GITHUB_WORKFLOW" \
|
||||
-t "branch:$GITHUB_REF_NAME" \
|
||||
-t "repository:$GITHUB_REPOSITORY" \
|
||||
-t "workflow-run:$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
|
||||
env:
|
||||
SENTRY_DSN: ${{ secrets.SENTRY_DEV_INFRA_DSN }}
|
||||
SENTRY_ORG: sourcegraph
|
||||
SENTRY_PROJECT: dev-infra
|
||||
|
||||
|
||||
13
.github/workflows/universal-ctags.yml
vendored
13
.github/workflows/universal-ctags.yml
vendored
@ -122,3 +122,16 @@ jobs:
|
||||
path: './dist/'
|
||||
destination: 'universal_ctags/x86_64-linux'
|
||||
glob: 'universal-ctags-*'
|
||||
- name: Report failure to sentry
|
||||
if: ${{ failure() }}
|
||||
run: |
|
||||
npm i -g @sentry/cli
|
||||
sentry-cli send-event -m "Job '$GITHUB_JOB' in the $GITHUB_WORKFLOW action has failed - see run for exact failure" \
|
||||
-t "github-action:$GITHUB_WORKFLOW" \
|
||||
-t "branch:$GITHUB_REF_NAME" \
|
||||
-t "repository:$GITHUB_REPOSITORY" \
|
||||
-t "workflow-run:$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
|
||||
env:
|
||||
SENTRY_DSN: ${{ secrets.SENTRY_DEV_INFRA_DSN }}
|
||||
SENTRY_ORG: sourcegraph
|
||||
SENTRY_PROJECT: dev-infra
|
||||
|
||||
Loading…
Reference in New Issue
Block a user