Delete your old GitLab CI pipelines

Unsplash: JJ Ying

Introduction

Endpoints

  • list project pipelines
  • get a single pipeline
  • get variables of a pipeline
  • delete a pipeline

Call the GitLab API

curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/pipelines/46"
Axios configuration

List pipelines

Axios — Get the list of pipelines

Delete a pipeline

Axios — Delete a pipeline

Delete all pipelines

Axios — Delete pipelines

Wrap Up & Bonus

Final code
PROJECT_ID=20210318PRIVATE_TOKEN=AAAA-BBBBBBBBBBB

--

--

--

Node.js & React Native Developer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Hacking the Redis Protocol as an HTTP API alternative using Asyncio in Python.

9 Lessons from my first 90 days at LinkedIn as the most junior person in the Zoom

Install TensorFlow with CUDA, cuDNN, and GPU support in 4 Easy Steps

Top 6 Front-end Development Courses with Certificates

CBSE Python(083) Class 12 Python Revision 1 assignment programs

Do you need to use xargs?

How ColdStack keeps prices low

Learn Sideways! — Quotidian — 019

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Nicolas Dommanget-Muller

Nicolas Dommanget-Muller

Node.js & React Native Developer

More from Medium

How to Set-Up Your Own Gitlab CI/CD Runner

How Skaffold saved my (local CI/CD) day

Overview: Merge Requests

[How to ] Change your Admin Passwords in Open Distro for Elasticsearch on Centos 7.x