Update quickstart for latest gerrit

Gerrit has removed the ability for the admin user to directly
push to All-Projects by default, which hinders our ability to
bootstrap the Gerrit configuration in the quickstart.  Update the
setup script to create a change instead and merge it.

This will have the unfortunate effect of leaving an actual change
in the system that users may end up seeing during the tutorial,
which may be distracting, but should not affect functionality.

Change-Id: I0316d1c2ab4f2dceccf18adc2cb2fb283e3b2226
This commit is contained in:
James E. Blair
2024-12-05 11:11:37 -08:00
parent 41845f9632
commit 19fa480124
+3 -1
View File
@@ -67,8 +67,10 @@
shell: |
set -e
git config user.email 'admin@example.com'
f="$(git rev-parse --git-dir)/hooks/commit-msg"; curl -o "$f" http://gerrit:8080/tools/hooks/commit-msg ; chmod +x "$f"
git commit -a -m 'update config'
git push http://admin:secret@gerrit:8080/All-Projects +HEAD:refs/meta/config
git push http://admin:secret@gerrit:8080/All-Projects +HEAD:refs/for/refs/meta/config
ssh -i /var/ssh/admin -p 29418 -l 'admin' gerrit gerrit review -l Code-Review=2 --submit -p All-Projects 1,1
args:
chdir: "{{ all_projects_repo }}"