A webhooks client that sits between wp-calypso pull requests and e2e canary tests to execute the e2e tests against pull requests and provide status updates.
These webhooks also comment on wp-calypso PRs that modify the active A/B tests file to ensure these are updated in the e2e tests project.
These provide two webhook paths to do this:
- https://a8c-gh-e2e-bridge.go-vip.co/ghwebhook: this is the GitHub webhook that takes the pull request event and kicks off a corresponding CircleCI e2e canary test build
- https://a8c-gh-e2e-bridge.go-vip.co/circleciwebhook: this is the CircleCI webhook that takes the circleCI webhook when a build is finished and updates the GithHub wp-calypso PR with the appropriate execution result
Local development using ngrok (on macOS)
- Install ngrok -
brew install ngrokon macOS
- Set bridge secret
mysecretis a generated key
- Set CircleCI key
circlesecretis a CircleCI API
- Set GitHub Key
githubkeyis a GitHub API key
- Optionally set
FLOW_PATROL_ONLYif you wish to override the default values
npm startwhich starts this server on port 7777
- In another terminal tab, run
ngrok http 7777which should provide you a HTTPS url to your localhost server: eg.
https://675bbbef.ngrok.io -> localhost:7777
- Make sure you can access your webhook: eg.
- Add your ngrok webhook URLs to both Github Project Webhooks (via the UI) and Circle (via
circle.yml) - when adding the Webhook to GitHub only select the 'Pull Request' event and make sure you choose content type of 'application/json'
- As you make changes you will need to re-run
npm startbut ngrok will continue to work
Deployment to VIP GO
These webhooks are now hosted on VIP GO (see links above). Just merge to master and it will be deployed