Giter Site home page Giter Site logo

thedigitaloctopus / wp-desktop-gh-bridge Goto Github PK

View Code? Open in Web Editor NEW

This project forked from automattic/wp-desktop-gh-bridge

0.0 1.0 0.0 56 KB

A bridge to connect wp-calypso to wp-desktop unit tests

License: GNU General Public License v2.0

JavaScript 100.00%

wp-desktop-gh-bridge's Introduction

wp-desktop-gh-bridge

A webhooks client that sits between wp-calypso pull requests and wp-desktop unit tests to execute the wp-desktop tests against pull requests and provide status updates.

These provide two webhook paths to do this:

  1. https://a8c-gh-desktop-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
  2. https://a8c-gh-desktop-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)

  1. Install ngrok - brew install ngrok on macOS
  2. Set bridge secret export BRIDGE_SECRET='mysecret' where mysecret is a generated key
  3. Set CircleCI key export CIRCLECI_SECRET='circlesecret' where circlesecret is a CircleCI API key
  4. Set GitHub Key export GITHUB_SECRET='githubkey' where githubkey is a GitHub API key
  5. Optionally set CALYPSO_PROJECT, DESKTOP_PROJECT and FLOW_PATROL_ONLY if you wish to override the default values
  6. npm start which starts this server on port 7777
  7. In another terminal tab, run ngrok http 7777 which should provide you a HTTPS url to your localhost server: eg. https://675bbbef.ngrok.io -> localhost:7777
  8. Make sure you can access your webhook: eg. curl https://675bbbef.ngrok.io/circleciwebhook
  9. 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'
  10. As you make changes you will need to re-run npm start but 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 ๐Ÿ˜Š

wp-desktop-gh-bridge's People

Contributors

bsessions85 avatar alisterscott avatar nsakaimbo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.