- Install Docker from http://docker.com
- Clone Gerrit repo from https://gerrit.googlesource.com/gerrit/
cd git clone https://gerrit.googlesource.com/gerrit
- Clone this repo
- Also consider adding it to $PATH, or create symlinks for scripts.
cd git clone https://github.com/vdonich/mitm-gerrit.git
- Start the proxy and create a new proxied browser instance
cd ~/gerrit ~/mitm-gerrit/mitm-serve-app-dev.sh
- Install MITM certificates
- Open http://mitm.it in the proxied browser window
- Follow the instructions to install MITM certs
To develop unminified plugin that loads multiple files, use this.
- Create a new proxied browser window and start mitmproxy via Docker:
~/mitm-gerrit/mitm-single-plugin.sh ./path/to/static/plugin.html
- Open any *.googlesource.com domain in proxied window
- plugin.html and ./path/to/static/* will be served
This flow assumes no additional .html/.js are needed, i.e. the plugin is a single file.
- Create a new proxied browser window and start mitmproxy via Docker:
cd ~/gerrit ~/mitm-gerrit/mitm-plugins.sh ./path/to/plugin.html,./maybe/one/more.js
- Open any *.googlesource.com domain in proxied window
- plugin.html and more.js are served
- Create a new proxied browser window and start mitmproxy via Docker:
cd ~/gerrit ~/mitm-gerrit/mitm-serve-app-dev.sh
- Open any *.googlesource.com domain in proxied window
- Instead of prod UI (gr-app.html, gr-app.js), local source files will be served