Skip to content

Instantly share code, notes, and snippets.

View shimi25's full-sized avatar

Shimon Bitton shimi25

  • Foresight Automotive LTD
  • Israel
View GitHub Profile
@shimi25
shimi25 / cleanup-gitlab-pipelines.sh
Created June 8, 2023 13:07 — forked from anutator/cleanup-gitlab-pipelines.sh
Bulk delete gitlab pipelines older than a given date
#!/bin/bash
# Purpose: Bulk-delete GitLab pipelines older than a given date
# Author: github.com/chrishoerl
# New features: Anna Toropova https://github.com/anutator
# GitLab API: v4
# Requirements: jq must be instaled ($ sudo apt install jq)
# API example: https://gitlab.example.com/api/v4/projects
# API example: https://gitlab.example.com/api/v4/projects/<projectid>/pipelines
#
# NOTE: To dryrun script comment line 59.