gitlab-getlists
Scripts to download list of Projects, status, License, owners (with e-mail) from gitlab.geant.org (production mode) or k8s-gitlab.software.geant.org (developer mode). The output of the script is two files: json and html.
Installation
Script written in Python 3, install and use latest version.
After python installation, install The Python Package Index (PyPI) - latest version
All dependencies are stored in the file requirements.txt, install them:
pip install -r requirements.txt
Configuration
Sample configuration file is env_example. You should rename it to .env This file should contain tokens from gitlab:
PRODUCTION_TOKEN=glpat-ABCdefGhIj123xyz4567
DEVELOPER_TOKEN=glpat-ABCdefGhIj123xyz4567
Token can be generated from gitlab.geant.org (for production) or k8s-gitlab.software.geant.org (for developer): Edit profile -> Access Token Minimum is: read_api
The token looks similar to this: glpat-ABCdefGhIj123xyz4567 -> string 'glpat-' and 20 random numbers and characters
Usage
Script have two flags: -- production - take data from gitlab.geant.org -- developer - take date from k8s-gitlab.software.geant.org
Start Bash or CMD/PowerShell on your local computer and open folder with this project. Example run (Windows):
C:\...\gitlab-getlists> python.exe .\main.py --developer
C:\...\gitlab-getlists> python.exe .\main.py --production
Output
Two files:
- gitlab-projects.html
- gitlab-project.json