Skip to content

Commit 0f7ff8f

Browse files
authored
feat: Add monitoring to coveo token generation workflow (#1288)
1 parent 3111b30 commit 0f7ff8f

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

.github/workflows/coveo.yml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ jobs:
88
generate-coveo-search-token:
99
name: Generate Coveo Search Tokens
1010
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
actions: read # for 8398a7/action-slack
1114
strategy:
1215
matrix:
1316
include:
@@ -69,8 +72,31 @@ jobs:
6972
name: ${{matrix.env_name}}
7073
path: "./"
7174

75+
- name: Send a notification if token generation step failed
76+
if: ${{ steps.generate-token.outcome == 'failure' }}
77+
uses: 8398a7/action-slack@77eaa4f1c608a7d68b38af4e3f739dcd8cba273e # v3.19.0
78+
with:
79+
status: custom
80+
custom_payload: |
81+
{
82+
username: 'Github',
83+
mention: 'channel',
84+
attachments: [{
85+
title: '[${{ github.event.repository.full_name }}] Coveo Token Generation Failed (${{matrix.env_name}} environment)',
86+
color: 'danger',
87+
fields: [{
88+
title: 'Pipeline URL',
89+
value: '<https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.run_id }}>',
90+
short: false
91+
}]
92+
}]
93+
}
94+
env:
95+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_DOCS_INCIDENT }}
96+
97+
7298
push-tokens-to-azure:
73-
name: Push coveo search tokens to Azure
99+
name: Batch push coveo search tokens to Azure
74100
runs-on: ubuntu-latest
75101
needs: generate-coveo-search-token
76102
steps:

0 commit comments

Comments
 (0)