Repository navigation
feat: replace Mattermost Jenkins build notifications with Pub/Sub chat notifications - #1580
Merged
Merged
Conversation
…t notifications
At HEAD, main-branch build results go to the `#kernelops` Mattermost channel and other branches post to `#builds`.
- Remove `MATTERMOST_CHANNEL` and the now-unused `GIT_COMMIT_SUMMARY` from `environment {}`
- Add `notifyChat` helper that publishes a JSON payload with `channel: kernelops` to the `chat-notifications` topic
- Call `notifyChat` from `post` on `main` only; drop `mattermostSend` so other branches send no notification
TAG=agy
CONV=8b51716c-7fff-43b9-b933-713ce8bf908b
KeijiBranshi
force-pushed
the
keijibranshi/feat/jenkins-gchat-notifications
branch
from
December 3, 2026 22:39
03f5a52 to
003e4f6
Compare
erdalsivri
approved these changes
Dec 3, 2026
KeijiBranshi
deleted the
keijibranshi/feat/jenkins-gchat-notifications
branch
December 3, 2026 22:46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
At HEAD,
mainbranch build results (failed / passed / aborted) go to the#kernelopsMattermost channel viamattermostSend, and other branches post to#builds.This drops Mattermost entirely.
mainbranch notifications now go to Google Chat: the build publishes a JSON message to thechat-notificationsPub/Sub topic, and an internal relay delivers it to thekernelopschannel. Non-mainbranches no longer send any notification.MATTERMOST_CHANNELand the now-unusedGIT_COMMIT_SUMMARYfromenvironment {}notifyChat(status, color, outcome)helper. It builds the payload withpython3/json.dumps, which safely escapes commit subjects and author names, and publishes it withgcloud pubsub topics publishpost { failure / success / aborted }callsnotifyChatonly whenenv.GIT_BRANCH == 'main'.mattermostSendis removedVerification
bash -non the extractedshblock"$(rm -rf /)" 'single' \backslash\), and empty env vars. Output is valid JSON with the expectedchannel,status,color,textandlinksgcloudfor both the success path and the publish-failure warning pathmattermostSend,MATTERMOST_CHANNELorGIT_COMMIT_SUMMARYremains inJenkinsfileTAG=agy
CONV=8b51716c-7fff-43b9-b933-713ce8bf908b