Adds some magic to GitLab
๐งน GitLabracadabra ๐ง
:alembic: Adds some magic to GitLab :crystal_ball:
GitLab'racadabra is a way to configure a GitLab instance from a YAML configuration, using the API.
It is able to create GitLab's groups, projects and users (more is coming...)
It is based on Python GitLab.
Debian package is available from artefacts and can be installed with:
apt install gitlabracadabra_*.deb
Note: Debian 10 buster or later is required.
pip install gitlabracadabra
There are also Docker/OCI images.
Example usage:
sudo docker run -ti \
-v "$HOME/.python-gitlab.cfg:/home/gitlabracadabra/.python-gitlab.cfg:ro" \
-v "$PWD/gitlabracadabra.yml:/tmp/app/gitlabracadabra.yml:ro" \
registry.gitlab.com/gitlabracadabra/gitlabracadabra:0.2.1 \
--verbose --dry-run
Local installation (in $HOME/.local
):
# On Debian >= 10 (buster) or Ubuntu >= 19.04
sudo apt install python3-jsonschema python3-gitlab python3-yaml python3-coverage python3-vcr
# On others
pip install -r requirements.txt
# Build, install and test
python3 setup.py build
python3 setup.py install --user
# python3 setup.py test
~/.local/bin/gitlabracadabra --verbose --dry-run
GitLabracadabra uses the same configuration file as Python GitLab CLI to store connection parameters.
Example ~/.python-gitlab.cfg
:
[global]
default = gitlab
[gitlab]
url = https://gitlab.com
private_token = T0K3N
More information in Python GitLab documentation.
GitLabracadabra actions are configured with a YAML file.