Automatically recursively adding a list of users to all GitLab groups.
This can be useful for GitLab administration when you need to add service accounts to all groups, such as dependabot, sonarqube, and other robot accounts for automation.
You are expected to run once or run on a schedule.
GITLAB_URL=https://gitlab.zyfra.com - GitLab server URLGITLAB_PRIVATE_TOKEN==None - Private access token. Normal access will
allow you to grant rights no higher than the existing one and only for
available groups. To manage an entire GitLab instance, it is better
to use a token with sudo rightsGITLAB_FILLING_USERS=[] Comma-separated list of GitLab user
IDs to add to groups.GITLAB_FILLING_USERS=13,14,22GITLAB_USERS_ACCESS_LEVEL=30 - Access level to be assigned to users
GITLAB_EXCLUDE_GROUPS=[] Comma-separated list of GitLab groups to be
ignored at run time.GITLAB_EXCLUDE_GROUPS=10,42SKIP_BLANK_GROUPS=True - Skip adding users to empty groups
(groups that have no projects)SKIP_NESTED_GROUPS=True - Skip adding users to nested groups, the
user will inherit access from the parent group anyway.LOG_LEVEL=INFOdocker pull ghcr.io/woozymasta/gitlab-groups-filling-with-users:latestdocker pull quay.io/woozymasta/gitlab-groups-filling-with-users:latestdocker pull docker.io/woozymasta/gitlab-groups-filling-with-users:latestClone this repository and go into it, run:
python -m venv .venv
pip install --upgrade pip
pip install --upgrade wheel
pip install --upgrade --requirement requirements.txt
. .venv/bin/activate
cp .env .env.example
editor .env
./app.py
Content type
Image
Digest
Size
24.1 MB
Last updated
over 4 years ago
docker pull woozymasta/gitlab-groups-filling-with-users