https://github.com/solvik/gitlab-clean-old-pipelines
Clean old pipelines from your Gitlab instance
https://github.com/solvik/gitlab-clean-old-pipelines
gitlab gitlab-ci gitlab-ci-pipeline python python-gitlab
Last synced: 4 months ago
JSON representation
Clean old pipelines from your Gitlab instance
- Host: GitHub
- URL: https://github.com/solvik/gitlab-clean-old-pipelines
- Owner: Solvik
- License: apache-2.0
- Created: 2022-04-02T14:13:57.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2026-03-01T07:58:53.000Z (4 months ago)
- Last Synced: 2026-03-01T10:54:58.823Z (4 months ago)
- Topics: gitlab, gitlab-ci, gitlab-ci-pipeline, python, python-gitlab
- Language: Python
- Homepage:
- Size: 16.6 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Gitlab clean old pipelines
This project aim is to clean old pipelines from your Gitlab self-hosted instance.
## Usage
```
usage: main.py [-h] -u GITLAB_URL -t GITLAB_TOKEN [--user-agent USER_AGENT] [--dry-run] -d DAYS
main.py: error: the following arguments are required: -h/--gitlab-url, -t/--gitlab-token, -d/--days
```
## Example
Will delete pipelines older than 365 days
```
$ ./main.py -u https://gitlab.foo.bar -t mysupertoken -d 365
```
## Using Docker
```
$ docker build -t gitlab-clean-old-pipeline .
$ docker run -ti -e GITLAB_URL=https://gitlab.foo.bar \
-e GITLAB_TOKEN=mysupertoken \
-e OLDER_THAN=365
gitlab-clean-old-pipeline
```