oncall-engine/grafana-plugin
Joey Orlando 8f22b2fd74
first UI integration test - phone verification + receive SMS alert flow (#900)
**What this PR does**:
Adds our first UI integration test using
[Playwright](https://playwright.dev/) and runs the test on CI. Right now
the test:
- logs into Grafana
- configures the plugin (if it isn't already)
- creates an OnCall schedule, where the current user will be OnCall
- creates an escalation chain to notify based on the newly created
OnCall schedule
- creates a webhook integration, attached to the created escalation
chain
- sends a demo alert for the new integration
- goes to the alert groups page and validates that the escalation step
to alert the OnCall user actually happened

Currently the Playwright tests are run against the 3 default headless
browsers, chromium, Firefox, and webkit. The CI job that runs these
tests is run as a matrix against 3 tagged versions of `grafana`; `main`,
`latest`, and `9.2.6`.

Secondly, it adds most of the logic for a second test which:
- logs into Grafana
- configures the plugin (if it isn't already)
- goes to the user's settings, verifies their phone number (using a tool
called [MailSlurp](https://www.mailslurp.com/))
- configures the current user's default escalation policy to send alerts
via SMS
- creates an escalation policy and configures it to send alerts to our
current user
- creates an integration and assigns the created escalation policy
- triggers a test alert + verifies that we receive the SMS alert text
(again, using MailSlurp)

**Which issue(s) this PR fixes**:
Closes #873 

**Checklist**
- [x] Tests updated
- [ ] Documentation added (N/A)
- [ ] `CHANGELOG.md` updated (N/A)
2023-03-06 16:28:52 +00:00
..
integration-tests first UI integration test - phone verification + receive SMS alert flow (#900) 2023-03-06 16:28:52 +00:00
provisioning World, meet OnCall! 2022-06-03 08:09:47 -06:00
src first UI integration test - phone verification + receive SMS alert flow (#900) 2023-03-06 16:28:52 +00:00
tools Merge dev to main (#54) 2022-06-13 16:39:58 -06:00
.dockerignore One startup command to rule them all (#760) 2022-11-07 16:34:43 +01:00
.env.example first UI integration test - phone verification + receive SMS alert flow (#900) 2023-03-06 16:28:52 +00:00
.eslintignore World, meet OnCall! 2022-06-03 08:09:47 -06:00
.eslintrc.js added dotenv to read env variables, pass faro instance to this.faro 2022-12-15 17:47:30 +02:00
.gitignore first UI integration test - phone verification + receive SMS alert flow (#900) 2023-03-06 16:28:52 +00:00
.prettierrc.js World, meet OnCall! 2022-06-03 08:09:47 -06:00
.release-it.js World, meet OnCall! 2022-06-03 08:09:47 -06:00
.stylelintignore World, meet OnCall! 2022-06-03 08:09:47 -06:00
.stylelintrc add selector-max-type stylelint rule 2022-11-02 11:44:42 +00:00
babel.config.json add precommit rules for markdown/json files (#915) 2022-12-01 14:26:54 +01:00
Dockerfile.dev One startup command to rule them all (#760) 2022-11-07 16:34:43 +01:00
grafana-plugin.yml.example World, meet OnCall! 2022-06-03 08:09:47 -06:00
jest.config.js first UI integration test - phone verification + receive SMS alert flow (#900) 2023-03-06 16:28:52 +00:00
jest.setup.ts Get rid of installation token + add a bunch of tests (#624) 2022-11-21 16:26:00 +01:00
LICENSE World, meet OnCall! 2022-06-03 08:09:47 -06:00
package.json first UI integration test - phone verification + receive SMS alert flow (#900) 2023-03-06 16:28:52 +00:00
playwright.config.ts first UI integration test - phone verification + receive SMS alert flow (#900) 2023-03-06 16:28:52 +00:00
plopfile.js Merge dev to main (#54) 2022-06-13 16:39:58 -06:00
README.md 823 direct paging users (#1215) 2023-02-10 14:10:09 +03:00
tsconfig.json first UI integration test - phone verification + receive SMS alert flow (#900) 2023-03-06 16:28:52 +00:00
webpack.config.js review 2022-12-22 13:38:47 +02:00
yarn.lock first UI integration test - phone verification + receive SMS alert flow (#900) 2023-03-06 16:28:52 +00:00

Grafana OnCall

Latest Release License Docker Pulls Slack Discussion Build Status

Developer-friendly incident response with brilliant Slack integration.

  • Collect and analyze alerts from multiple monitoring systems
  • On-call rotations based on schedules
  • Automatic escalations
  • Phone calls, SMS, Slack, Telegram notifications

Getting Started

We prepared multiple environments:

  1. Download docker-compose.yml:

    curl -fsSL https://raw.githubusercontent.com/grafana/oncall/dev/docker-compose.yml -o docker-compose.yml
    
  2. Set variables:

    echo "DOMAIN=http://localhost:8080
    COMPOSE_PROFILES=with_grafana  # Remove this line if you want to use existing grafana
    SECRET_KEY=my_random_secret_must_be_more_than_32_characters_long" > .env
    
  3. Launch services:

    docker-compose pull && docker-compose up -d
    
  4. Go to OnCall Plugin Configuration, using log in credentials as defined above: admin/admin (or find OnCall plugin in configuration->plugins) and connect OnCall plugin with OnCall backend:

    OnCall backend URL: http://engine:8080
    
  5. Enjoy! Check our OSS docs if you want to set up Slack, Telegram, Twilio or SMS/calls through Grafana Cloud.

Update version

To update your Grafana OnCall hobby environment:

# Update Docker image
docker-compose pull engine

# Re-deploy
docker-compose up -d

After updating the engine, you'll also need to click the "Update" button on the plugin version page. See Grafana docs for more info on updating Grafana plugins.

Join community

Stargazers over time

Stargazers over time

Further Reading