Skip to content
This repository has been archived by the owner on Jan 2, 2021. It is now read-only.

nolte/gitlab-bulkcheckout

Repository files navigation

GitLab Bulk Checkout Tool

Github Project Stars Travis CI build status CircleCI build status Documentation Status Github Issue Tracking Github LatestRelease CodeFactor microbadger image version docker stars docker pulls pypi.org version

Simple utility written in Python for the local repositories. In a Time of SaaS, IaC and micro services, it can happen that you need many small repositories at your local Machine for Development, it is terrible to pull so many repositories.

Features

  • sort gitlab groups to your local folders
  • append a prefix to local copy, configurable by pulled Repository group from GitLab
  • pull changes from origin

Python

Supported Python: version

Current Version: pypiorgversion

venv (Virtual Python Environment)

For easy usage and better dependency handling use a python-virtualenv.

virtualenv ~/venvs/gitlab-bulkcheckout
source ~/venvs/gitlab-bulkcheckout/bin/activate

Install

For install the application from pypi.org use pip.

pip install gitlab-bulkcheckout

Build

virtualenv ~/venvs/gitlab-bulkcheckout-dev
source ~/venvs/gitlab-bulkcheckout-dev/bin/activate
pip install tox
tox

The tox script create a installable dist under ./.tox/dist/*.tar.gz

Docker

For easy usage, the tool can be wrapped with docker, so you don`t need a local python env for using.

Build

  docker build -t nolte/gitlab-bulkcheckout .

Usage

  docker run -it \
    --user=${UID}:$(id -g $(whoami)) \
    -v $SSH_AUTH_SOCK:/ssh-agent \
    -e SSH_AUTH_SOCK=/ssh-agent \
    -e GROUPS_MAPPINGS=/app/gitlab_groupMapping.yml \
    -e GITLAB_TOKEN=$(pass /internet/gitlab.com/tokens/management) \
    -e PROJECTS_BASE=/tmp/bulkcheckout \
    -w /tmp/bulkcheckout \
    -v /tmp/bulkcheckout:/tmp/bulkcheckout \
    -v ${HOME}/.ssh:/home/builder/.ssh:ro \
    -v ${PWD}/gitlab_groupMapping.yml:/app/gitlab_groupMapping.yml:ro \
    nolte/gitlab-bulkcheckout -v checkoutbulk