Have a dedicated pagure config just for the git hook and specify it on the user's env
This commit is contained in:
parent
a0c61406f0
commit
ac1683d21b
3 changed files with 62 additions and 2 deletions
|
@ -17,8 +17,8 @@ wsgi_procs: 4
|
|||
wsgi_threads: 4
|
||||
|
||||
fas_client_groups: sysadmin-main,sysadmin-cvs,sysadmin-releng,sysadmin-noc,sysadmin-veteran
|
||||
fas_client_restricted_app: HOME=/srv/git /usr/share/gitolite3/gitolite-shell %(username)s
|
||||
fas_client_admin_app: HOME=/srv/git /usr/share/gitolite3/gitolite-shell -s %(username)s
|
||||
fas_client_restricted_app: PAGURE_CONFIG=/etc/pagure/pagure_hook.cfg HOME=/srv/git /usr/share/gitolite3/gitolite-shell %(username)s
|
||||
fas_client_admin_app: PAGURE_CONFIG=/etc/pagure/pagure_hook.cfg HOME=/srv/git /usr/share/gitolite3/gitolite-shell -s %(username)s
|
||||
fas_client_ssh_groups: "@cvs,sysadmin-main,sysadmin-cvs,sysadmin-releng,sysadmin-noc,sysadmin-veteran"
|
||||
admin_groups: "@sysadmin-cvs @sysadmin-releng @sysadmin-noc @sysadmin-veteran"
|
||||
|
||||
|
|
|
@ -83,6 +83,7 @@
|
|||
owner=pagure group=postfix mode=0640
|
||||
with_items:
|
||||
- { file: pagure.cfg, location: /etc/pagure }
|
||||
- { file: pagure_hook.cfg, location: /etc/pagure }
|
||||
- { file: alembic.ini, location: /etc/pagure }
|
||||
tags:
|
||||
- config
|
||||
|
|
59
roles/distgit/pagure/templates/pagure_hook.cfg
Normal file
59
roles/distgit/pagure/templates/pagure_hook.cfg
Normal file
|
@ -0,0 +1,59 @@
|
|||
from datetime import timedelta
|
||||
import os
|
||||
|
||||
os.umask(0o002)
|
||||
|
||||
DB_URL = 'postgresql://{{ distgit_pagure_db_ro_user }}:{{ distgit_pagure_db_ro_pass }}@{{ distgit_pagure_db_host }}/{{ distgit_pagure_db_name }}'
|
||||
|
||||
WEBHOOK = True
|
||||
### Folder containing to the git repos
|
||||
GIT_FOLDER = '/srv/git/repositories'
|
||||
|
||||
### Folder containing the docs repos
|
||||
DOCS_FOLDER = None
|
||||
|
||||
### Folder containing the pull-requests repos
|
||||
REQUESTS_FOLDER = '/srv/git/repositories/requests'
|
||||
|
||||
### Folder containing the tickets repos
|
||||
TICKETS_FOLDER = None
|
||||
|
||||
### Folder containing the clones of the remotes git repo
|
||||
REMOTE_GIT_FOLDER = '/srv/git/remotes'
|
||||
|
||||
### Folder where to run gl-compile-conf from
|
||||
GITOLITE_HOME = '/srv/git/'
|
||||
|
||||
### Configuration file for gitolite
|
||||
GITOLITE_CONFIG = '/srv/git/.gitolite/conf/gitolite.conf'
|
||||
|
||||
### File to include at the top of the gitolite configuration file
|
||||
GITOLITE_PRE_CONFIG = '/var/tmp/gitolite-prefix.txt'
|
||||
|
||||
### Temp folder to be used to make the clones to work around bug in libgit2:
|
||||
## refs: https://github.com/libgit2/libgit2/issues/2965
|
||||
## and https://github.com/libgit2/libgit2/issues/2797
|
||||
TMP_FOLDER = '/srv/tmp'
|
||||
|
||||
REDIS_HOST = '0.0.0.0'
|
||||
REDIS_PORT = 6379
|
||||
REDIS_DB = 0
|
||||
|
||||
# Configuration item that are specific for this odd pagure instance
|
||||
CASE_SENSITIVE = True
|
||||
|
||||
PROJECT_TICKETS = False
|
||||
ENABLE_NEW_PROJECTS = True
|
||||
ENABLE_DEL_PROJECTS = False
|
||||
ENABLE_TICKETS = False
|
||||
ENABLE_GROUP_MNGT = False
|
||||
DEPLOY_KEY = False
|
||||
LOCAL_SSH_KEY = False
|
||||
ALLOW_DELETE_BRANCH = False
|
||||
|
||||
DISABLED_PLUGINS = ['IRC', 'Pagure tickets', 'Read the Doc']
|
||||
|
||||
GITOLITE_BACKEND = 'distgit'
|
||||
GITOLITE_CELERY_QUEUE = 'gitolite_queue'
|
||||
|
||||
BLACKLISTED_GROUPS = ['forks', 'group']
|
Loading…
Add table
Add a link
Reference in a new issue