Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/screendriver/gitlab-pipeline-deleter
🗑 A CLI tool that deletes old GitLab CI pipelines
https://github.com/screendriver/gitlab-pipeline-deleter
ci cleanup gitlab hacktoberfest pipelines
Last synced: 2 months ago
JSON representation
🗑 A CLI tool that deletes old GitLab CI pipelines
- Host: GitHub
- URL: https://github.com/screendriver/gitlab-pipeline-deleter
- Owner: screendriver
- Created: 2020-09-29T11:53:43.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-13T14:18:47.000Z (9 months ago)
- Last Synced: 2024-04-14T12:03:17.467Z (9 months ago)
- Topics: ci, cleanup, gitlab, hacktoberfest, pipelines
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/gitlab-pipeline-deleter
- Size: 5.36 MB
- Stars: 7
- Watchers: 5
- Forks: 3
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# gitlab-pipeline-deleter
[![GitHub Actions status](https://github.com/screendriver/gitlab-pipeline-deleter/workflows/CI/badge.svg)](https://github.com/screendriver/gitlab-pipeline-deleter/actions)
A Node.js CLI tool that deletes old [GitLab CI](https://docs.gitlab.com/ee/ci/) pipelines.
### Installation
```sh
$ npm install -g gitlab-pipeline-deleter
```### Usage
```
Usage: glpd [options] [gitlab-url] [project-id] [access-token]Deletes old GitLab pipelines
Options:
-d --days older than days (default: "30")
--trace show stack traces for errors when possible (default: false)
-h, --help display help for command
```You can use either the command line arguments `gitlab-url`, `project-id` and `access-token` (the `access-token` needs to be owner of the project. See https://docs.gitlab.com/ee/api/pipelines.html#delete-a-pipeline for more information) or you can create a `glpd.config.js` configuration file that exports an object. Both CommonJS (`.cjs`) and ECMAScript Modules (`.mjs`) are supported. All of the command line arguments are supported but needs to be written in `camelCase`:
```js
export default {
gitlabUrl: 'https://example.com',
projectId: '42',
accessToken: '',
days: 30,
trace: false,
};
```If you specify command line arguments **and** a configuration file the command line arguments will overwrite the values in the configuration file. So the CLI arguments has always precedence.
Multiple project ids can be configured by providing a comma-separated list to the `projectId` argument.