gitlab 手动删除ci产物

#!/bin/bash

# project_id, find it here: https://gitlab.com/[organization name]/[repository name]/edit inside the "General project settings" tab
project_id="3034900"

# token, find it here: https://gitlab.com/profile/personal_access_tokens
token="Lifg_azxDyRp8eyNFRfg"
server="gitlab.com"

# go to https://gitlab.com/[organization name]/[repository name]/-/jobs
# then open JavaScript console
# copy/paste => copy(_.uniq($('.ci-status').map((x, e) => /([0-9]+)/.exec(e.href)).toArray()).join(' '))
# press enter, and then copy the result here :
# repeat for every page you want
#job_ids=`seq 250 333` job_ids
=(48875658 48874137 48873496 48872419) for job_id in ${job_ids[@]}; do URL="https://$server/api/v4/projects/$project_id/jobs/$job_id/erase" echo "$URL" curl --request POST --header "PRIVATE-TOKEN:${token}" "$URL" echo " " done

https://stackoverflow.com/questions/42512733/remove-artifacts-from-ci-manually

原文地址:https://www.cnblogs.com/wolbo/p/14885593.html