Last active
January 9, 2020 22:14
-
-
Save mahirrudin/79d95cc961d335c9be30c6ce9efae9c5 to your computer and use it in GitHub Desktop.
Shell script for cleaning gitlab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
read -p 'GITLAB-CI-TOKEN: ' token | |
read -p 'GITLAB-PROJECT-ID: ' projectid | |
read -p 'PIPELINE-ID-FIRST: ' firtspipeline | |
read -p 'PIPELINE-ID-LAST: ' lastpipeline | |
for i in {$firtspipeline..$lastpipeline}; do `curl -k --header "PRIVATE-TOKEN: $token" --request "DELETE" https://gitlab.devsecops.lab/api/v4/projects/$projectid/pipelines/$i`; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment