Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/axllent/gitlab-pipe-cleaner
A command line tool that uses the Gitlab API to clean (prune) your servers CI pipelines and jobs, including build logs & artifacts
https://github.com/axllent/gitlab-pipe-cleaner
gitlab gitlab-api go golang
Last synced: about 2 months ago
JSON representation
A command line tool that uses the Gitlab API to clean (prune) your servers CI pipelines and jobs, including build logs & artifacts
- Host: GitHub
- URL: https://github.com/axllent/gitlab-pipe-cleaner
- Owner: axllent
- License: mit
- Created: 2019-06-15T09:12:38.000Z (over 5 years ago)
- Default Branch: develop
- Last Pushed: 2021-03-12T22:40:13.000Z (almost 4 years ago)
- Last Synced: 2024-06-20T03:47:31.376Z (6 months ago)
- Topics: gitlab, gitlab-api, go, golang
- Language: Go
- Homepage:
- Size: 8.79 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Gitlab Pipe Cleaner
Gitlab Pipe Cleaner is a commandline tool that uses the Gitlab API to clean (prune) your servers CI pipelines and jobs,
including all the build logs and artifacts.It will run through **all projects** that your API key has access to, deleting pipelines based values on your configuration file ([example](#configuration-example)).
The tool is written in [Golang](https://golang.org/) so is cross-platform and efficient.
## Uage options
```
Usage of gitlab-pipe-cleaner:
-c string
Config file (default "~/.config/gitlab-pipe-cleaner.json")
-delete
Delete files (default dry run / report only)
-update
Update to latest version
-v Show version
```Running gitlab-pipe-cleaner without the `-delete` option will not delete any data, but rather do a dry-run.
## Configuration example
Create a JSON confiburation file (edit with your own values).
This configuration file can be saved as `~/.config/gitlab-pipe-cleaner.json`, or specified with `gitlab-pipe-cleaner -c `.
```json
{
"GitlabURL": "https://git.example.com/",
"APIKey": "XjsjQr2U1RkHAUpFyfF2",
"MinPipelines": 10,
"KeepDays": 7
}
```- `GitlabURL` - The URL to your Gitlab server
- `APIKey` - Generate a personal access token with `api` access on `https://git.example.com/profile/personal_access_tokens`
- `MinPipelines` - The minimum number of latest pipelines to leave per project
- `KeepDays` - The minimum number of days to leave pipelines (regarless of `MinPipelines`)## Installation
You can use of the pre-built binaries (see releases), or if you prefer to build it from source `go get github.com/axllent/gitlab-pipe-cleaner`