Created
August 19, 2020 16:26
-
-
Save spig/ab99fac63f12f35dc3da9b2290e962c3 to your computer and use it in GitHub Desktop.
Remove old projects via the Jenkins API
This file contains hidden or 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
# Replace JobName with the job name and ProjectName with the project name | |
for JOB in {246..254} | |
do curl -u $JENKINS_USER_NAME:$JENKINS_API_TOKEN -X POST http://$JENKINS_SERVER:$JENKINS_PORT/view/ProjectName/job/JobName/$JOB/doDelete | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment