Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/staticf0x/gitlab-plumber
A GitLab cli tool to obtain data about pipelines and jobs
https://github.com/staticf0x/gitlab-plumber
gitlab
Last synced: 3 days ago
JSON representation
A GitLab cli tool to obtain data about pipelines and jobs
- Host: GitHub
- URL: https://github.com/staticf0x/gitlab-plumber
- Owner: staticf0x
- License: mit
- Created: 2023-02-23T10:33:32.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-12-12T15:00:59.000Z (27 days ago)
- Last Synced: 2024-12-12T16:18:27.814Z (26 days ago)
- Topics: gitlab
- Language: Python
- Homepage:
- Size: 115 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gitlab-plumber
GitLab plumber is a small utility that helps you analyze the duration
of GitLab pipelines.## Running
### Show a tree of jobs
`$ poetry run python3 main.py show --project --pipeline `
![Pipeline tree](images/show.png)
This shows the queue time + run time for each job as well as percentage of the
stage duration. For stages, it shows the total runtime and percentage of the
whole pipeline duration.### Show a blame graph of stages and individual jobs
`$ poetry run python3 main.py blame --project --pipeline `
![Blame graph](images/blame.png)
This shows the stages and jobs sorted by total run duration (queue is excluded)
to narrow down which of the stages/jobs take the longest.### Show or blame by URL
Instead of passing project ID and pipeline ID it is possible to pass the direct URL
to a pipeline:`$ poetry run python3 main.py show --url https://gitlab.com/group/project/-/pipelines/123456`
### Analyze multiple pipelines
You can generate a CSV file with duration of jobs for multiple pipelines:
`$ poetry run python3 main.py analyze --project `
By default this pulls data from the latest 10 pipelines on the `main` branch.
To modify this behavior, see the available options:```
Options:
-p, --project INTEGER Project ID
-n, --num INTEGER Number of pipelines to analyze (default: 10)
--ref TEXT Git ref to choose (default: main)
--source TEXT Trigger source (example: push, trigger)
```## Installation
- `$ poetry install --no-root`
## Configuration
Create `.env` file with the following content:
```
GITLAB_URI=
PRIVATE_TOKEN=
```