Starter pack for Gerrit javascript plugin development.
- Code > Download ZIP
- Unarchive zip file
- Install Docker
- Install Puma-dev
brew install puma/puma/puma-devpuma-dev -installsudo puma-dev -setup
echo 3200 > ~/.puma-dev/gerrit
docker-compose up- Go to https://gerrit.test
- Go to top right > Settings
- Add your Git email (
git config --get user.email) - Add your SSH public key (
cat ~/.ssh/id_rsa.pub) - Clone All-projects
git clone ssh://gerrit.test:29418/All-Projects cd All-Projects- Install Change-Id hook
gitdir=$(git rev-parse --git-dir); scp -p -P 29418 gerrit.test:hooks/commit-msg ${gitdir}/hooks/
- Create a
mainbranchgit checkout -b maingit push origin
- Create a change
git checkout -b change1git push origin HEAD:refs/for/main
- Change URL is returned by Gerrit
git init- Update the Gerrit version you want to develop against in
docker-compose.yml(3.2.12 is the current default) - Rename template
mv plugins/plugin-v1.0.0.template.js plugins/mysuperplugin-v1.0.0.jsmysuperpluginis the name of the plugin ([a-z]+) andv1.0.0is the version of the plugin.
Gerrit watches the plugins folder for changes and will reload the plugin. Then, reload your page to load the new version.