commit | 5407310b863947c4c34e5c944cade1459dcddaa3 | [log] [tgz] |
---|---|---|
author | Nico Huber <nico.h@gmx.de> | Sun Jun 25 11:36:59 2023 +0000 |
committer | Nico Huber <nico.h@gmx.de> | Sat Jul 01 15:42:04 2023 +0000 |
tree | 398a6eee1a6266938314b93c84ff5409d862000e | |
parent | a1a296fa55d0b0293a4041c2fe62a41ef08cdb6d [diff] [blame] |
Add Gerrit OAUTH plugin and setup for GitHub Using v3.5.1 from https://github.com/davido/gerrit-oauth-provider/releases/download/v3.5.1/gerrit-oauth-provider.jar
diff --git a/gerrit/Dockerfile.entrypoint-unprivileged b/gerrit/Dockerfile.entrypoint-unprivileged index 78ca1f8..86574b1 100644 --- a/gerrit/Dockerfile.entrypoint-unprivileged +++ b/gerrit/Dockerfile.entrypoint-unprivileged
@@ -2,4 +2,13 @@ set -e +if [ "${GITHUB_OAUTH_CLIENT_ID}" -a "${GITHUB_OAUTH_CLIENT_SECRET}" ]; then + git config -f /var/gerrit/etc/gerrit.config \ + plugin.gerrit-oauth-provider-github-oauth.root-url "https://github.com/" + git config -f /var/gerrit/etc/gerrit.config \ + plugin.gerrit-oauth-provider-github-oauth.client-id "${GITHUB_OAUTH_CLIENT_ID}" + git config -f /var/gerrit/etc/gerrit.config \ + plugin.gerrit-oauth-provider-github-oauth.client-secret "${GITHUB_OAUTH_CLIENT_SECRET}" +fi + exec /entrypoint.sh "$@"