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
@chrishoerl
chrishoerl / cleanup-gitlab-pipelines.sh
Last active July 3, 2024 12:46
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
# 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: Script is just a dryrun. To really delete pipelines, simply uncomment line 49 to activate
#
@anutator
anutator / cleanup-gitlab-pipelines.sh
Last active July 19, 2023 07:42
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.