Created
July 27, 2018 11:13
-
-
Save gertvdijk/9790e0d42e9f6a539703d6e60e0ff7fd to your computer and use it in GitHub Desktop.
Init and start Gerrit in a single shell script example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -ex | |
SITE_PATH="${HOME}/site" | |
GERRIT_WAR="/path/to/gerrit.war" | |
# Because Gerrit's "daemon --init" can't take init options we will do this | |
# separately. Feature request filed: | |
# https://bugs.chromium.org/p/gerrit/issues/detail?id=9004 | |
# Init site (provision). Note that the GERRIT_WAR may be a different version | |
# than the one in "${SITE_PATH}/bin/gerrit.war". | |
java ${JAVA_OPTIONS} -jar ${GERRIT_WAR} init \ | |
--site-path "${SITE_PATH}" \ | |
--batch \ | |
--no-auto-start \ | |
--install-all-plugins \ | |
--skip-all-downloads | |
# Run daemon in foreground with 'exec' to pass signals. | |
exec java ${JAVA_OPTIONS} -jar "${SITE_PATH}/bin/gerrit.war" daemon \ | |
--site-path "${SITE_PATH}" \ | |
--console-log \ | |
$@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment