A simple script to check test results and post them when they are changed as a Slack message
- Create a Slack bot
- Get cookies from E-Nabiz
Crontab can be useful to check results regularly.
- Create an environment file, named
.env
export SLACK_TOKEN="xoxb-123-456-abc..." export COOKIE="f5_cspm=..." export MENTION_USERNAME="username"
- Edit the current crontab
$ crontab -e
- Add the check script to run for every 2 minutes
*/2 * * * * cd /tmp/covid19-test-result-check && (source .env && ./check.sh >> ./check.log 2>&1)