https://github.com/mozilla-mobile/cloud-functions-slack
A Cloud Function to post Firebase Test Lab results to Slack
https://github.com/mozilla-mobile/cloud-functions-slack
Last synced: 11 months ago
JSON representation
A Cloud Function to post Firebase Test Lab results to Slack
- Host: GitHub
- URL: https://github.com/mozilla-mobile/cloud-functions-slack
- Owner: mozilla-mobile
- License: mpl-2.0
- Created: 2022-10-26T16:25:13.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-11T09:13:28.000Z (over 2 years ago)
- Last Synced: 2025-03-29T10:11:33.516Z (about 1 year ago)
- Language: JavaScript
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# cloud-functions-slack
A Cloud Function to post Firebase Test Lab results to Slack
Largely borrowed from: https://github.com/firebase/functions-samples/tree/main/testlab-to-slack
1. Clone or download this repo and open the `cloud-functions-slack`
directory.
2. You must have the Firebase CLI installed. If you don't have it install it
with `npm install -g firebase-tools` and then configure it with
`firebase login`.
3. Configure the CLI locally by using `firebase use --add` and select your
project in the list.
4. Install Cloud Functions dependencies locally by running:
`cd functions; npm install; cd -`
5. Set the following environment variables so that the function can authenticate with Slack and post to the correct room:
```firebase functions:config:set slack.webhook_url="YOUR_SLACK_WEBHOOK_URL"```
## Deploy and test
1. Deploy your function using `firebase deploy --only functions`
2. Navigate to the
[Test Lab](https://console.firebase.google.com/u/0/project/_/testlab/histories)
section of the Firebase Console and start a test.
1. Once the test finishes running,
[view the functions logs](https://console.firebase.google.com/u/0/project/_/functions/logs?severity=DEBUG)
for your project, and check that the test run status was logged.
## Example output
`TEST matrix-2pwpy02hkp9wc (created at 2022-09-26T00:25:58.392882Z): FINISHED. SUCCESS`