Skip to content

Latest commit

 

History

History
54 lines (37 loc) · 1.32 KB

File metadata and controls

54 lines (37 loc) · 1.32 KB

GitLab Super Search

GitLab Super Search banner

Small script to search a string inside YAML files (.yml/.yaml) across all projects in a GitLab group, then export the results to a single-sheet Excel.

Note: This is a first version and it is not fully optimized for groups with many projects. You will have your results, just be patient and go grab a coffee. Also, feel free to contribute.

Installation

python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt

Prerequisites

Environment variables:

export GITLAB_URL="https://gitlab.com"
export GITLAB_TOKEN="glpat-xxxx"

Usage

python3 gss.py \
  --group-path platform \
  --search "kaniko-project/executor:debug" \
  --out kaniko_old_image.xlsx

Useful options

  • --search-type basic : switch back to basic search if needed (default: advanced).
  • --no-fallback : do not scan project-by-project if group search is unavailable.
  • --max-workers 6 : number of threads for the fallback.
  • --version : print the current version.

GitHub release

A GitHub Actions workflow (.github/workflows/release.yml) creates a GitHub Release automatically when a version tag is pushed.

First release (v0.1.0):

git tag -a v0.1.0 -m "First release v0.1.0"
git push origin v0.1.0