Node/testlab-to-slack/README.md
This sample demonstrates how to post to a Slack channel in response to the completion of a Test Matrix in Firebase Test Lab. The message will look like this:
Add an Incoming Webhook to your Slack channel and take note of the Webhook URL.
Clone or download this repo and open this directory in a terminal:
cd 2nd-gen/testlab-to-slack
You must have the latest Firebase CLI installed. If you don't have it,
install it with npm install -g firebase-tools and then sign in with
firebase login.
Configure the CLI locally by using firebase use --add and select your
project in the list.
Install Cloud Functions dependencies locally by running:
cd functions; npm install; cd -
Set the following environment variables so that the function can authenticate with Slack and post to the correct room:
firebase functions:secrets:set SLACK_WEBHOOK_URL
Enter the value of your Slack url to save it into Secret Manager.
This sample comes with a web-based UI for testing the function. To test it out:
firebase deploy --only functions